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 › problems with blending
Page Index Toggle Pages: 1
problems with blending (Read 683 times)
problems with blending
Mar 6th, 2008, 11:09pm
 
i m modifying the spacejunk example code.

what i have done is instead of drawing a box, i draw a rectangle in space and bind a png texture to it. the png file is the outline of a bird on transparent background.

heres a pic (http://www.freewebs.com/yoshi95/blend.jpg)

i circle the problem spots in red.

some spots are transparent, meaning the stuff behind it shows through, and some spots are completely opague.

any idea y this is happening? do i need to tweak the blend mode using glTexEnvi?

thanks in advance
Re: problems with blending
Reply #1 - Mar 7th, 2008, 12:39am
 
I think this is due to depth sorting. You need to draw the things further away before the closer things for them to show through properly.

I think there's a hint(DEPTH_SORT); or similar to get processing to attempt to do this for you automatically.
Re: problems with blending
Reply #2 - Mar 17th, 2008, 12:26pm
 
Do you know about this...?

http://www.flight404.com/blog/?p=71

There is a bit that fixes overlap issues.

Sorry if this isn't relevant - i'm a newbie to openGL!
Re: problems with blending
Reply #3 - Mar 17th, 2008, 8:38pm
 
yoshi95 wrote on Mar 6th, 2008, 11:09pm:
some spots are transparent, meaning the stuff behind it shows through, and some spots are completely opague.

see the (~7th) item under "common problems" on the troubleshooting page.
http://processing.org/reference/troubleshooting/index.html#opengl
Page Index Toggle Pages: 1