I’m having the weirdest problem. I am blending 2 passes, both with a simple single texture setup (just for testing purposes). If I use the basic opengl rendering for both passes, they blend fine. However, if I combine a simple vertex program pass (activated via the Cg runtime) with a standard pass, I get something that resembles z-fighting. ( if I use glBindProgramNV or I use Cg to bind a program to BOTH passes, this doesn’t happen)…hmmmmm, anyone know of any reason why this could be happening? http://www.cse.unsw.edu.au/~ryana/problem.jpg
basic code:
glDepthFunc(GL_LEQUAL);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ZERO);
.
. //tex binding
draw_surf(floor_plane); //just using immediate mode
glDepthFunc(GL_EQUAL);
glBlendFunc(GL_DST_COLOR, GL_ZERO);
.
. //tex binding
draw_surf_cg(floor_plane); //draw with cg bound vertex program