Jeremy Moles schrieb:
On Tue, 2008-10-07 at 09:16 +0100, Robert Osfield wrote:
Hi Jeremy,

On Mon, Oct 6, 2008 at 8:37 PM, Jeremy Moles <[EMAIL PROTECTED]> wrote:
Okay, answered my own question. I reversed the index order (by reversing
my calls to addPrimitiveSet()) and it renders properly from the front.
But does it render properly from the back?

Well, no matter what I do I can't get it to render properly from both
sides using my current method. However, as long as I make sure the
geometry's Z values are properly ascending (that is, the first quad has
a z == -1.0f, and each quad increments z by 0.001f) then it renders
properly from the front at least.

The real way to do it, I think, is to have an UpdateCallback that sorts
the Geometry based on each quad's size somehow, switching to
DrawElements instead of DrawArrays...
Have you tried to disable writing into the depth-buffer?

This is what I am doing with a similar problem, no depth-sorting needed. This approach has some other disadavantages, though.

cheers,
Stephan
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to