PDA

View Full Version : cg binding doesn't work for me



zedus
11-25-2005, 11:25 PM
hello!

i can't get the cg binds to actually switch programs. the weird part is that i manage to get uniforms from the program that i bind, but when rendering another program is used, look at what i do:


bool CShaderVertexProgram_GL::Bind(CShaderUniforms* pShaderUniforms)
{
cgGLBindProgram(m_Program);

// here i deal with uniforms and autouniforms - not related (but anyway, i do get ACCESS to them!

cgGLEnableProfile(g_VertexProfile);

return true;

} i do the same for fragment shader, and i do bind() for both just before doing the api render call (nothing is between them)

can anyone here give me a suggestion what am i doing wrong ? i'm stuck on this for 2 days now :(

zedus
11-26-2005, 02:02 PM
found the problem :)

was realted to the argument posinv (position invariance) ...