diff options
author | Keith Whitwell <[email protected]> | 2002-02-13 00:53:19 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2002-02-13 00:53:19 +0000 |
commit | 0cb28418d06c30e431bdff515c1d36a812d5950d (patch) | |
tree | 4055885872891fb515f0acb780bf63a3a5fb02b8 /src/mesa/tnl/t_imm_api.c | |
parent | 12a1024d9d003afe1212cc48af04dac81c034299 (diff) |
More suport for t&l drivers
Fix GLuint compare bugs
Fix RESET_STIPPLE calls
Diffstat (limited to 'src/mesa/tnl/t_imm_api.c')
-rw-r--r-- | src/mesa/tnl/t_imm_api.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_imm_api.c b/src/mesa/tnl/t_imm_api.c index dd90dbe5403..d19f6a6e007 100644 --- a/src/mesa/tnl/t_imm_api.c +++ b/src/mesa/tnl/t_imm_api.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_api.c,v 1.24 2002/01/22 14:35:16 brianp Exp $ */ +/* $Id: t_imm_api.c,v 1.25 2002/02/13 00:53:20 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -553,6 +553,8 @@ static void _tnl_Normal3fv( const GLfloat *v ) { NORMALF( v[0], v[1], v[2] ); +/* struct immediate *IM = (struct immediate *)(((GLcontext *) _glapi_Context)->swtnl_im); */ +/* IM->Flag[IM->Count] = VERT_NORM; */ } @@ -1154,6 +1156,7 @@ static void _tnl_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) { GET_CURRENT_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); struct immediate *IM = TNL_CURRENT_IM(ctx); GLuint count = IM->Count; struct gl_material *mat; @@ -1162,6 +1165,14 @@ _tnl_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) if (bitmask == 0) return; + if (tnl->IsolateMaterials && + !(IM->BeginState & VERT_BEGIN_1)) /* heuristic */ + { + _tnl_flush_immediate( IM ); + IM = TNL_CURRENT_IM(ctx); + count = IM->Count; + } + if (!(IM->Flag[count] & VERT_BIT_MATERIAL)) { if (!IM->Material) { IM->Material = (struct gl_material (*)[2]) @@ -1227,6 +1238,12 @@ _tnl_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) mat[1].DiffuseIndex = params[1]; mat[1].SpecularIndex = params[2]; } + + if (tnl->IsolateMaterials && + !(IM->BeginState & VERT_BEGIN_1)) /* heuristic */ + { + _tnl_flush_immediate( IM ); + } } void _tnl_imm_vtxfmt_init( GLcontext *ctx ) |