Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cwolves

macrumors regular
Original poster
Oct 11, 2007
120
0
I can't for the life of me get two png textures to render on top of one-another properly when the top one has partial transparency.

3462146738_d201e2b35d_o.png


The above image shows three renders. One using polygons (a blue square with a white diamond and 50% opacity on top of it, blending mode: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA))

And two with textures. One using the "normal" rendering mode, the other using the "premultiplied" rendering mode, at least according to forums...

All I want is to reproduce the first result using textures....


Oh, and I've LITERALLY tried every blending mode possible with glBlendFunc.
 
Stupid question, but have you enabled blending?

Code:
glEnable( GL_BLEND ) ;

Oh and also what texture mode are you using? I use white polygons with the modulate mode:-

Code:
glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ) ;

b e n
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.