PDA

View Full Version : Register Combiner Confusion



HenryR
05-14-2001, 11:56 AM
So I'm missing something. My register combiner code *should* just draw a white pixel everytime:




glFinalCombinerInputNV(GL_VARIABLE_A_NV,GL_ONE,GL_ UNSIGNED_IDENTITY_NV,GL_RGB);
glFinalCombinerInputNV(GL_VARIABLE_B_NV,GL_ONE,GL_ UNSIGNED_IDENTITY_NV,GL_RGB);

glFinalCombinerInputNV(GL_VARIABLE_C_NV,GL_ONE,GL_ UNSIGNED_INVERT_NV,GL_RGB);
glFinalCombinerInputNV(GL_VARIABLE_D_NV,/*GL_E_TIMES_F_NV*/GL_ONE,GL_UNSIGNED_INVERT_NV,GL_RGB);

glFinalCombinerInputNV(GL_VARIABLE_E_NV,GL_SECONDA RY_COLOR_NV,GL_UNSIGNED_IDENTITY_NV,GL_RGB);
glFinalCombinerInputNV(GL_VARIABLE_F_NV,GL_CONSTAN T_COLOR0_NV,GL_UNSIGNED_IDENTITY_NV,GL_RGB);



But it doesn't. It seems dependent on the first combiner (if I leave the first combiner unspecified - no glCombinerInputNV calls - then the output is white as expected. As soon as I start specifying the first combiner behaviour, the output is no longer white...).

So what's the deal? Surely, with that final combiner output spec., the displayed colour should be independant of the first combiner. Some help would be appreciated, as I'm sure it's a stupid mistake somewhere.

Thanks,

Henry

davepermen
05-14-2001, 11:57 AM
GL_ONE is not a valid register, just GL_ZERO

means you have to use

GL_ZERO, GL_UNSIGNED_INVERT_NV
instead of
GL_ONE, GL_UNSIGNED_IDENTITY_NV