Mercurial > sdl-ios-xcode
changeset 4990:397e748d901a
Improved error message for unsupported texture format
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 12 Jan 2011 19:33:04 -0800 |
parents | 58b6bb4a45e9 |
children | dc9924fc5070 |
files | src/video/SDL_renderer_gl.c src/video/SDL_renderer_gles.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/SDL_renderer_gl.c Wed Jan 12 17:53:06 2011 -0800 +++ b/src/video/SDL_renderer_gl.c Wed Jan 12 19:33:04 2011 -0800 @@ -760,7 +760,8 @@ 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 &&
--- a/src/video/SDL_renderer_gles.c Wed Jan 12 17:53:06 2011 -0800 +++ b/src/video/SDL_renderer_gles.c Wed Jan 12 19:33:04 2011 -0800 @@ -408,7 +408,8 @@ 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; }