PDA

View Full Version : simple nvparse program, but how i can do this without nvparse?



06-23-2003, 12:39 AM
Can you give me an explanation how to rewrite this simple nvparse program into OpenGL code. Just can't do it by myself without seeing a black screen...
nvparse(
"!!RC1.0 \n"
"out.rgb = tex2; \n"
"out.a = tex1.b; \n"
);
Sorry for stupid question, Thanks!

06-23-2003, 03:48 AM
solution is:




glCombinerParameteriNV( GL_NUM_GENERAL_COMBINERS_NV, 1 );
glFinalCombinerInputNV( GL_VARIABLE_A_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glFinalCombinerInputNV( GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glFinalCombinerInputNV( GL_VARIABLE_C_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glFinalCombinerInputNV( GL_VARIABLE_D_NV, GL_TEXTURE2_ARB, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glFinalCombinerInputNV( GL_VARIABLE_G_NV, GL_TEXTURE1_ARB, GL_UNSIGNED_IDENTITY_NV, GL_BLUE );


thanks, and sorry again.