summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-08-02 00:38:23 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-08-02 00:38:23 +0000
commit5e2c92b8b6cc7d0bc06e1342e25ef411d230616a (patch)
tree448b3e34ee000ace5ac3cfcd19701d97aa6ed070
parent84e8b8ea5ae11d74fa9a5b4dd41edf8058be8eb3 (diff)
initialize texture priorities to 1.0, clean-up of _mesa_PrioritizeTextures()
-rw-r--r--src/mesa/main/texobj.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index e5542840818..3b6e3452588 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1,7 +1,7 @@
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.4
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
@@ -65,6 +65,7 @@ gl_alloc_texture_object( struct gl_shared_state *shared, GLuint name,
obj->RefCount = 1;
obj->Name = name;
obj->Dimensions = dimensions;
+ obj->Priority = 1.0F;
obj->WrapS = GL_REPEAT;
obj->WrapT = GL_REPEAT;
obj->MinFilter = GL_NEAREST_MIPMAP_LINEAR;
@@ -610,19 +611,17 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName,
GLint i;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPrioritizeTextures");
- if (n<0) {
+ if (n < 0) {
gl_error( ctx, GL_INVALID_VALUE, "glPrioritizeTextures" );
return;
}
- for (i=0;i<n;i++) {
- struct gl_texture_object *t;
- if (texName[i]>0) {
- t = (struct gl_texture_object *)
+ for (i = 0; i < n; i++) {
+ if (texName[i] > 0) {
+ struct gl_texture_object *t = (struct gl_texture_object *)
_mesa_HashLookup(ctx->Shared->TexObjects, texName[i]);
if (t) {
t->Priority = CLAMP( priorities[i], 0.0F, 1.0F );
-
if (ctx->Driver.PrioritizeTexture)
ctx->Driver.PrioritizeTexture( ctx, t, t->Priority );
}