We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › OpenGL, Stacked .png transparency problem
Page Index Toggle Pages: 1
OpenGL, Stacked .png transparency problem (Read 1125 times)
OpenGL, Stacked .png transparency problem
Jul 20th, 2007, 7:48pm
 
I'm displaying a fair amount of PImages, loaded from .png with transparency, in a rapidly changing 3d environment.

The overlap between the images is sometimes drawn correctly, and sometimes the transparent areas are acting as a mask for the images which overlap?

Should I be drawing them in Z depth order? I don't *seem* to be getting any better results that way?

Thank you!
Re: OpenGL, Stacked .png transparency problem
Reply #1 - Jul 20th, 2007, 8:42pm
 
Taht sounds exactly like a depth sorting issue. You have to draw them in the order of furthest from camera, to closest to camera.

(Note that the "z" position may not relate to closeness to camera.. if you're doing rotates and transforms z isn't necessarily "away")
Re: OpenGL, Stacked .png transparency problem
Reply #2 - Jul 23rd, 2007, 12:32pm
 
Great, thank you muchly!
Page Index Toggle Pages: 1