From 4fb854dedbf0647563350ce350a474997a1dcfb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Molinari?= Date: Mon, 31 Jan 2011 13:12:23 +0100 Subject: [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) --- src/unityshell.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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); -- cgit v1.2.3