diff 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
line wrap: on
line diff
--- a/src/SDL_compat.c	Sat Jul 22 19:51:48 2006 +0000
+++ b/src/SDL_compat.c	Sat Jul 22 21:02:57 2006 +0000
@@ -469,7 +469,8 @@
                           height);
     if (!SDL_VideoTexture) {
         SDL_VideoTexture =
-            SDL_CreateTexture(0, SDL_TextureAccess_Local, width, height);
+            SDL_CreateTexture(SDL_PixelFormat_RGB888, SDL_TextureAccess_Local,
+                              width, height);
     }
     if (!SDL_VideoTexture) {
         return NULL;