summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-11-19 23:10:25 +0000
committerBrian Paul <[email protected]>2000-11-19 23:10:25 +0000
commita852378a6289d154364dde440f89a39bbfc33e2d (patch)
treedbaf6946d80e517a2f0b349a11d1736cde1b83e1 /src/mesa/main/texstate.c
parentb12d8e3b0ddf6dc56dc866530b66230bdc5d73db (diff)
Replaced Texture.CurrentD[] with separate Texture.Current1/2/3D vars.
Completely removed the dirty texture object list. Set texObj->Complete to GL_FALSE to indicate dirty. Made point/line/triangle/quad SWvertex parameters const. Minor code clean-ups.
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c71
1 files changed, 5 insertions, 66 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 0e33e683de1..a99325672c4 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.22 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: texstate.c,v 1.23 2000/11/19 23:10:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -616,13 +616,13 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
switch (target) {
case GL_TEXTURE_1D:
- texObj = texUnit->CurrentD[1];
+ texObj = texUnit->Current1D;
break;
case GL_TEXTURE_2D:
- texObj = texUnit->CurrentD[2];
+ texObj = texUnit->Current2D;
break;
case GL_TEXTURE_3D_EXT:
- texObj = texUnit->CurrentD[3];
+ texObj = texUnit->Current3D;
break;
case GL_TEXTURE_CUBE_MAP_ARB:
if (ctx->Extensions.ARB_texture_cube_map) {
@@ -737,7 +737,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
}
ctx->NewState |= _NEW_TEXTURE;
- gl_put_texobj_on_dirty_list( ctx, texObj );
+ texObj->Complete = GL_FALSE;
if (ctx->Driver.TexParameter) {
(*ctx->Driver.TexParameter)( ctx, target, texObj, pname, params );
@@ -1613,64 +1613,3 @@ _mesa_ClientActiveTextureARB( GLenum target )
gl_error(ctx, GL_INVALID_OPERATION, "glActiveTextureARB(target)");
}
}
-
-
-
-/*
- * Put the given texture object into the list of dirty texture objects.
- * When a texture object is dirty we have to reexamine it for completeness
- * and perhaps choose a different texture sampling function.
- */
-void gl_put_texobj_on_dirty_list( GLcontext *ctx, struct gl_texture_object *t )
-{
- ASSERT(ctx);
- ASSERT(t);
- /* Only insert if not already in the dirty list.
- * The Dirty flag is only set iff the texture object is in the dirty list.
- */
- if (!t->Dirty) {
- ASSERT(t->NextDirty == NULL);
- t->Dirty = GL_TRUE;
- t->NextDirty = ctx->Shared->DirtyTexObjList;
- ctx->Shared->DirtyTexObjList = t;
- }
-#ifdef DEBUG
- else {
- /* make sure t is in the list */
- struct gl_texture_object *obj = ctx->Shared->DirtyTexObjList;
- while (obj) {
- if (obj == t) {
- return;
- }
- obj = obj->NextDirty;
- }
- gl_problem(ctx, "Error in gl_put_texobj_on_dirty_list");
- }
-#endif
-}
-
-
-/*
- * Remove a texture object from the dirty texture list.
- */
-void gl_remove_texobj_from_dirty_list( struct gl_shared_state *shared,
- struct gl_texture_object *tObj )
-{
- struct gl_texture_object *t, *prev = NULL;
- ASSERT(shared);
- ASSERT(tObj);
- for (t = shared->DirtyTexObjList; t; t = t->NextDirty) {
- if (t == tObj) {
- if (prev) {
- prev->NextDirty = t->NextDirty;
- }
- else {
- shared->DirtyTexObjList = t->NextDirty;
- }
- return;
- }
- prev = t;
- }
-}
-
-