diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/openglgraphics.cpp | 16 |
2 files changed, 14 insertions, 8 deletions
@@ -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, |