Re: [osg-users] Sharing culling results among multiple cameras

2012-12-07 Thread Aurelien Albert
Hi, Thanks a lot for this idea ! I'll try to do something based on it. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51457#51457 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Frank Kane
Let's say I have two cameras with identical view frusta, say a main camera and a camera for reflections that contain the same objects, only flipped. Is there any way I can avoid incurring the overhead of culling once for each camera, when the results will be the same for both? Basically I'd like

Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Thrall, Bryan
Frank Kane wrote on 2012-12-06: Let's say I have two cameras with identical view frusta, say a main camera and a camera for reflections that contain the same objects, only flipped. Except for in very specific situations, the objects in the reflection camera's frustum aren't going to be the

Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Robert Osfield
Hi Frank, On 6 December 2012 13:50, Frank Kane fk...@sundog-soft.com wrote: Let's say I have two cameras with identical view frusta, say a main camera and a camera for reflections that contain the same objects, only flipped. Is there any way I can avoid incurring the overhead of culling once

Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Frank Kane
robertosfield wrote: I wouldn't recommend trying to be clever by reusing culling results as the rendering backend is rather more sophisticated than just a list of results Thanks Robert. I thought it might be more trouble than it would be worth. In a release build, the culling isn't too

Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Aurelien Albert
Hi, I'm intersted by this topic, because in my application, sometimes I need to render the same scene multiple times. For example, I render the scene a first time to generate a regular OpenGL image. Then I render with different shaders/textures to generate an image with computation results

Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Glenn Waldron
One approach is to create a custom RenderBin. The cull pass collects RenderLeaf objects and puts them into the bin. Each RenderLeaf contains a single Drawable along with its modelview matrix, projection martix, and state graph. You can tweak these properties at draw time, or even draw a leaf