Hello Robert.

I never thought of  the Depth buffer application under a 2D orthographic
mode.

After adding
    osg::StateSet *ss = getOrCreateStateSet();
    ss->setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
    ss->setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );

         to all my geometries osgText::Texts are being correctly displayed.

Thanks
Andre

2009/12/15 Robert Osfield <[email protected]>

> Hi Andre,
>
> On Tue, Dec 15, 2009 at 11:11 AM, Andre Simoes <[email protected]>
> wrote:
> > Hi Robert.
> >
> > In reality I'm not doing anything with the depth buffer since i never
> used
> > depth for a 2D projection in pure OpenGL programs.
>
> So.... you disable depth test?
>
> If you have depth test on then you will be using the depth buffer even
> with 2D projections.. as 2D projections are really no different rather
> 3D projections in OpenGL, everything in reality is 3D, everything has
> depth even it's flat and depth value of 0, and if depth test is on
> then each fragment will be tested against the depth buffer.
>
> > For a simple OpenGL program I just draw components in sequence. As an
> > example like this:
>
> Again as I've been saying for the last three emails, depth test is the
> key and still you haven't provide any information about it.
>
> Robert.
> _______________________________________________
> 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