comparison src/video/SDL_video.c @ 282:b42d80e73896

Fixed SDL_OPENGLBLIT with OpenGL API newer than 1.2
author Sam Lantinga <slouken@libsdl.org>
date Wed, 20 Feb 2002 01:02:33 +0000
parents c5010ab8ba35
children f6ffac90895c
comparison
equal deleted inserted replaced
281:c5010ab8ba35 282:b42d80e73896
726 /* If the implementation either supports the packed pixels 726 /* If the implementation either supports the packed pixels
727 extension, or implements the core OpenGL 1.2 API, it will 727 extension, or implements the core OpenGL 1.2 API, it will
728 support the GL_UNSIGNED_SHORT_5_6_5 texture format. 728 support the GL_UNSIGNED_SHORT_5_6_5 texture format.
729 */ 729 */
730 if ( (bpp == 16) && 730 if ( (bpp == 16) &&
731 (strstr((const char *)video->glGetString(GL_EXTENSIONS), 731 (strstr((const char *)video->glGetString(GL_EXTENSIONS), "GL_EXT_packed_pixels") ||
732 "GL_EXT_packed_pixels") || 732 (atof((const char *)video->glGetString(GL_VERSION)) >= 1.2f))
733 (strncmp((const char *)video->glGetString(GL_VERSION), 733 ) {
734 "1.2", 3) == 0)) )
735 {
736 video->is_32bit = 0; 734 video->is_32bit = 0;
737 SDL_VideoSurface = SDL_CreateRGBSurface( 735 SDL_VideoSurface = SDL_CreateRGBSurface(
738 flags, 736 flags,
739 width, 737 width,
740 height, 738 height,