From 07851ca039a3c9c54a21f8e364e740f918e8b3ec Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 8 Dec 2003 13:33:07 +0000 Subject: get ffb compiling --- src/mesa/drivers/dri/ffb/ffb_vbtmp.h | 38 +++++------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'src/mesa/drivers/dri/ffb/ffb_vbtmp.h') diff --git a/src/mesa/drivers/dri/ffb/ffb_vbtmp.h b/src/mesa/drivers/dri/ffb/ffb_vbtmp.h index ac0c6f0a8b..5baa4eb03e 100644 --- a/src/mesa/drivers/dri/ffb/ffb_vbtmp.h +++ b/src/mesa/drivers/dri/ffb/ffb_vbtmp.h @@ -37,21 +37,15 @@ static void TAG(emit)(GLcontext *ctx, GLuint start, GLuint end) #endif #if (IND & (FFB_VB_RGBA_BIT)) - if (VB->ColorPtr[0]->Type != GL_FLOAT) - ffbImportColors(fmesa, ctx, 0); + col0 = VB->ColorPtr[0]->data; + col0_stride = VB->ColorPtr[0]->stride; #if (IND & (FFB_VB_TWOSIDE_BIT)) - if (VB->ColorPtr[1]->Type != GL_FLOAT) - ffbImportColors(fmesa, ctx, 1); -#endif - col0 = (GLfloat (*)[4]) VB->ColorPtr[0]->Ptr; - col0_stride = VB->ColorPtr[0]->StrideB; -#if (IND & (FFB_VB_TWOSIDE_BIT)) - col1 = (GLfloat (*)[4]) VB->ColorPtr[1]->Ptr; - col1_stride = VB->ColorPtr[1]->StrideB; + col1 = VB->ColorPtr[1]->data; + col1_stride = VB->ColorPtr[1]->stride; #endif #endif - if (VB->importable_data) { + { if (start) { #if (IND & (FFB_VB_XYZ_BIT)) proj = (GLfloat (*)[4])((GLubyte *)proj + start * proj_stride); @@ -85,28 +79,6 @@ static void TAG(emit)(GLcontext *ctx, GLuint start, GLuint end) v->color[1].blue = CLAMP(col1[0][2], 0.0f, 1.0f); col1 = (GLfloat (*)[4])((GLubyte *)col1 + col1_stride); #endif -#endif - } - } else { - for (i = start; i < end; i++, v++) { -#if (IND & (FFB_VB_XYZ_BIT)) - if (mask[i] == 0) { - v->x = proj[i][0]; - v->y = proj[i][1]; - v->z = proj[i][2]; - } -#endif -#if (IND & (FFB_VB_RGBA_BIT)) - v->color[0].alpha = CLAMP(col0[i][3], 0.0f, 1.0f); - v->color[0].red = CLAMP(col0[i][0], 0.0f, 1.0f); - v->color[0].green = CLAMP(col0[i][1], 0.0f, 1.0f); - v->color[0].blue = CLAMP(col0[i][2], 0.0f, 1.0f); -#if (IND & (FFB_VB_TWOSIDE_BIT)) - v->color[1].alpha = CLAMP(col1[i][3], 0.0f, 1.0f); - v->color[1].red = CLAMP(col1[i][0], 0.0f, 1.0f); - v->color[1].green = CLAMP(col1[i][1], 0.0f, 1.0f); - v->color[1].blue = CLAMP(col1[i][2], 0.0f, 1.0f); -#endif #endif } } -- cgit v1.2.3