I have created a CameraNode for HUD following the osgHud example. I have to manually set
m_hudNode->setComputeNearFarMode(osg::CullSettings::ComputeNearFarMode::DO_NOT_COMPUTE_NEAR_FAR);
otherwise the near/far limit won't be correct and triangles close together will be rendered incorrectly. Please see attached z_buffer.gif.
Here is the history of the HUD problem I have encountered..
1. osg 0.9.9, created HUD using Projection and MatrixTransform, no problem at all
2. osg 1.0, created HUD using CameraNode, has to set DO_NOT_COMPUTE_NEAR_FAR, otherwize broken trackball control (after you move scene behind the camera, you cannot move it back)
3. osg 1.1, created HUD using CameraNode, need to switch from FXGlcanvas to Producer::RenderSurface, otherwise a black window will be shown when using HUD, also has to set
DO_NOT_COMPUTE_NEAR_FAR, otherwise there is rendering problem related to z-buffer (z-buffer range too large to correctly render closer triangles).
Tired with the HUD thing... It may be a compatibility problem with sceneview and fox toolkit...
Regards,
Yanling
z_buffer.gif
Description: GIF image
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
