- attempt to improve rendering speed

This commit is contained in:
Mark Vejvoda
2010-07-06 13:26:23 +00:00
parent c04b83259e
commit aecc708942
4 changed files with 232 additions and 0 deletions

View File

@@ -52,6 +52,8 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits) {
Window::setIsFullScreen(false);
}
//flags |= SDL_HWSURFACE
int resW = PlatformCommon::Private::ScreenWidth;
int resH = PlatformCommon::Private::ScreenHeight;

View File

@@ -346,6 +346,7 @@ void Window::setupGraphicsScreen(int depthBits, int stencilBits) {
if(stencilBits >= 0)
newStencilBits = stencilBits;
//SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 1);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 1);