summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/openglgraphics.cpp9
2 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index bba0ff46..792a3ca5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-17 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/openglgraphics.cpp: Use gl{Push,Pop}Matrix instead of
+ calculating offsets, cause the values are stored as float and aren't
+ accurate enough.
+
2005-09-17 Eugenio Favalli <elvenprogrammer@gmail.com>
* The Mana World.dev, src/gui/skill.cpp: Updated to last changes, and
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 00449d3f..86bb734a 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -149,6 +149,7 @@ bool OpenGLGraphics::pushClipArea(gcn::Rectangle area)
transX += mClipStack.top().xOffset;
transY += mClipStack.top().yOffset;
+ glPushMatrix();
glTranslatef(transX, transY, 0);
glScissor(mClipStack.top().x,
mScreen->h - mClipStack.top().y - mClipStack.top().height,
@@ -160,9 +161,6 @@ bool OpenGLGraphics::pushClipArea(gcn::Rectangle area)
void OpenGLGraphics::popClipArea()
{
- int transX = -mClipStack.top().xOffset;
- int transY = -mClipStack.top().yOffset;
-
gcn::Graphics::popClipArea();
if (mClipStack.empty())
@@ -170,10 +168,7 @@ void OpenGLGraphics::popClipArea()
return;
}
- transX += mClipStack.top().xOffset;
- transY += mClipStack.top().yOffset;
-
- glTranslatef(transX, transY, 0);
+ glPopMatrix();
glScissor(mClipStack.top().x,
mScreen->h - mClipStack.top().y - mClipStack.top().height,
mClipStack.top().width,