From a96308c37db0bc0086a017d318bc3504aa5f0b1a Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 30 Oct 2000 13:31:59 +0000 Subject: Replace the flags Mesa was using for ctx->NewState with a new set based on the GL attribute groups. Introduced constants describing the circumstances under which some key derived values can change: _SWRAST_NEW_RASTERMASK -- ctx->RasterMask _SWRAST_NEW_TRIANGLE -- The software rasterizer's triangle function _DD_NEW_FEEDBACK -- the 'DD_FEEDBACK' bit in ctx->TriangleCaps These are helpful in deciding whether you need to recalculate state if your recalculation involves reference to a derived value. --- src/mesa/main/varray.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/mesa/main/varray.c') diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index f54d3cfa67..faada66b22 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1,4 +1,4 @@ -/* $Id: varray.c,v 1.26 2000/10/27 16:44:41 keithw Exp $ */ +/* $Id: varray.c,v 1.27 2000/10/30 13:32:02 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -98,7 +98,7 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.VertexFunc = gl_trans_4f_tab[size][TYPE_IDX(type)]; ctx->Array.VertexEltFunc = gl_trans_elt_4f_tab[size][TYPE_IDX(type)]; ctx->Array.NewArrayState |= VERT_OBJ_ANY; - ctx->NewState |= NEW_CLIENT_STATE; + ctx->NewState |= _NEW_ARRAY; } @@ -148,7 +148,7 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr ) ctx->Array.NormalFunc = gl_trans_3f_tab[TYPE_IDX(type)]; ctx->Array.NormalEltFunc = gl_trans_elt_3f_tab[TYPE_IDX(type)]; ctx->Array.NewArrayState |= VERT_NORM; - ctx->NewState |= NEW_CLIENT_STATE; + ctx->NewState |= _NEW_ARRAY; } @@ -211,7 +211,7 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.ColorFunc = gl_trans_4ub_tab[size][TYPE_IDX(type)]; ctx->Array.ColorEltFunc = gl_trans_elt_4ub_tab[size][TYPE_IDX(type)]; ctx->Array.NewArrayState |= VERT_RGBA; - ctx->NewState |= NEW_CLIENT_STATE; + ctx->NewState |= _NEW_ARRAY; } @@ -246,7 +246,7 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.FogCoordFunc = gl_trans_1f_tab[TYPE_IDX(type)]; ctx->Array.FogCoordEltFunc = gl_trans_elt_1f_tab[TYPE_IDX(type)]; ctx->Array.NewArrayState |= VERT_FOG_COORD; - ctx->NewState |= NEW_CLIENT_STATE; + ctx->NewState |= _NEW_ARRAY; } @@ -289,7 +289,7 @@ _mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.IndexFunc = gl_trans_1ui_tab[TYPE_IDX(type)]; ctx->Array.IndexEltFunc = gl_trans_elt_1ui_tab[TYPE_IDX(type)]; ctx->Array.NewArrayState |= VERT_INDEX; - ctx->NewState |= NEW_CLIENT_STATE; + ctx->NewState |= _NEW_ARRAY; } @@ -354,7 +354,7 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type, ctx->Array.SecondaryColorFunc = gl_trans_4ub_tab[size][TYPE_IDX(type)]; ctx->Array.SecondaryColorEltFunc = gl_trans_elt_4ub_tab[size][TYPE_IDX(type)]; ctx->Array.NewArrayState |= VERT_SPEC_RGB; - ctx->NewState |= NEW_CLIENT_STATE; + ctx->NewState |= _NEW_ARRAY; } @@ -411,7 +411,7 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ctx->Array.TexCoordFunc[texUnit] = gl_trans_4f_tab[size][TYPE_IDX(type)]; ctx->Array.TexCoordEltFunc[texUnit] = gl_trans_elt_4f_tab[size][TYPE_IDX(type)]; ctx->Array.NewArrayState |= PIPE_TEX(texUnit); - ctx->NewState |= NEW_CLIENT_STATE; + ctx->NewState |= _NEW_ARRAY; } @@ -437,7 +437,7 @@ _mesa_EdgeFlagPointer(GLsizei stride, const void *vptr) } ctx->Array.EdgeFlagEltFunc = gl_trans_elt_1ub_tab[TYPE_IDX(GL_UNSIGNED_BYTE)]; ctx->Array.NewArrayState |= VERT_EDGE; - ctx->NewState |= NEW_CLIENT_STATE; + ctx->NewState |= _NEW_ARRAY; } -- cgit v1.2.3