Hi Robert
Thanks for your answer...
But I haven't got a clue, what you exactly mean. the geometry and the settings
for this geometry are create by the function osg::createGeodeForImage()
I have read the osghud code. But the only difference is that
osg::createGeodeForImage() doesn't create normals. And the Vec3Array is a
little bit different. In osghud are two more State-Settings:
osg::StateSet* stateset = geom->getOrCreateStateSet();
stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
Can you give some more information about it?
Thank you for your answer.
Daniel
Am Freitag, 7. Dezember 2007 10.38:03 schrieb Robert Osfield:
> 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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org