cg runtime + ogl

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?

basic code:
glBlendFunc(GL_ONE, GL_ZERO);
. //tex binding
draw_surf(floor_plane); //just using immediate mode
. //tex binding
draw_surf_cg(floor_plane); //draw with cg bound vertex program

i think i may have to end up pissing off the cg runtime and doin all the program stuff manually…which is kinda annoying…ah well, I’d still like to know what the problem is.

Position invariance needs to be enabled for your CG programs.

Mixing vertex programs with the fixed function pipeline leads to small differences in the final position unless you specifically state that the vertex program is position invariant.

ahh…thank you!!..looking that up in the cg users manual revealed the problem. Thank you again, this will prevent some more hair tearing episodes.