mirror of
https://github.com/yawut/SDL.git
synced 2026-04-17 22:39:31 -05:00
Improved error message for unsupported texture format
This commit is contained in:
parent
9590d26387
commit
0b56f35597
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user