diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-26 00:19:48 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-26 00:19:48 +0000 |
commit | b5d6f027234d534a4bee810932abb571c5c535dd (patch) | |
tree | 7580cc85f4a14f885c2087af8891970b1daa6e3d /src | |
parent | 4e8bd0fea89f60864300d7f177cc5aa756cf6f6f (diff) | |
download | mana-b5d6f027234d534a4bee810932abb571c5c535dd.tar.gz mana-b5d6f027234d534a4bee810932abb571c5c535dd.tar.bz2 mana-b5d6f027234d534a4bee810932abb571c5c535dd.tar.xz mana-b5d6f027234d534a4bee810932abb571c5c535dd.zip |
Use glTranslatef instead of glTranslated. Remove some useless code.
Diffstat (limited to 'src')
-rw-r--r-- | src/openglgraphics.cpp | 45 |
1 files changed, 4 insertions, 41 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index c73bcdff..1c43703f 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -110,46 +110,21 @@ void OpenGLGraphics::updateScreen() void OpenGLGraphics::_beginDraw() { - glPushAttrib( - GL_COLOR_BUFFER_BIT | - GL_CURRENT_BIT | - GL_DEPTH_BUFFER_BIT | - GL_ENABLE_BIT | - GL_FOG_BIT | - GL_LIGHTING_BIT | - GL_LINE_BIT | - GL_POINT_BIT | - GL_POLYGON_BIT | - GL_SCISSOR_BIT | - GL_STENCIL_BUFFER_BIT | - GL_TEXTURE_BIT | - GL_TRANSFORM_BIT - ); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadIdentity(); - glMatrixMode(GL_TEXTURE); - glPushMatrix(); glLoadIdentity(); glMatrixMode(GL_PROJECTION); - glPushMatrix(); glLoadIdentity(); glOrtho(0.0, (double)mScreen->w, (double)mScreen->h, 0.0, -1.0, 1.0); - glDisable(GL_LIGHTING); - glDisable(GL_CULL_FACE); - glDisable(GL_DEPTH_TEST); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); glEnable(GL_SCISSOR_TEST); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -160,18 +135,6 @@ void OpenGLGraphics::_beginDraw() void OpenGLGraphics::_endDraw() { - glMatrixMode(GL_MODELVIEW); - glPopMatrix(); - - glMatrixMode(GL_TEXTURE); - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - glPopAttrib(); - - popClipArea(); } bool OpenGLGraphics::pushClipArea(gcn::Rectangle area) @@ -189,7 +152,7 @@ bool OpenGLGraphics::pushClipArea(gcn::Rectangle area) transX += mClipStack.top().x; transY += mClipStack.top().y; - glTranslated(transX, transY, 0); + glTranslatef(transX, transY, 0); glScissor(mClipStack.top().x, mScreen->h - mClipStack.top().y - mClipStack.top().height, mClipStack.top().width, @@ -213,7 +176,7 @@ void OpenGLGraphics::popClipArea() transX += mClipStack.top().x; transY += mClipStack.top().y; - glTranslated(transX, transY, 0); + glTranslatef(transX, transY, 0); glScissor(mClipStack.top().x, mScreen->h - mClipStack.top().y - mClipStack.top().height, mClipStack.top().width, |