Hello Michael,

thanks for sending the plain text files!

On 01/31/2012 12:44 PM, Michael Raab wrote:
Am 31.01.2012 16:55, schrieb Carsten Neumann:
On 01/31/2012 07:27 AM, Michael Raab wrote:
OpenGL trace is attached. A tried to capture 3 states:
- 1.) No shadows
- 2.) 1 shadow light source enabled
- 3.) shadow light source disabled

1) and 3) make identical OpenGL calls, so it seems the basic logic that no shadow related calculations happen when there are no light sources works. There is however an interesting difference in the beginning of the logs between case 1 and 2: in 2) glLightModelfv(GL_LIGHT_MODEL_AMBIENT, {0, 0, 0, 1}) is used to change the global ambient without it being restored AFAICT. Can you give the attached patch a try? It simply adds GL_LIGHTING_BIT to the glPushAttrib() call in DitherShadowMap::render() - so it will only work for that mode, the other probably need a similar adjustment.

        Cheers,
                Carsten
Index: Source/Experimental/ShadowViewport/OSGDitherShadowMap.cpp
===================================================================
RCS file: /cvsroot/opensg/OpenSG/Source/Experimental/ShadowViewport/OSGDitherShadowMap.cpp,v
retrieving revision 1.44
diff -u -r1.44 OSGDitherShadowMap.cpp
--- Source/Experimental/ShadowViewport/OSGDitherShadowMap.cpp	12 Dec 2011 23:49:52 -0000	1.44
+++ Source/Experimental/ShadowViewport/OSGDitherShadowMap.cpp	31 Jan 2012 20:54:48 -0000
@@ -2856,7 +2856,7 @@
         _shadowVP->Viewport::render(action);
     else
     {
-        glPushAttrib(GL_ENABLE_BIT);
+        glPushAttrib(GL_ENABLE_BIT | GL_LIGHTING_BIT);
 
         if(!_initTexturesDone)
             initTextures(win);
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to