summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r--src/mesa/main/attrib.c53
1 files changed, 11 insertions, 42 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index fb5fbc8b704..c9ec11311f3 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.68 2002/06/15 03:03:06 brianp Exp $ */
+/* $Id: attrib.c,v 1.69 2002/06/17 23:36:31 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -72,42 +72,6 @@ new_attrib_node( GLbitfield kind )
}
-
-/*
- * Copy texture object state from one texture object to another.
- */
-static void
-copy_texobj_state( struct gl_texture_object *dest,
- const struct gl_texture_object *src )
-{
- dest->Name = src->Name;
- /*dest->Target = src->Target*/
- dest->Priority = src->Priority;
- dest->BorderColor[0] = src->BorderColor[0];
- dest->BorderColor[1] = src->BorderColor[1];
- dest->BorderColor[2] = src->BorderColor[2];
- dest->BorderColor[3] = src->BorderColor[3];
- dest->WrapS = src->WrapS;
- dest->WrapT = src->WrapT;
- dest->WrapR = src->WrapR;
- dest->MinFilter = src->MinFilter;
- dest->MagFilter = src->MagFilter;
- dest->MinLod = src->MinLod;
- dest->MaxLod = src->MaxLod;
- dest->BaseLevel = src->BaseLevel;
- dest->MaxLevel = src->MaxLevel;
- dest->MaxAnisotropy = src->MaxAnisotropy;
- dest->CompareFlag = src->CompareFlag;
- dest->CompareOperator = src->CompareOperator;
- dest->ShadowAmbient = src->ShadowAmbient;
- dest->_MaxLevel = src->_MaxLevel;
- dest->_MaxLambda = src->_MaxLambda;
- dest->Palette = src->Palette;
- dest->Complete = src->Complete;
-}
-
-
-
void
_mesa_PushAttrib(GLbitfield mask)
{
@@ -387,11 +351,16 @@ _mesa_PushAttrib(GLbitfield mask)
MEMCPY( attr, &ctx->Texture, sizeof(struct gl_texture_attrib) );
/* copy state of the currently bound texture objects */
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
- copy_texobj_state(&attr->Unit[u].Saved1D, attr->Unit[u].Current1D);
- copy_texobj_state(&attr->Unit[u].Saved2D, attr->Unit[u].Current2D);
- copy_texobj_state(&attr->Unit[u].Saved3D, attr->Unit[u].Current3D);
- copy_texobj_state(&attr->Unit[u].SavedCubeMap, attr->Unit[u].CurrentCubeMap);
- copy_texobj_state(&attr->Unit[u].SavedRect, attr->Unit[u].CurrentRect);
+ _mesa_copy_texture_object(&attr->Unit[u].Saved1D,
+ attr->Unit[u].Current1D);
+ _mesa_copy_texture_object(&attr->Unit[u].Saved2D,
+ attr->Unit[u].Current2D);
+ _mesa_copy_texture_object(&attr->Unit[u].Saved3D,
+ attr->Unit[u].Current3D);
+ _mesa_copy_texture_object(&attr->Unit[u].SavedCubeMap,
+ attr->Unit[u].CurrentCubeMap);
+ _mesa_copy_texture_object(&attr->Unit[u].SavedRect,
+ attr->Unit[u].CurrentRect);
}
newnode = new_attrib_node( GL_TEXTURE_BIT );
newnode->data = attr;