Improved error message for unsupported texture format
authorSam Lantinga
Wed, 12 Jan 2011 19:33:04 -0800
changeset 4990397e748d901a
parent 4989 58b6bb4a45e9
child 4991 dc9924fc5070
Improved error message for unsupported texture format
src/video/SDL_renderer_gl.c
src/video/SDL_renderer_gles.c
     1.1 --- a/src/video/SDL_renderer_gl.c	Wed Jan 12 17:53:06 2011 -0800
     1.2 +++ b/src/video/SDL_renderer_gl.c	Wed Jan 12 19:33:04 2011 -0800
     1.3 @@ -760,7 +760,8 @@
     1.4  
     1.5      if (!convert_format(renderdata, texture->format, &internalFormat,
     1.6                          &format, &type)) {
     1.7 -        SDL_SetError("Unsupported texture format");
     1.8 +        SDL_SetError("Texture format %s not supported by OpenGL",
     1.9 +                     SDL_GetPixelFormatName(texture->format));
    1.10          return -1;
    1.11      }
    1.12      if (texture->format == SDL_PIXELFORMAT_UYVY &&
     2.1 --- a/src/video/SDL_renderer_gles.c	Wed Jan 12 17:53:06 2011 -0800
     2.2 +++ b/src/video/SDL_renderer_gles.c	Wed Jan 12 19:33:04 2011 -0800
     2.3 @@ -408,7 +408,8 @@
     2.4          type = GL_UNSIGNED_SHORT_4_4_4_4;
     2.5          break;
     2.6      default:
     2.7 -        SDL_SetError("Unsupported by OpenGL ES texture format");
     2.8 +        SDL_SetError("Texture format %s not supported by OpenGL ES",
     2.9 +                     SDL_GetPixelFormatName(texture->format));
    2.10          return -1;
    2.11      }
    2.12