Fix drawing of Cube3D on the ApplicationOverlay

This seems to break because the ApplicationOverlay is drawn to a texture
buffer first, which is incompatible with the DeferredLightingEffect
implementation.
This commit is contained in:
Ryan Huffman 2014-12-17 16:40:04 -08:00
parent a0623c930b
commit 27e13385ed

View file

@ -74,7 +74,11 @@ void Cube3DOverlay::render(RenderArgs* args) {
glPushMatrix();
glColor4f(1.0f, 1.0f, 1.0f, alpha);
glScalef(dimensions.x * _borderSize, dimensions.y * _borderSize, dimensions.z * _borderSize);
Application::getInstance()->getDeferredLightingEffect()->renderSolidCube(1.0f);
if (_drawOnApplicationOverlay) {
glutSolidCube(1.0f);
} else {
Application::getInstance()->getDeferredLightingEffect()->renderSolidCube(1.0f);
}
glPopMatrix();
glDepthMask(GL_TRUE);
}
@ -82,7 +86,11 @@ void Cube3DOverlay::render(RenderArgs* args) {
glPushMatrix();
glColor4f(color.red / MAX_COLOR, color.green / MAX_COLOR, color.blue / MAX_COLOR, alpha);
glScalef(dimensions.x, dimensions.y, dimensions.z);
Application::getInstance()->getDeferredLightingEffect()->renderSolidCube(1.0f);
if (_drawOnApplicationOverlay) {
glutSolidCube(1.0f);
} else {
Application::getInstance()->getDeferredLightingEffect()->renderSolidCube(1.0f);
}
glPopMatrix();
} else {
glLineWidth(_lineWidth);