Hi Tim,
On Tue, Nov 10, 2009 at 5:23 PM, Tim Moore timo...@redhat.com wrote:
If you want to customize culling for a node that is a subclass of osg::Geode,
you pretty much need to write your own cull visitor and override
CullVisitor::apply(Geode); the low-level code that puts geometry
into the
How do I set my own custom CullVisitor? I'm doing the following:
osg::Camera *camera = viewer.getCamera();
osgViewer::Renderer *render =
dynamic_castosgViewer::Renderer *(camera-getRenderer());
if (!render)
{
return false;
}
Hi Paul,
Why do I have multiple SceneViews?
There are always two SceneViews if you're using multithreading - they're
used on alternating frames as you've seen. Just set your CullVisitor for
both, or a separate instance of your CullVisitor for each instance.
Whenever I've had to change
: Tue, November 10, 2009 8:57:38 AM
Subject: Re: [osg-users] Setting CullVisitor
Hi Paul,
Why do I have multiple SceneViews?
There are always two SceneViews if you're using multithreading - they're used
on alternating frames as you've seen. Just set your CullVisitor for both, or a
separate
@lists.openscenegraph.org
Sent: Tue, November 10, 2009 8:57:38 AM
Subject: Re: [osg-users] Setting CullVisitor
Hi Paul,
Why do I have multiple SceneViews?
There are always two SceneViews if you're using multithreading - they're used
on alternating frames as you've seen. Just set your CullVisitor for both
Jean-Sébastien Guay wrote:
I need my own CullVisitor because I've defined my own node type that
needs special cull handling.
You could just override the traverse() method of your node type, that's
how I normally do it. It keeps changes local to the overridden node
class instead of
Hi Paul,
I know I risk making the thread diverge into unrelated concerns, but I
wanted to ask:
If you ever submit
your node for inclusion in OSG, you can migrate the cull handling code
into osgUtil::CullVisitor at the time you make the submission. This is
what I did when I developed
On 11/10/2009 06:07 PM, Paul Martz wrote:
Jean-Sébastien Guay wrote:
I know I risk making the thread diverge into unrelated concerns, but I
wanted to ask:
No actually, I think this is the right direction for this thread to
take. :-)
Are there advantages to modifying CullVisitor rather
Jean-Sébastien Guay wrote on Tuesday, November 10, 2009 10:55 AM:
Are there advantages to modifying CullVisitor rather than overriding
traverse(), other than one dynamic_cast per frame per node? I think if
that's the only advantage, I'd personally prefer keeping all the code
related to the
Hi Bryan,
From experience, I can say that one dynamic_cast per frame per node can really
add up to hurt performance :)
Depends how many nodes. For example, for osgOcean::OceanScene, you
should generally have only one in your whole scene. So in that case,
one dynamic_cast per frame per
10 matches
Mail list logo