I'm finding it difficult to guess what your after/what problems your
seeing. The best I can do is say as a general note, one would
typically use control the rendering order via
StateSet::setRenderingDetails(..) from within the scene graph rather
attempting to set globals.
Robert.
> _______________________________________________
> osg-users mailing list
> osg-...@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Text by default will drop into the transparent bin so this is likely
the reason why it's ordering is not exactly what you expect it. Text
has to be in the transparent bin to ensure correct blending.
Also I don't of if you are aware but rendering order only controls
which item depends upon the current setting of the depth buffer - i.e.
is depth test on, and what is rejected (normally more distance
fragements are discarded) and the depth of the object. If you switch
off depth test or the fragments have the same depth and fragements of
the same depth pass the depth test will rendering order make a
difference.
In you case you don't specify what you are doing with the depth test
or depth buffer, it's also difficult to guess at what level of
understanding you have about depth buffers and depth test.
Robert.
Block diagrams won't help as that most likely not at issue. What are
you doing with the depth buffer/depth test? What you are doing the
with the depth of each of the objects?
Robert.
On Tue, Dec 15, 2009 at 11:11 AM, Andre Simoes <andrer...@gmail.com> 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.
I'm afraid I can't dedicate all my support time to just understanding
what you are doing wrong and trying to help you - I have other work to
do. What you want to do is possible. osgWidget does it, why not go
look at it. I have tried by best to point you in the right direction,
but this is as far as I can go.
Perhaps others can help you.
Robert.