summaryrefslogtreecommitdiff
path: root/src
diff options
authorLoïc Molinari <loic.molinari@canonical.com>2011-01-31 13:12:23 +0100
committerLoïc Molinari <loic.molinari@canonical.com>2011-01-31 13:12:23 +0100
commit4fb854dedbf0647563350ce350a474997a1dcfb1 (patch)
tree2a43268e45bb903dfcb19da08a107e2bcafd5059 /src
parent27a5c813c184ee469c1a1041ed1883793a366d35 (diff)
[rendering] Disabled the OpenGL lighting bit
modified: src/unityshell.cpp - Disabled the OpenGL lighting bit that was leaked by other plugins slowing down rendering and potentially causing rendering issues. - Worked around an NVIDIA Push/Pop Attrib bug. (bzr r800.1.1)
Diffstat (limited to 'src')
-rw-r--r--src/unityshell.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/unityshell.cpp b/src/unityshell.cpp
index a6d094ee2..d7fe228e1 100644
--- a/src/unityshell.cpp
+++ b/src/unityshell.cpp
@@ -58,6 +58,13 @@ static UnityScreen *uScreen = 0;
void
UnityScreen::nuxPrologue ()
{
+ /* Vertex lighting isn't used in Unity, we disable that state as it could have
+ * been leaked by another plugin. That should theoretically be switched off
+ * right after PushAttrib since ENABLE_BIT is meant to restore the LIGHTING
+ * bit, but we do that here in order to workaround a bug (?) in the NVIDIA
+ * drivers (lp:703140). */
+ glDisable (GL_LIGHTING);
+
/* reset matrices */
glPushAttrib (GL_VIEWPORT_BIT | GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_COLOR_BUFFER_BIT);