diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-17 22:39:16 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-17 22:39:16 +0200 |
commit | 347e86a98aed04c6869b122c201506476eb3890e (patch) | |
tree | 63a34bb8dcfb6e4f7a7d49b822d614863f8717ad | |
parent | 7111ae12125eb810d396045417558769e73a7fb7 (diff) | |
download | mana-347e86a98aed04c6869b122c201506476eb3890e.tar.gz mana-347e86a98aed04c6869b122c201506476eb3890e.tar.bz2 mana-347e86a98aed04c6869b122c201506476eb3890e.tar.xz mana-347e86a98aed04c6869b122c201506476eb3890e.zip |
Fixed pixel alignment drawing glitches in OpenGL mode
At some window sizes, lines would flicker in between the tiles. This
happened when the window size was not dividable by the scaling factor.
Fixed by setting a slightly smaller viewport in this case (which will
hopefully not cause other issues).
-rw-r--r-- | src/openglgraphics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index 65e24e51..ac412334 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -116,7 +116,7 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel) #endif // Setup OpenGL - glViewport(0, 0, w, h); + glViewport(0, 0, mWidth * mScale, mHeight * mScale); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); int gotDoubleBuffer; SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &gotDoubleBuffer); |