apply David Miller's quad/backcolor patch

This commit is contained in:
Keith Whitwell
2001-06-01 12:07:15 +00:00
parent 4097590bc6
commit 741c2e6434

View File

@@ -1,4 +1,4 @@
/* $Id: t_dd_tritmp.h,v 1.10 2001/04/28 15:47:48 keithw Exp $ */
/* $Id: t_dd_tritmp.h,v 1.11 2001/06/01 12:07:15 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -388,6 +388,31 @@ static void TAG(quad)( GLcontext *ctx,
GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->Ptr;
(void)vbcolor;
if (HAVE_BACK_COLORS) {
if (!DO_FLAT) {
VERT_SAVE_RGBA( 0 );
VERT_SAVE_RGBA( 1 );
VERT_SAVE_RGBA( 2 );
VERT_COPY_RGBA1( v[0] );
VERT_COPY_RGBA1( v[1] );
VERT_COPY_RGBA1( v[2] );
}
VERT_SAVE_RGBA( 3 );
VERT_COPY_RGBA1( v[3] );
if (HAVE_SPEC) {
if (!DO_FLAT) {
VERT_SAVE_SPEC( 0 );
VERT_SAVE_SPEC( 1 );
VERT_SAVE_SPEC( 2 );
VERT_COPY_SPEC1( v[0] );
VERT_COPY_SPEC1( v[1] );
VERT_COPY_SPEC1( v[2] );
}
VERT_SAVE_SPEC( 3 );
VERT_COPY_SPEC1( v[3] );
}
}
else {
if (!DO_FLAT) {
VERT_SAVE_RGBA( 0 );
VERT_SAVE_RGBA( 1 );
@@ -415,6 +440,7 @@ static void TAG(quad)( GLcontext *ctx,
VERT_SET_SPEC( v[3], vbspec[e3] );
}
}
}
else {
GLuint *vbindex = VB->IndexPtr[1]->data;
if (!DO_FLAT) {