Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11video.c @ 1658:e49147870aac SDL-1.3
glSDL support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 01 May 2006 06:58:33 +0000 |
parents | 0a53c90a37f9 |
children | 14717b52abc0 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.c Fri Apr 28 16:55:41 2006 +0000 +++ b/src/video/x11/SDL_x11video.c Mon May 01 06:58:33 2006 +0000 @@ -585,7 +585,7 @@ { /* Clean up OpenGL */ if ( screen ) { - screen->flags &= ~SDL_OPENGL; + screen->flags &= ~SDL_INTERNALOPENGL; } X11_GL_Shutdown(this); @@ -791,7 +791,7 @@ } /* find out which visual we are going to use */ - if ( flags & SDL_OPENGL ) { + if ( flags & SDL_INTERNALOPENGL ) { XVisualInfo *vi; vi = X11_GL_GetVisual(this); @@ -904,7 +904,7 @@ /* Create (or use) the X11 display window */ if ( !SDL_windowid ) { - if ( flags & SDL_OPENGL ) { + if ( flags & SDL_INTERNALOPENGL ) { if ( X11_GL_CreateWindow(this, w, h) < 0 ) { return(-1); } @@ -927,11 +927,11 @@ | PointerMotionMask | ExposureMask )); } /* Create the graphics context here, once we have a window */ - if ( flags & SDL_OPENGL ) { + if ( flags & SDL_INTERNALOPENGL ) { if ( X11_GL_CreateContext(this) < 0 ) { return(-1); } else { - screen->flags |= SDL_OPENGL; + screen->flags |= SDL_INTERNALOPENGL; } } else { XGCValues gcv; @@ -946,7 +946,7 @@ } /* Set our colormaps when not setting a GL mode */ - if ( ! (flags & SDL_OPENGL) ) { + if ( ! (flags & SDL_INTERNALOPENGL) ) { XSetWindowColormap(SDL_Display, SDL_Window, SDL_XColorMap); if( !SDL_windowid ) { XSetWindowColormap(SDL_Display, FSwindow, SDL_XColorMap); @@ -1063,7 +1063,7 @@ /* Set up the X11 window */ saved_flags = current->flags; - if ( (SDL_Window) && ((saved_flags&SDL_OPENGL) == (flags&SDL_OPENGL)) + if ( (SDL_Window) && ((saved_flags&SDL_INTERNALOPENGL) == (flags&SDL_INTERNALOPENGL)) && (bpp == current->format->BitsPerPixel) && ((saved_flags&SDL_NOFRAME) == (flags&SDL_NOFRAME)) ) { if (X11_ResizeWindow(this, current, width, height, flags) < 0) { @@ -1079,7 +1079,7 @@ /* Set up the new mode framebuffer */ if ( ((current->w != width) || (current->h != height)) || - ((saved_flags&SDL_OPENGL) != (flags&SDL_OPENGL)) ) { + ((saved_flags&SDL_INTERNALOPENGL) != (flags&SDL_INTERNALOPENGL)) ) { current->w = width; current->h = height; current->pitch = SDL_CalculatePitch(current);