summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-08-15 18:01:14 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-08-15 18:01:14 +0800
commit7eb754f46ed51fe66d7e48b4ffb83fc9e45040c8 (patch)
tree884d5c7d76e01706ea892137f7c2d2474b003476
parent6bae6166447e154ea046c524cccc23dcd639da02 (diff)
downloadcubeaddon-7eb754f46ed51fe66d7e48b4ffb83fc9e45040c8.tar.gz
cubeaddon-7eb754f46ed51fe66d7e48b4ffb83fc9e45040c8.tar.bz2
Account for core changes
-rw-r--r--src/cubeaddon.cpp21
-rw-r--r--src/cubeaddon.h2
2 files changed, 17 insertions, 6 deletions
diff --git a/src/cubeaddon.cpp b/src/cubeaddon.cpp
index 0b8bd8e..b806c6f 100644
--- a/src/cubeaddon.cpp
+++ b/src/cubeaddon.cpp
@@ -930,6 +930,18 @@ CubeaddonWindow::glDrawTexture (GLTexture *texture,
gWindow->glDrawTexture (texture, attrib, mask);
}
+bool
+CubeaddonScreen::cubeShouldPaintAllViewports ()
+{
+ bool status = cubeScreen->cubeShouldPaintAllViewports ();
+ return (!optionGetDrawTop () ||
+ !optionGetDrawBottom () ||
+ (optionGetTopColorAlpha () != OPAQUE) ||
+ (optionGetBottomColorAlpha () != OPAQUE) ||
+ (mDeform > 0.0) ||
+ status);
+}
+
void
CubeaddonScreen::glPaintTransformedOutput (const GLScreenPaintAttrib &sAttrib,
const GLMatrix &transform,
@@ -979,12 +991,7 @@ CubeaddonScreen::glPaintTransformedOutput (const GLScreenPaintAttrib &sAttrib,
mDeform = 0.0;
}
- cubeScreen->paintAllViewports (cubeScreen->paintAllViewports () ||
- !optionGetDrawTop () ||
- !optionGetDrawBottom () ||
- (optionGetTopColorAlpha () != OPAQUE) ||
- (optionGetBottomColorAlpha () != OPAQUE) ||
- (mDeform > 0.0));
+ cubeScreen->cubeShouldPaintAllViewportsSetEnabled (this, true);
if (mCapDistance != cDist)
{
@@ -1325,6 +1332,8 @@ CubeaddonScreen::glPaintTransformedOutput (const GLScreenPaintAttrib &sAttrib,
cubeScreen->repaintCaps ();
mReflection = false;
}
+ else
+ cubeScreen->cubeShouldPaintAllViewportsSetEnabled (this, false);
if (!optionGetReflection ())
{
diff --git a/src/cubeaddon.h b/src/cubeaddon.h
index 4c899b0..45933a0 100644
--- a/src/cubeaddon.h
+++ b/src/cubeaddon.h
@@ -89,6 +89,8 @@ class CubeaddonScreen :
const GLMatrix &transform,
CompOutput *output,
PaintOrder order);
+
+ bool cubeShouldPaintAllViewports ();
class CubeCap
{