OpenGL Blending and masking...
Hi! The last few days I''ve been learning heavily on OpenGL. But the tutorials on the net that I were reading had to disable the depth-testing whenever I blended or masked something. How can I blend or mask something without disabling the depth-test? Thanks alot!
Justin Eslinger
I''m working on a 3D game engine. To render water I had to use blending. disabling the Depth test created a lot of problem. I think i can give you details: szafar@ssuet.edu.pk.
you don''t have to disable depth test.. it''s just that if you draw the poly''s out of order it''s gonna have odd effects.
ie: picture you want to have a wall and a window in front of it.. you should draw the wall then the blended window after that.. right? otherwise if you draw them out of order.. you have a blended window drawn, then nothing drawn behind it since the depth of the window is in front of the wall.
get it? good.
ie: picture you want to have a wall and a window in front of it.. you should draw the wall then the blended window after that.. right? otherwise if you draw them out of order.. you have a blended window drawn, then nothing drawn behind it since the depth of the window is in front of the wall.
get it? good.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement