Mercurial > sdl-ios-xcode
comparison src/video/windx5/SDL_dx5video.c @ 1658:e49147870aac SDL-1.3
glSDL support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 01 May 2006 06:58:33 +0000 |
parents | 8d9bb0cf2c2a |
children | 14717b52abc0 |
comparison
equal
deleted
inserted
replaced
1657:5b0805ceb50f | 1658:e49147870aac |
---|---|
1029 SDL_primary = NULL; | 1029 SDL_primary = NULL; |
1030 } | 1030 } |
1031 | 1031 |
1032 #ifndef NO_CHANGEDISPLAYSETTINGS | 1032 #ifndef NO_CHANGEDISPLAYSETTINGS |
1033 /* Unset any previous OpenGL fullscreen mode */ | 1033 /* Unset any previous OpenGL fullscreen mode */ |
1034 if ( (current->flags & (SDL_OPENGL|SDL_FULLSCREEN)) == | 1034 if ( (current->flags & (SDL_INTERNALOPENGL|SDL_FULLSCREEN)) == |
1035 (SDL_OPENGL|SDL_FULLSCREEN) ) { | 1035 (SDL_INTERNALOPENGL|SDL_FULLSCREEN) ) { |
1036 ChangeDisplaySettings(NULL, 0); | 1036 ChangeDisplaySettings(NULL, 0); |
1037 } | 1037 } |
1038 #endif | 1038 #endif |
1039 | 1039 |
1040 /* Clean up any GL context that may be hanging around */ | 1040 /* Clean up any GL context that may be hanging around */ |
1041 if ( current->flags & SDL_OPENGL ) { | 1041 if ( current->flags & SDL_INTERNALOPENGL ) { |
1042 WIN_GL_ShutDown(this); | 1042 WIN_GL_ShutDown(this); |
1043 } | 1043 } |
1044 | 1044 |
1045 /* If we are setting a GL mode, use GDI, not DirectX (yuck) */ | 1045 /* If we are setting a GL mode, use GDI, not DirectX (yuck) */ |
1046 if ( flags & SDL_OPENGL ) { | 1046 if ( flags & SDL_INTERNALOPENGL ) { |
1047 Uint32 Rmask, Gmask, Bmask; | 1047 Uint32 Rmask, Gmask, Bmask; |
1048 | 1048 |
1049 /* Recalculate the bitmasks if necessary */ | 1049 /* Recalculate the bitmasks if necessary */ |
1050 if ( bpp == current->format->BitsPerPixel ) { | 1050 if ( bpp == current->format->BitsPerPixel ) { |
1051 video = current; | 1051 video = current; |
1213 | 1213 |
1214 /* Set up for OpenGL */ | 1214 /* Set up for OpenGL */ |
1215 if ( WIN_GL_SetupWindow(this) < 0 ) { | 1215 if ( WIN_GL_SetupWindow(this) < 0 ) { |
1216 return(NULL); | 1216 return(NULL); |
1217 } | 1217 } |
1218 video->flags |= SDL_OPENGL; | 1218 video->flags |= SDL_INTERNALOPENGL; |
1219 return(video); | 1219 return(video); |
1220 } | 1220 } |
1221 | 1221 |
1222 /* Set the appropriate window style */ | 1222 /* Set the appropriate window style */ |
1223 style = GetWindowLong(SDL_Window, GWL_STYLE); | 1223 style = GetWindowLong(SDL_Window, GWL_STYLE); |
2359 int i, j; | 2359 int i, j; |
2360 | 2360 |
2361 /* If we're fullscreen GL, we need to reset the display */ | 2361 /* If we're fullscreen GL, we need to reset the display */ |
2362 if ( this->screen != NULL ) { | 2362 if ( this->screen != NULL ) { |
2363 #ifndef NO_CHANGEDISPLAYSETTINGS | 2363 #ifndef NO_CHANGEDISPLAYSETTINGS |
2364 if ( (this->screen->flags & (SDL_OPENGL|SDL_FULLSCREEN)) == | 2364 if ( (this->screen->flags & (SDL_INTERNALOPENGL|SDL_FULLSCREEN)) == |
2365 (SDL_OPENGL|SDL_FULLSCREEN) ) { | 2365 (SDL_INTERNALOPENGL|SDL_FULLSCREEN) ) { |
2366 ChangeDisplaySettings(NULL, 0); | 2366 ChangeDisplaySettings(NULL, 0); |
2367 ShowWindow(SDL_Window, SW_HIDE); | 2367 ShowWindow(SDL_Window, SW_HIDE); |
2368 } | 2368 } |
2369 #endif | 2369 #endif |
2370 if ( this->screen->flags & SDL_OPENGL ) { | 2370 if ( this->screen->flags & SDL_INTERNALOPENGL ) { |
2371 WIN_GL_ShutDown(this); | 2371 WIN_GL_ShutDown(this); |
2372 } | 2372 } |
2373 } | 2373 } |
2374 | 2374 |
2375 /* Free any palettes we used */ | 2375 /* Free any palettes we used */ |