comparison src/video/windib/SDL_dibvideo.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
482 RECT bounds; 482 RECT bounds;
483 int x, y; 483 int x, y;
484 Uint32 Rmask, Gmask, Bmask; 484 Uint32 Rmask, Gmask, Bmask;
485 485
486 /* Clean up any GL context that may be hanging around */ 486 /* Clean up any GL context that may be hanging around */
487 if ( current->flags & SDL_OPENGL ) { 487 if ( current->flags & SDL_INTERNALOPENGL ) {
488 WIN_GL_ShutDown(this); 488 WIN_GL_ShutDown(this);
489 } 489 }
490 SDL_resizing = 1; 490 SDL_resizing = 1;
491 491
492 /* Recalculate the bitmasks if necessary */ 492 /* Recalculate the bitmasks if necessary */
684 684
685 /* Delete the old bitmap if necessary */ 685 /* Delete the old bitmap if necessary */
686 if ( screen_bmp != NULL ) { 686 if ( screen_bmp != NULL ) {
687 DeleteObject(screen_bmp); 687 DeleteObject(screen_bmp);
688 } 688 }
689 if ( ! (flags & SDL_OPENGL) ) { 689 if ( ! (flags & SDL_INTERNALOPENGL) ) {
690 BOOL is16bitmode = (video->format->BytesPerPixel == 2); 690 BOOL is16bitmode = (video->format->BytesPerPixel == 2);
691 691
692 /* Suss out the bitmap info header */ 692 /* Suss out the bitmap info header */
693 binfo_size = sizeof(*binfo); 693 binfo_size = sizeof(*binfo);
694 if( is16bitmode ) { 694 if( is16bitmode ) {
812 SetForegroundWindow(SDL_Window); 812 SetForegroundWindow(SDL_Window);
813 } 813 }
814 SDL_resizing = 0; 814 SDL_resizing = 0;
815 815
816 /* Set up for OpenGL */ 816 /* Set up for OpenGL */
817 if ( flags & SDL_OPENGL ) { 817 if ( flags & SDL_INTERNALOPENGL ) {
818 if ( WIN_GL_SetupWindow(this) < 0 ) { 818 if ( WIN_GL_SetupWindow(this) < 0 ) {
819 return(NULL); 819 return(NULL);
820 } 820 }
821 video->flags |= SDL_OPENGL; 821 video->flags |= SDL_INTERNALOPENGL;
822 } 822 }
823 823
824 /* JC 14 Mar 2006 824 /* JC 14 Mar 2006
825 Flush the message loop or this can cause big problems later 825 Flush the message loop or this can cause big problems later
826 Especially if the user decides to use dialog boxes or assert()! 826 Especially if the user decides to use dialog boxes or assert()!
1033 if ( this->screen->flags & SDL_FULLSCREEN ) { 1033 if ( this->screen->flags & SDL_FULLSCREEN ) {
1034 ChangeDisplaySettings(NULL, 0); 1034 ChangeDisplaySettings(NULL, 0);
1035 ShowWindow(SDL_Window, SW_HIDE); 1035 ShowWindow(SDL_Window, SW_HIDE);
1036 } 1036 }
1037 #endif 1037 #endif
1038 if ( this->screen->flags & SDL_OPENGL ) { 1038 if ( this->screen->flags & SDL_INTERNALOPENGL ) {
1039 WIN_GL_ShutDown(this); 1039 WIN_GL_ShutDown(this);
1040 } 1040 }
1041 this->screen->pixels = NULL; 1041 this->screen->pixels = NULL;
1042 } 1042 }
1043 if ( screen_bmp ) { 1043 if ( screen_bmp ) {