Mercurial > sdl-ios-xcode
diff src/video/wincommon/SDL_wingl.c @ 1737:eacc5bc01d1c
Implemented bug #5
Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 27 Apr 2006 08:39:51 +0000 |
parents | 3b2a92126f4d |
children | c67921b517c3 |
line wrap: on
line diff
--- a/src/video/wincommon/SDL_wingl.c Thu Apr 27 07:59:16 2006 +0000 +++ b/src/video/wincommon/SDL_wingl.c Thu Apr 27 08:39:51 2006 +0000 @@ -290,6 +290,11 @@ *iAttr++ = this->gl_config.multisamplesamples; } + if ( this->gl_config.accelerated >= 0 ) { + *iAttr++ = WGL_ACCELERATION_ARB; + *iAttr++ = (this->gl_config.accelerated ? WGL_GENERIC_ACCELERATION_ARB : WGL_NO_ACCELERATION_ARB); + } + *iAttr = 0; /* Choose and set the closest available pixel format */ @@ -442,6 +447,16 @@ case SDL_GL_MULTISAMPLESAMPLES: wgl_attrib = WGL_SAMPLES_ARB; break; + case SDL_GL_ACCELERATED_VISUAL: + wgl_attrib = WGL_ACCELERATION_ARB; + this->gl_data->wglGetPixelFormatAttribivARB(GL_hdc, pixel_format, 0, 1, &wgl_attrib, value); + if ( *value == WGL_NO_ACCELERATION_ARB ) { + *value = SDL_FALSE; + } else { + *value = SDL_TRUE; + } + return 0; + break; case SDL_GL_SWAP_CONTROL: if ( this->gl_data->wglGetSwapIntervalEXT ) { return this->gl_data->wglGetSwapIntervalEXT();