diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-06-15 02:38:15 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-06-15 02:38:15 +0000 |
commit | 4753d60dd070bb08d0116076bcc08025c86ce857 (patch) | |
tree | b1516c35acfa41ae17d575b92b8c776bd530297a /src/mesa/drivers/common/t_dd_vbtmp.h | |
parent | 5e54ddc3a69df060c3ca2acbdd45247e30c947d6 (diff) |
Added ctx parameter to _mesa_debug()
Added _mesa_printf()
Updated SetDrawBuffer() function in all drivers (ala 4.0.3)
Import 4.0.3/DRI changes.
Diffstat (limited to 'src/mesa/drivers/common/t_dd_vbtmp.h')
-rw-r--r-- | src/mesa/drivers/common/t_dd_vbtmp.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/mesa/drivers/common/t_dd_vbtmp.h b/src/mesa/drivers/common/t_dd_vbtmp.h index 8f7b638daf..d88318c16b 100644 --- a/src/mesa/drivers/common/t_dd_vbtmp.h +++ b/src/mesa/drivers/common/t_dd_vbtmp.h @@ -1,4 +1,4 @@ -/* $Id: t_dd_vbtmp.h,v 1.17 2002/06/03 16:06:35 brianp Exp $ */ +/* $Id: t_dd_vbtmp.h,v 1.18 2002/06/15 02:38:18 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -189,15 +189,28 @@ static void TAG(emit)( GLcontext *ctx, } if (DO_SPEC) { - if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE) - IMPORT_FLOAT_SPEC_COLORS( ctx ); - spec = (GLubyte (*)[4])VB->SecondaryColorPtr[0]->Ptr; - spec_stride = VB->SecondaryColorPtr[0]->StrideB; + if (VB->SecondaryColorPtr[0]) { + if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE) + IMPORT_FLOAT_SPEC_COLORS( ctx ); + spec = (GLubyte (*)[4])VB->SecondaryColorPtr[0]->Ptr; + spec_stride = VB->SecondaryColorPtr[0]->StrideB; + } else { + GLubyte tmp[4]; + spec = &tmp; + spec_stride = 0; + } } if (DO_FOG) { - fog = VB->FogCoordPtr->data; - fog_stride = VB->FogCoordPtr->stride; + if (VB->FogCoordPtr) { + fog = VB->FogCoordPtr->data; + fog_stride = VB->FogCoordPtr->stride; + } + else { + GLfloat tmp = 0; + fog = &tmp; + fog_stride = 0; + } } if (VB->importable_data) { |