comparison src/video/SDL_renderer_gl.c @ 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 aa8888658021
children e8916fe9cfc8
comparison
equal deleted inserted replaced
4989:58b6bb4a45e9 4990:397e748d901a
758 GLuint shader = 0; 758 GLuint shader = 0;
759 GLenum result; 759 GLenum result;
760 760
761 if (!convert_format(renderdata, texture->format, &internalFormat, 761 if (!convert_format(renderdata, texture->format, &internalFormat,
762 &format, &type)) { 762 &format, &type)) {
763 SDL_SetError("Unsupported texture format"); 763 SDL_SetError("Texture format %s not supported by OpenGL",
764 SDL_GetPixelFormatName(texture->format));
764 return -1; 765 return -1;
765 } 766 }
766 if (texture->format == SDL_PIXELFORMAT_UYVY && 767 if (texture->format == SDL_PIXELFORMAT_UYVY &&
767 !renderdata->GL_APPLE_ycbcr_422_supported && 768 !renderdata->GL_APPLE_ycbcr_422_supported &&
768 !renderdata->GL_MESA_ycbcr_texture_supported && 769 !renderdata->GL_MESA_ycbcr_texture_supported &&