summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorTametomo <irarice@gmail.com>2009-07-24 09:33:14 -0600
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-14 22:09:04 +0100
commit0796cdac80def934f3a8504538a41ea118ebc75f (patch)
treee53ee35e16508309a59c55a4f5d740f81d976e6b /src/openglgraphics.cpp
parent4126672a610952629938a5b1affb220d3336f5ed (diff)
downloadMana-0796cdac80def934f3a8504538a41ea118ebc75f.tar.gz
Mana-0796cdac80def934f3a8504538a41ea118ebc75f.tar.bz2
Mana-0796cdac80def934f3a8504538a41ea118ebc75f.tar.xz
Mana-0796cdac80def934f3a8504538a41ea118ebc75f.zip
Removed a redundant SDL_Surface pointer
Signed-off-by: Tametomo <irarice@gmail.com>
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 59cc62d0..5b9c118d 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -70,7 +70,7 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel)
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- if (!(mScreen = SDL_SetVideoMode(w, h, bpp, displayFlags)))
+ if (!(mTarget = SDL_SetVideoMode(w, h, bpp, displayFlags)))
return false;
#ifdef __APPLE__
@@ -375,7 +375,7 @@ void OpenGLGraphics::_beginDraw()
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- glOrtho(0.0, (double)mScreen->w, (double)mScreen->h, 0.0, -1.0, 1.0);
+ glOrtho(0.0, (double)mTarget->w, (double)mTarget->h, 0.0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
@@ -384,7 +384,7 @@ void OpenGLGraphics::_beginDraw()
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- pushClipArea(gcn::Rectangle(0, 0, mScreen->w, mScreen->h));
+ pushClipArea(gcn::Rectangle(0, 0, mTarget->w, mTarget->h));
}
void OpenGLGraphics::_endDraw()
@@ -393,8 +393,8 @@ void OpenGLGraphics::_endDraw()
SDL_Surface* OpenGLGraphics::getScreenshot()
{
- int h = mScreen->h;
- int w = mScreen->w;
+ int h = mTarget->h;
+ int w = mTarget->w;
SDL_Surface *screenshot = SDL_CreateRGBSurface(
SDL_SWSURFACE,
@@ -449,7 +449,7 @@ bool OpenGLGraphics::pushClipArea(gcn::Rectangle area)
glPushMatrix();
glTranslatef(transX, transY, 0);
glScissor(mClipStack.top().x,
- mScreen->h - mClipStack.top().y - mClipStack.top().height,
+ mTarget->h - mClipStack.top().y - mClipStack.top().height,
mClipStack.top().width,
mClipStack.top().height);
@@ -465,7 +465,7 @@ void OpenGLGraphics::popClipArea()
glPopMatrix();
glScissor(mClipStack.top().x,
- mScreen->h - mClipStack.top().y - mClipStack.top().height,
+ mTarget->h - mClipStack.top().y - mClipStack.top().height,
mClipStack.top().width,
mClipStack.top().height);
}