Hi Yanling,

You seem to be fighitng the API.  For HUD's you really shouldn't need
to mess around with the compute near far too much - simply disable the
depth test, or do a depth clear at the begining of the HUD.

Robert.

On 8/8/06, Yanling Liu <[EMAIL PROTECTED]> wrote:
Hi, just want you to know when using Fox toolkit 1.6.6 with
Producer::RenderSurface and osgUtil::SceneView, there may be a problem with
HUD.....

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

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to