summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-31 08:32:16 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-31 08:32:16 +0000
commitdbe0cc7c8442adacb7799294ce6e4409d59657e5 (patch)
tree8c0653325da40a3e113d50002e9d05a2a2137fc1
parent505fa377142c84d93ced9a405348990c0cbdc078 (diff)
downloadmana-dbe0cc7c8442adacb7799294ce6e4409d59657e5.tar.gz
mana-dbe0cc7c8442adacb7799294ce6e4409d59657e5.tar.bz2
mana-dbe0cc7c8442adacb7799294ce6e4409d59657e5.tar.xz
mana-dbe0cc7c8442adacb7799294ce6e4409d59657e5.zip
Fix push/pop clip area, also fixes the broken scrollareas.
-rw-r--r--ChangeLog6
-rw-r--r--src/openglgraphics.cpp16
2 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index d4a28d23..21343def 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-31 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/openglgraphics.cpp: Fix push/pop of clip area, we need to
+ translate using the x/y offset, not the x/y coordinates of the clip
+ area. This fixes the broken scrollareas.
+
2005-08-30 Eugenio Favalli <elvenprogrammer@gmail.com>
* The Mana World.dev: Updated project file.
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index cc85c0ef..00449d3f 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -140,14 +140,14 @@ bool OpenGLGraphics::pushClipArea(gcn::Rectangle area)
int transY = 0;
if (!mClipStack.empty()) {
- transX = -mClipStack.top().x;
- transY = -mClipStack.top().y;
+ transX = -mClipStack.top().xOffset;
+ transY = -mClipStack.top().yOffset;
}
bool result = gcn::Graphics::pushClipArea(area);
- transX += mClipStack.top().x;
- transY += mClipStack.top().y;
+ transX += mClipStack.top().xOffset;
+ transY += mClipStack.top().yOffset;
glTranslatef(transX, transY, 0);
glScissor(mClipStack.top().x,
@@ -160,8 +160,8 @@ bool OpenGLGraphics::pushClipArea(gcn::Rectangle area)
void OpenGLGraphics::popClipArea()
{
- int transX = -mClipStack.top().x;
- int transY = -mClipStack.top().y;
+ int transX = -mClipStack.top().xOffset;
+ int transY = -mClipStack.top().yOffset;
gcn::Graphics::popClipArea();
@@ -170,8 +170,8 @@ void OpenGLGraphics::popClipArea()
return;
}
- transX += mClipStack.top().x;
- transY += mClipStack.top().y;
+ transX += mClipStack.top().xOffset;
+ transY += mClipStack.top().yOffset;
glTranslatef(transX, transY, 0);
glScissor(mClipStack.top().x,