[osg-users] ArUco (AR) with OSG

Jan Ciger jan.ciger at gmail.com
Wed Feb 17 02:47:04 PST 2016


On Wed, Feb 17, 2016 at 10:48 AM, Robert Osfield <robert.osfield at gmail.com>
wrote:

> Hi Igor,
>
> The description is useful. In general the OSG just passes along projection
> and view matrices directly to OpenGL.  However, by default the OSG computes
> the near and far in the cull traversal on each frame and uses this to clamp
> the projection matrices so that depth precision is maximized.  The problem
> can arise if you are trying to match two render passes, if they have a
> different depth range then z buffer test will be erroneous so you'll get
> fragment clipped or not clipped.  Could this be the issue?
>
> To disable the compute near far simple do:
>
>
> viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
>
> You can find all the settings in the include/osg/CullSettings.
>
>

I have found it useful to force the projection matrix using the
osg::Projection node.  That avoids any issues with OSG modifying the
projection matrices.

J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160217/cc986149/attachment-0003.htm>


More information about the osg-users mailing list