Hi Shuiying,

I guess that there may be something wrong in the draw implementation
of drawable B. Although OpenGL calls can be executable in custom
drawables, it is still suggested that you apply all kinds of rendering
states to the drawable using StateAttribute derivatives. But without
looking at some detailed code, I can hardly find out the actual reason
inside.

Wang Rui


2012/10/8 wang shuiying <[email protected]>:
> Is nobody interested in this question?:-(
>
> Hello,
>
> I have two drawable nodes A and B under the same main group node. I
> mapped two different textures on the drawables respectively. Those two
> drawables do not have any overlappings in terms of pixels on the screen.
> Drawable A is described using open scene graph library while drawable B
> is described using openGL terms. Depth test is disabled by Drawable A
> and enabled by drawable B. Texture display on A uses a shader while B
> does not.
>
> When the renderbin of drawable A is set to be -1 and that of drawable B
> is 1, the two textures cannot show at the same time. That is to say,
> when I toggle on both drawable A and drawable B and make them both seen
> on the screen, the texture on drawable B doesn't show, but the color of
> B is correct. Under such circumstance, when I manipulate the view in a
> way such that drawable A is out of sight, then the texture on drawable B
> will appear.
>
> If I reverse the renderbins of those two drawables, then the textures
> can show at the same time.
>
> I just cannot figure out why this happens.
>
>  If it is due to depth test, why should such conflicts happen, since
> they have no overlapped pixels on the screen? Even it is due to depth
> test, why is the color  correct?
>
> Would someone please be so kind enough as to explain that to me?
>
> Thanks millions in advance!
>
> Best regards
> Shuiying
>
>
>
>
> _______________________________________________
> 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