On 05/10/2012 07:21 AM, Bob Slobodan wrote:
Hi,
First of all, thank you for your answer. I took a look at osgscribe and I tried
to do the same thing, but it doesn't really work. I tried many things but this
is my last attempt:
You may need to tweak the factor and units numbers for your particular
application. Here's a link that might help you understand what they're
trying to do:
http://www.opengl.org/archives/resources/faq/technical/polygonoffset.htm
I also have another question for the manipulator. I want to enable the user to
switch from a perspective view to an orthographic view. Everything works fine,
but at some point, I need to force the computation of the new clipping planes.
I can't wait for the auto computation and I'm not sure of how to do that.
After some researches I found out that the cull visitor would be perfect for
that, but how can I attach a cull visitor to the camera ? I read in the FAQ
that the Camera was a subclass of cullVisiotr, but it doesn't seem to wright.
Does anyone have a clue?
osg::Camera inherits from CullSettings, not CullVisitor. CullVisitor
also inherits from CullSettings (via CullStack), so they're related, but
neither is a direct ancestor or descendant of the other.
If you can't wait for the Viewer to adjust the clipping planes for you,
another possibility is just to use a fixed set of clipping planes (one
for perspective and one for ortho), and set the Camera to not compute
the planes automatically.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org