summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxvbtmp.h
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2004-07-02 10:34:48 +0000
committerDaniel Borca <[email protected]>2004-07-02 10:34:48 +0000
commit009542a0f7c2f90e3057f10bd1b17ae65f906d72 (patch)
tree77bbbed01bfc451c9f7f07b65b3d2220951357bc /src/mesa/drivers/glide/fxvbtmp.h
parent3aa364c8e11f10cc7cec384869ef59ff2f57c249 (diff)
added GL_EXT_fog_coord.
added GL_EXT_blend_equation_separate. minor cleanup.
Diffstat (limited to 'src/mesa/drivers/glide/fxvbtmp.h')
-rw-r--r--src/mesa/drivers/glide/fxvbtmp.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h
index c20d5fc3c4f..45166644d21 100644
--- a/src/mesa/drivers/glide/fxvbtmp.h
+++ b/src/mesa/drivers/glide/fxvbtmp.h
@@ -48,6 +48,8 @@ static void TAG(emit)( GLcontext *ctx,
GLuint proj_stride = VB->NdcPtr->stride;
GLfloat (*psize)[4];
GLuint psize_stride;
+ GLfloat (*fog)[4];
+ GLuint fog_stride;
GrVertex *v = (GrVertex *)dest;
GLfloat u0scale,v0scale,u1scale,v1scale;
const GLubyte *mask = VB->ClipMask;
@@ -88,6 +90,11 @@ static void TAG(emit)( GLcontext *ctx,
spec_stride = VB->SecondaryColorPtr[0]->stride;
}
+ if (IND & SETUP_FOGC) {
+ fog = VB->FogCoordPtr->data;
+ fog_stride = VB->FogCoordPtr->stride;
+ }
+
if (start) {
proj = (GLfloat (*)[4])((GLubyte *)proj + start * proj_stride);
if (IND & SETUP_PSIZ)
@@ -100,6 +107,8 @@ static void TAG(emit)( GLcontext *ctx,
STRIDE_4F(col, start * col_stride);
if (IND & SETUP_SPEC)
STRIDE_4F(spec, start * spec_stride);
+ if (IND & SETUP_FOGC)
+ fog = (GLfloat (*)[4])((GLubyte *)fog + start * fog_stride);
}
for (i=start; i < end; i++, v++) {
@@ -152,6 +161,10 @@ static void TAG(emit)( GLcontext *ctx,
UNCLAMPED_FLOAT_TO_UBYTE(v->pspec[0], spec[0][2]);
STRIDE_4F(spec, spec_stride);
}
+ if (IND & SETUP_FOGC) {
+ v->fog = CLAMP(fog[0][0], 0.0f, 1.0f);
+ fog = (GLfloat (*)[4])((GLubyte *)fog + fog_stride);
+ }
if (IND & SETUP_TMU0) {
GLfloat w = v->oow;
v->tmuvtx[0].sow = tc0[0][0] * u0scale * w;
@@ -251,6 +264,10 @@ static void TAG(interp)( GLcontext *ctx,
INTERP_UB( t, dst->pspec[2], out->pspec[2], in->pspec[2] );
}
+ if (IND & SETUP_FOGC) {
+ INTERP_F( t, dst->fog, out->fog, in->fog );
+ }
+
if (IND & SETUP_TMU0) {
INTERP_F( t,
dst->tmuvtx[0].sow,