Michaeil02
10-27-2009, 03:17 PM
Hi,
I want to draw two textures on two planes. Both should be partially transparent. So it should be possible to see e.g. plane a through the transparent region of plane b.
This works good, if I use:
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0);
But if I use:
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
instead it only works from one direction. It is only possible to see the first drawn plane through the second drawn plane.
So it depends on which plane is drawn first.
I enabled GL_DEPTH_TEST.
Does someone has an idea why it doesn't work?
Thank you for your help,
Michael
I want to draw two textures on two planes. Both should be partially transparent. So it should be possible to see e.g. plane a through the transparent region of plane b.
This works good, if I use:
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0);
But if I use:
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
instead it only works from one direction. It is only possible to see the first drawn plane through the second drawn plane.
So it depends on which plane is drawn first.
I enabled GL_DEPTH_TEST.
Does someone has an idea why it doesn't work?
Thank you for your help,
Michael