Re: [osg-users] Bug: Light management and slave cameras

2009-01-28 Thread Alexandre Amalric
Hi Robert, Thank you for all those explanation, it's all make sense now. You're perfectly right when you say that I want manage my own lighting, that's why I told the viewer to bet set up with NO_LIGHT. I'm gonna update my svn version from OSG and try the fix in my own application. Kind regards,

Re: [osg-users] Bug: Light management and slave cameras

2009-01-28 Thread Alexandre Amalric
Hi Robert, Sorry I've made in mistake with attaching an erronous file, here is the file producing the bug. 2009/1/28 Alexandre Amalric alex.pix...@gmail.com Hi Robert, sorry to bother you again but it seems that the fix you've merged works for the previous osgLight.cpp file I have sent to

Re: [osg-users] Bug: Light management and slave cameras

2009-01-28 Thread Alexandre Amalric
Hi Robert, sorry to bother you again but it seems that the fix you've merged works for the previous osgLight.cpp file I have sent to you but not for my application. So I decided to write another osgLight.cpp (attached) file wich is more like my application lighting setup. The bug is appearring

Re: [osg-users] Bug: Light management and slave cameras

2009-01-28 Thread Robert Osfield
Hi Alexandre, Curious. If I comment out the view-setLightingMode(osg::View::NO_LIGHT); everything works as your scene graph sets out. But with no viewer light set it doesn't work... I suspect much of these problems come about because to get osgViewer up and running more quickly I choose to

Re: [osg-users] Bug: Light management and slave cameras

2009-01-28 Thread Alexandre Amalric
Hi Robert, *If I comment out the view-setLightingMode(osg::View::NO_LIGHT); everything works as your scene graph sets out *That's what I do to make it works for the time being. *In your own code just don't bother the setting anything in view w.r.t lighting, just set it up in your own scene

Re: [osg-users] Bug: Light management and slave cameras

2009-01-28 Thread Robert Osfield
Hi Alexandre, I've now figured out what is going wrong, and just with GL_LIGHTING management not being correct in SceneView and in your own app, the same also applies to GL_LIGHT0 which you wasn't been managed correctly in SceneView, and not correctly in your osglight.cpp. I fixed the problem in

Re: [osg-users] Bug: Light management and slave cameras

2009-01-27 Thread Robert Osfield
Hi Alexande, FYI, I'm now looking at this issue. It does look like a bug, I haven't characterised the problem yet though... Robert. On Mon, Jan 26, 2009 at 4:42 PM, Alexandre Amalric alex.pix...@gmail.com wrote: Hi Robert, thank you for according some time to this case, it's very important

Re: [osg-users] Bug: Light management and slave cameras

2009-01-27 Thread Robert Osfield
Hi Alexandre, I have some intial finding w.r.t the lighting turning off in the scene when you use: view-setLightingMode(osg::View::NO_LIGHT); The reason why this unlights the scene, is because the scene graph setup lacks any enabling of GL_LIGHTING, and it was only visible because when

Re: [osg-users] Bug: Light management and slave cameras

2009-01-27 Thread Robert Osfield
Hi Alexandre, On Tue, Jan 27, 2009 at 5:29 PM, Robert Osfield robert.osfi...@gmail.com wrote: Now, the question for me is why adding the slave fixes things, and why without the slave the defaults are having an effect. It looks like an order of initialisation issue - i.e. the master camera and

Re: [osg-users] Bug: Light management and slave cameras

2009-01-26 Thread Robert Osfield
Hi Alexandre, You missed attaching the file. Robert. On Mon, Jan 26, 2009 at 8:29 AM, Alexandre Amalric alex.pix...@gmail.com wrote: Hi osg-users, I recently have found something weird about adding slave camera to osgViewer::View when managing my own lightning. I'm using OSG SVN version.

Re: [osg-users] Bug: Light management and slave cameras

2009-01-26 Thread Alexandre Amalric
Hi robert, Oops sorry ;-) 2009/1/26 Robert Osfield robert.osfi...@gmail.com Hi Alexandre, You missed attaching the file. Robert. On Mon, Jan 26, 2009 at 8:29 AM, Alexandre Amalric alex.pix...@gmail.com wrote: Hi osg-users, I recently have found something weird about adding slave

Re: [osg-users] Bug: Light management and slave cameras

2009-01-26 Thread Robert Osfield
HI Alexandre, I can't find the code you are referring to in the osglight.cpp you provided. I'm afraid I really don't understand what you are trying to achieve, and what is happening that is wrong. Given this there is nothing I can do till you provide a clear example code and a better

Re: [osg-users] Bug: Light management and slave cameras

2009-01-26 Thread Alexandre Amalric
Hi Robert, I'm sorry If my explanation wasn't clear enough but it seems to be to be a serious issue so I will take more time to make myself clear. In the file osgLight.cpp previously attached there is a piece of code in main function at line 397 to 400 :

Re: [osg-users] Bug: Light management and slave cameras

2009-01-26 Thread Robert Osfield
HI Alexandre, I read your explanation but am still am confused. Could you modify the code so that you use a command line argument to add/remove the code this will make it easy to test the two configuration without recompile. As for it being a serious issue, well it could well still be an

Re: [osg-users] Bug: Light management and slave cameras

2009-01-26 Thread Robert Osfield
Hi Alexandre, Thanks for the updated example and screenshot, this makes it much clearer. I'm fixing another bug right now, but once that is complete I'll have another look at this example. Robert. On Mon, Jan 26, 2009 at 4:32 PM, Alexandre Amalric alex.pix...@gmail.com wrote: Hi Robert,

Re: [osg-users] Bug: Light management and slave cameras

2009-01-26 Thread Alexandre Amalric
Hi Robert, thank you for according some time to this case, it's very important to me to understand what I'm doing wrong or if it's a bug from osg ;-) Kind regards, 2009/1/26 Robert Osfield robert.osfi...@gmail.com Hi Alexandre, Thanks for the updated example and screenshot, this makes it