summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-08-18 19:45:42 +0000
committerBrian Paul <[email protected]>2003-08-18 19:45:42 +0000
commit8a033fa13514e3b78612ba1678182c9ea8290cd4 (patch)
treec8ead30a072e2d89be585603f9526862a7077dfc
parent01bb309cce71fde03945f3d9ded7855f71674224 (diff)
minor code improvement in glGenTextures
-rw-r--r--src/mesa/main/texobj.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 509523a130c..ff0a0535f11 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -46,8 +46,8 @@
/*@{*/
/**
- * Allocate and initialize a new texture object and add it to the linked list of
- * texture objects.
+ * Allocate and initialize a new texture object. But don't put it into the
+ * texture object hash table.
*
* Called via ctx->Driver.NewTextureObject, unless overridden by a device
* driver.
@@ -616,11 +616,6 @@ _mesa_GenTextures( GLsizei n, GLuint *texName )
first = _mesa_HashFindFreeKeyBlock(ctx->Shared->TexObjects, n);
- /* Return the texture names */
- for (i=0;i<n;i++) {
- texName[i] = first + i;
- }
-
/* Allocate new, empty texture objects */
for (i = 0; i < n; i++) {
struct gl_texture_object *texObj;
@@ -632,6 +627,7 @@ _mesa_GenTextures( GLsizei n, GLuint *texName )
return;
}
_mesa_save_texture_object(ctx, texObj);
+ texName[i] = name;
}
_glthread_UNLOCK_MUTEX(GenTexturesLock);