summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-26 00:19:48 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-26 00:19:48 +0000
commitb5d6f027234d534a4bee810932abb571c5c535dd (patch)
tree7580cc85f4a14f885c2087af8891970b1daa6e3d
parent4e8bd0fea89f60864300d7f177cc5aa756cf6f6f (diff)
downloadmana-client-b5d6f027234d534a4bee810932abb571c5c535dd.tar.gz
mana-client-b5d6f027234d534a4bee810932abb571c5c535dd.tar.bz2
mana-client-b5d6f027234d534a4bee810932abb571c5c535dd.tar.xz
mana-client-b5d6f027234d534a4bee810932abb571c5c535dd.zip
Use glTranslatef instead of glTranslated. Remove some useless code.
-rw-r--r--ChangeLog5
-rw-r--r--src/openglgraphics.cpp45
2 files changed, 9 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index 1562ea3e..92390d35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-26 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/openglgraphics.cpp: Use glTranslatef instead of glTranslated.
+ Remove some useless code.
+
2005-08-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
* ChangeLog: Fixed line length using tab size of 8.
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,