Implement gl_FrontFacing for fragment shaders.

For the time being, we put the gl_FrontFacing value in the FOGC.Y input
register.  Combining FOGC and FrontFacing in one register is a bit of a
hack and may need to be changed someday.
This commit is contained in:
Brian
2007-03-10 11:30:19 -07:00
parent 1fcb4ecc07
commit 10b5895597
4 changed files with 44 additions and 27 deletions

View File

@@ -113,6 +113,10 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
/* Setup pointer to input attributes */
machine->Attribs = span->array->attribs;
/* Store front/back facing value in register FOGC.Y */
machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = (GLfloat) ctx->_Facing;
machine->CurElement = col;
/* init condition codes */