diff options
author | Alejandro Marzini | 2010-07-18 05:32:44 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-18 05:32:44 +0000 |
commit | 03d66c401214ecc02021b00d42ade314c16e0201 (patch) | |
tree | 81dc4e22b60a241098a2c30766892f363c275c48 /backends/graphics/openglsdl | |
parent | 492569a7a20d17cfac5fedf1eec1876e53a2767c (diff) | |
download | scummvm-rg350-03d66c401214ecc02021b00d42ade314c16e0201.tar.gz scummvm-rg350-03d66c401214ecc02021b00d42ade314c16e0201.tar.bz2 scummvm-rg350-03d66c401214ecc02021b00d42ade314c16e0201.zip |
Fixed rect size when drawing npot textures. Added OpenGL attr for SDL.
svn-id: r50979
Diffstat (limited to 'backends/graphics/openglsdl')
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 98e67d2e78..99468b1447 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -127,6 +127,13 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() { _videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor; _videoMode.hardwareHeight = _videoMode.screenHeight * _videoMode.scaleFactor; + // Setup OpenGL attributes for SDL + SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + _hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 32, _videoMode.fullscreen ? (SDL_FULLSCREEN | SDL_OPENGL) : SDL_OPENGL ); |