HI Daniel,

You'll need to place the geometry you want in orthographic frustum.
See the osghud for the settings used.

Robert.

On Dec 7, 2007 8:02 AM, Daniel Moos <[EMAIL PROTECTED]> wrote:
> Hello everybody
>
> I have a problem with showing an image in a HUD-Display. Here is my code to
> load and show the image. If i comment out the first two lines the image is
> visible in the 3d world. But with the two lines the image isn't visible in
> the scenegraph... Has anybody any idea?
>
> I want to show a simple image in the center of the screen.
>
> Thanks a lot...
> Daniel
>
>
> _camera->setReferenceFrame ( osg::Transform::ABSOLUTE_RF );
> _camera->setProjectionMatrixAsOrtho2D ( 0, 1280, 0, 1024 );
> _camera->setViewMatrix ( osg::Matrix::identity() );
> _camera->setRenderOrder ( osg::Camera::POST_RENDER );
> _camera->setClearMask ( GL_DEPTH_BUFFER_BIT );
>
> osg::ref_ptr<osg::Image> image = osg::readImageFile ( "test.png" );
> if ( image.valid() ) {
>         _geode = osg::createGeodeForImage ( image.get() );
>         _camera->addChild ( _geode.get() );
> }
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to