Improved error message for unsupported texture format

This commit is contained in:
Sam Lantinga 2011-01-12 19:33:04 -08:00
parent 0fa1d9fe61
commit d6dc10e868
2 changed files with 4 additions and 2 deletions

View file

@ -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 &&

View file

@ -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;
}