hello,i have a problem using transparent textures.
i have a simple code doing this :
-draw_all_opaque_objects();
-glEnable(GL_BLEND);
-draw_all_transparent_objects();
-glDisable(GL_BLEND);
ok, all seems to work correctly, but…
if i have 2 transparent objects intersecting, only a part of transparent object is drawn.
i have read a lot of post talking about disable the depth test so i changed my code as follow :
-draw_all_opaque_objects();
-glEnable(GL_BLEND);
-glDisable(GL_DEPTH_TEST);
-draw_all_transparent_objects();
-glDisable(GL_BLEND);
-glEnable(GL_DEPTH_TEST);
now i can draw transparent objects intersecting correctly , but…
also the opaque objects become transparent !!!
at the moment i so confusing…
can u help a poor dude plese ?
thanks in advance.