HI Terry,

On Thu, Jun 23, 2011 at 9:43 PM, Terry Welsh <[email protected]> wrote:
> Thanks for the reply.  Turning off small feature culling does indeed
> fix my problem, but it's not ideal.

It's not ideal at all, I'd call it hack ;-)

I guess another hack would be to switch off culling off for the first frame
and then re-enable.

>   I'm not sure I understand all the
> details of what you're saying, but let me take a crack at it.  With
> the current code you can a) turn off small feature culling, which will
> get you a bounding box of size 0 on the first frame and a
> reconstructed bounding box of the proper size on later frames, or b)
> leave small feature culling on, which causes your text to never be
> displayed.
>
> If there must be an incorrect bounding box on the first frame, maybe
> it should be just large enough to escape being culled as a small
> feature.  Then small feature culling could be left on without any
> trouble.  Of course, if there is any way to build a bounding box of
> roughly the right shape and size with information about the text to be
> drawn, that would probably be better.  It sounds to me like things
> happen in the wrong order in OSG to make this practical or even
> possible.

You are reading things correctly, as things stand the view dependent
settings in osgText cause problems with sizing and computing bounding
volumes for the first frame.  Having a view dependent text in two different
views will also cause similar issues with the bounding volume.

I don't think there is any easy solutions without rejigging a number of design
elements.  For instance if I was write osgText::Text now I wouldn't put any
of the view dependent support into it.  Instead this should be provied by
osg::AutoTransform, osg::Billboad or similar node level support.  This will
solve part of the problems, but there still is the issue with view dependent
subgraphs and their bounding volumes which would need some resolution
at the node level, unfortunately I don't know just what right now.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to