comparison src/render/opengles2/SDL_render_gles2.c @ 5254:7a963be087ef

Mostly fixed fullscreen mode on Mac OS X, and you can toggle it on and off. There are still some problems with the ConvertNSRect() calculations when switching video modes, which causes wierd window positioning issues, and the fullscreen window is still minimized on exit.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 11 Feb 2011 00:25:44 -0800
parents 9c0c4d767ef6
children 62d2bc792002
comparison
equal deleted inserted replaced
5253:ff2564c24045 5254:7a963be087ef
1083 * Renderer instantiation * 1083 * Renderer instantiation *
1084 *************************************************************************************************/ 1084 *************************************************************************************************/
1085 1085
1086 #define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B 1086 #define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B
1087 1087
1088 /* Used to re-create the window with OpenGL capability */
1089 extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
1090
1091 static SDL_Renderer * 1088 static SDL_Renderer *
1092 GLES2_CreateRenderer(SDL_Window *window, Uint32 flags) 1089 GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
1093 { 1090 {
1094 SDL_Renderer *renderer; 1091 SDL_Renderer *renderer;
1095 GLES2_DriverContext *rdata; 1092 GLES2_DriverContext *rdata;
1096 Uint32 window_flags;
1097 GLint nFormats; 1093 GLint nFormats;
1098 #ifndef ZUNE_HD 1094 #ifndef ZUNE_HD
1099 GLboolean hasCompiler; 1095 GLboolean hasCompiler;
1100 #endif 1096 #endif
1101
1102 window_flags = SDL_GetWindowFlags(window);
1103 if (!(window_flags & SDL_WINDOW_OPENGL)) {
1104 if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
1105 return NULL;
1106 }
1107 }
1108 1097
1109 /* Create the renderer struct */ 1098 /* Create the renderer struct */
1110 renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(SDL_Renderer)); 1099 renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(SDL_Renderer));
1111 if (!renderer) { 1100 if (!renderer) {
1112 SDL_OutOfMemory(); 1101 SDL_OutOfMemory();