Aapo Tahkola wrote:

static void build_passthrough( struct tnl_program *p, GLuint inputs )
{
+ GLcontext *ctx = p->ctx;
+ GLuint i, nr_lights = 0;
+ + if (ctx->Light.Enabled == GL_FALSE)
+ emit_op1(p, VP_OPCODE_MOV, register_output(p, VERT_RESULT_COL0), 0,
+ register_input(p, VERT_ATTRIB_COLOR0));
+ else {
+ + for (i = 0; i < MAX_LIGHTS; i++) + if (ctx->Light.Light[i].Enabled)
+ nr_lights++;
+ + if(nr_lights == 0) { /* Darkness */
+ struct ureg dummy = register_input( p, VERT_ATTRIB_POS );
+ + emit_op1(p, VP_OPCODE_MOV, register_output(p, VERT_RESULT_COL0), 0,
+ swizzle(dummy, ZERO, ZERO, ZERO, ZERO));

Slight problem with the above line - the "reduced swizzle" that arb_f_p allows you for arguments doesn't include the ZERO/ONE options, it's only X,Y,Z,W and optional negation. You can get the full swizzle with the SWZ instruction. I'll fix this up, probably to use an explicit constant.


Keith


------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to