comparison src/SDL_compat.c @ 1924:69217fdd2c0a

If the OpenGL renderer is selected for a non-OpenGL window, recreate the window with OpenGL enabled. Added OpenGL renderer error checking. Use fast-path texture formats in the OpenGL renderer.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 22 Jul 2006 21:02:57 +0000
parents 83420da906a5
children 83946ee0ff1f
comparison
equal deleted inserted replaced
1923:d4572b97b08f 1924:69217fdd2c0a
467 SDL_VideoTexture = 467 SDL_VideoTexture =
468 SDL_CreateTexture(desired_format, SDL_TextureAccess_Local, width, 468 SDL_CreateTexture(desired_format, SDL_TextureAccess_Local, width,
469 height); 469 height);
470 if (!SDL_VideoTexture) { 470 if (!SDL_VideoTexture) {
471 SDL_VideoTexture = 471 SDL_VideoTexture =
472 SDL_CreateTexture(0, SDL_TextureAccess_Local, width, height); 472 SDL_CreateTexture(SDL_PixelFormat_RGB888, SDL_TextureAccess_Local,
473 width, height);
473 } 474 }
474 if (!SDL_VideoTexture) { 475 if (!SDL_VideoTexture) {
475 return NULL; 476 return NULL;
476 } 477 }
477 478