Hello Michael, sorry for the delay, I was travelling last week.
On 01/25/2012 07:38 AM, Michael Raab wrote: > I'm having some trouble with ShadowViewport. > I'm trying to find a way to enable/disable shadows in our application and to > dynamically add/remove light sources of interest. At a first look that works > well but not in details. I've attached some screenshots. > Img1: Shows a test scene rendered by ShadowViewport with no light nodes > attached > Img2: Shows scene rendered by ShadowViewport with a light node attached > > If I remove the one attached light node the rendered image shows no > difference. I tried to debug but all I see is that _light list in > ShadowViewport becomes empty (as expected). I have no idea what went wrong... > Maybe something is not properly reset when adding/removing light > sources/nodes... a couple of questions: - which mode are you using for the ShadowViewport? - I assume you have setAutoSearchForLights(false) set? - Does it make a difference if you do beginEditCP(svp, ShadowViewport::MapAutoUpdateFieldMask); endEditCP(svp, ShadowViewport::MapAutoUpdateFieldMask); just to trigger an update on the SVP? If _lights is updated correctly and becomes empty ShadowViewport::render() actually calls StereoBufferViewport::render() (see OSGShadowViewport.cpp:622) and does not do any of the shadow processing nor calls into the active TreeRenderer (subclasses of this implement the different shadow algorithms). Strange. Would it be possible for you to send me OpenGL command traces corresponding to the cases shown in the images? Perhaps that gives a hint why they look different... Cheers, Carsten ------------------------------------------------------------------------------ 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