summaryrefslogtreecommitdiff
path: root/src/safeopenglgraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/safeopenglgraphics.cpp')
-rw-r--r--src/safeopenglgraphics.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/safeopenglgraphics.cpp b/src/safeopenglgraphics.cpp
index f04ffb3bc..fcb97a398 100644
--- a/src/safeopenglgraphics.cpp
+++ b/src/safeopenglgraphics.cpp
@@ -401,8 +401,8 @@ void SafeOpenGLGraphics::_beginDraw()
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- glOrtho(0.0, static_cast<double>(mWindow->w),
- static_cast<double>(mWindow->h), 0.0, -1.0, 1.0);
+ glOrtho(0.0, static_cast<double>(mRect.w),
+ static_cast<double>(mRect.h), 0.0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
@@ -420,7 +420,7 @@ void SafeOpenGLGraphics::_beginDraw()
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- pushClipArea(gcn::Rectangle(0, 0, mWindow->w, mWindow->h));
+ pushClipArea(gcn::Rectangle(0, 0, mRect.w, mRect.h));
}
void SafeOpenGLGraphics::_endDraw()
@@ -431,13 +431,13 @@ void SafeOpenGLGraphics::_endDraw()
void SafeOpenGLGraphics::prepareScreenshot()
{
if (config.getBoolValue("usefbo"))
- graphicsManager.createFBO(mWindow->w, mWindow->h, &mFbo);
+ graphicsManager.createFBO(mRect.w, mRect.h, &mFbo);
}
SDL_Surface* SafeOpenGLGraphics::getScreenshot()
{
- const int h = mWindow->h;
- const int w = mWindow->w - (mWindow->w % 4);
+ const int h = mRect.h;
+ const int w = mRect.w - (mRect.w % 4);
GLint pack = 1;
SDL_Surface *const screenshot = SDL_CreateRGBSurface(
@@ -504,7 +504,7 @@ bool SafeOpenGLGraphics::pushClipArea(gcn::Rectangle area)
glPushMatrix();
glTranslatef(static_cast<GLfloat>(transX),
static_cast<GLfloat>(transY), 0);
- glScissor(clipArea.x, mWindow->h - clipArea.y - clipArea.height,
+ glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height,
clipArea.width, clipArea.height);
return result;
@@ -519,7 +519,7 @@ void SafeOpenGLGraphics::popClipArea()
glPopMatrix();
const gcn::ClipRectangle &clipArea = mClipStack.top();
- glScissor(clipArea.x, mWindow->h - clipArea.y - clipArea.height,
+ glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height,
clipArea.width, clipArea.height);
}