summaryrefslogtreecommitdiff
path: root/src/mesa/swrast_setup/ss_tritmp.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-07-12 22:09:21 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-07-12 22:09:21 +0000
commit1182ffeec39bf419928ba862c225e80a439fee7a (patch)
treeaf9e3f9019e3c59cb73d770eb60e94c5c77bdd25 /src/mesa/swrast_setup/ss_tritmp.h
parentfae7b778b81b686ef419f971064b5fe12fb4ead3 (diff)
Rename some of the tnl->Driver.* functions to tnl->Driver.Render.*, to make it
clear that these are owned by t_vb_render.c. Make swrast_setup opaque - it now hooks itself directly into tnl->Driver.Render.*. Add a _swsetup_Wakeup() call that does this. Update X11 (tested), osmesa and FX drivers for this change. FX compiles but is probably broken as the changes there are large. It was the only remaining driver that used the internal _swsetup_ functions for interp and copy_pv. This usage has been replaced with code from the DRI tdfx driver.
Diffstat (limited to 'src/mesa/swrast_setup/ss_tritmp.h')
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index 0db792ba2b..49e92acf1c 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -1,4 +1,4 @@
-/* $Id: ss_tritmp.h,v 1.12 2001/04/28 08:39:18 keithw Exp $ */
+/* $Id: ss_tritmp.h,v 1.13 2001/07/12 22:09:21 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -62,13 +62,15 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (IND & SS_TWOSIDE_BIT) {
if (IND & SS_RGBA_BIT) {
GLfloat (*vbcolor)[4] = (GLfloat (*)[4])VB->ColorPtr[1]->Ptr;
- GLfloat (*vbspec)[4] = (GLfloat (*)[4])VB->SecondaryColorPtr[1]->Ptr;
SS_COLOR(v[0]->color, vbcolor[e0]);
SS_COLOR(v[1]->color, vbcolor[e1]);
SS_COLOR(v[2]->color, vbcolor[e2]);
- SS_SPEC(v[0]->specular, vbspec[e0]);
- SS_SPEC(v[1]->specular, vbspec[e1]);
- SS_SPEC(v[2]->specular, vbspec[e2]);
+ if (VB->SecondaryColorPtr[1]) {
+ GLfloat (*vbspec)[4] = (GLfloat (*)[4])VB->SecondaryColorPtr[1]->Ptr;
+ SS_SPEC(v[0]->specular, vbspec[e0]);
+ SS_SPEC(v[1]->specular, vbspec[e1]);
+ SS_SPEC(v[2]->specular, vbspec[e2]);
+ }
} else {
GLuint *vbindex = VB->IndexPtr[1]->data;
SS_IND(v[0]->index, vbindex[e0]);
@@ -135,13 +137,15 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (facing == 1) {
if (IND & SS_RGBA_BIT) {
GLfloat (*vbcolor)[4] = (GLfloat (*)[4])VB->ColorPtr[0]->Ptr;
- GLfloat (*vbspec)[4] = (GLfloat (*)[4])VB->SecondaryColorPtr[0]->Ptr;
SS_COLOR(v[0]->color, vbcolor[e0]);
SS_COLOR(v[1]->color, vbcolor[e1]);
SS_COLOR(v[2]->color, vbcolor[e2]);
- SS_SPEC(v[0]->specular, vbspec[e0]);
- SS_SPEC(v[1]->specular, vbspec[e1]);
- SS_SPEC(v[2]->specular, vbspec[e2]);
+ if (VB->SecondaryColorPtr[0]) {
+ GLfloat (*vbspec)[4] = (GLfloat (*)[4])VB->SecondaryColorPtr[0]->Ptr;
+ SS_SPEC(v[0]->specular, vbspec[e0]);
+ SS_SPEC(v[1]->specular, vbspec[e1]);
+ SS_SPEC(v[2]->specular, vbspec[e2]);
+ }
} else {
GLuint *vbindex = VB->IndexPtr[0]->data;
SS_IND(v[0]->index, vbindex[e0]);