Commit d6dc10e8 authored by Sam Lantinga's avatar Sam Lantinga

Improved error message for unsupported texture format

parent 0fa1d9fe
......@@ -760,7 +760,8 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
if (!convert_format(renderdata, texture->format, &internalFormat,
&format, &type)) {
SDL_SetError("Unsupported texture format");
SDL_SetError("Texture format %s not supported by OpenGL",
SDL_GetPixelFormatName(texture->format));
return -1;
}
if (texture->format == SDL_PIXELFORMAT_UYVY &&
......
......@@ -408,7 +408,8 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
type = GL_UNSIGNED_SHORT_4_4_4_4;
break;
default:
SDL_SetError("Unsupported by OpenGL ES texture format");
SDL_SetError("Texture format %s not supported by OpenGL ES",
SDL_GetPixelFormatName(texture->format));
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment