Advertisement

Depth buffer / blending problem

Started by November 02, 2003 05:11 AM
0 comments, last by knealeaj 21 years, 4 months ago
I am currently working on a small shooter game I have textured quads for objects, a player object , a bad guy object and a large quad for the background. I have rendered the background with a z coordinate of -3 and the other objects at -1. The problem is that the player and the bad guy are drawn behind the background. I have been playing with the Depth function but to no avail. here is my blending function glBlendFunc(GL_SRC_ALPHA,GL_ONE); to make black transparent. can any of you guys suggest anything?? Thanks
First of all check id the Depth_test is enabled ->
glEnable(GL_DEPTH_TEST);
if this is set and still doesn`t work tell me the order of the rendering.
Second , the blending.If you want the black to dissapear and the other color not to get mixed you should get into the alpha channel and set an alphafunction.
And third ->youre blend func needs youre glColor4f() for an alpha

I hope this helps...

Relative Games - My apps

This topic is closed to new replies.

Advertisement