Archived

This topic is now archived and is closed to further replies.

MountainLion2

Blending carring over things it shouldn't

Recommended Posts

Ok, I''m sure I''m just missing a command or have something out of order, but my problem is I''m texturing some water, and trying to make it transparent. This all works looks fine, etc. My problem is, it carries over to my models, but not the terrain(?). This what the code looks like, I''ve also tried it inside the class, and didn''t help. glDisable(GL_LIGHTING); glEnable(GL_BLEND); glDepthMask( GL_FALSE ); glDepthFunc( GL_LEQUAL ); glBlendFunc(GL_SRC_ALPHA, GL_ONE); glPushMatrix(); glTranslatef(0.0f, 0.0, -2000.0f); glBindTexture(GL_TEXTURE_2D, g_RiverTex.t_tTex->texID); g_River.CreateSimpleRiver(); glPopMatrix(); glDepthMask(GL_TRUE); glDisable(GL_BLEND); glEnable(GL_LIGHTING); thanks (If I had hair I''d have ripped it all out by now...)

Share this post


Link to post
Share on other sites
What do you mean by its carrying over to your models? You mean its still applying the blending to them? If you have it perfectly in that order, this shouldn''t be happening.

Share this post


Link to post
Share on other sites
Going from what your saying, it sounds impossible. You show in your code above that you are directly calling glDisable(GL_BLEND);. If your not calling glEnable(GL_BLEND); before you draw your other models, there is no way blending is going to take place on the new vertices you render.

Share this post


Link to post
Share on other sites