summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-08-13 09:55:34 -0600
committerBrian Paul <[email protected]>2009-08-13 12:50:56 -0600
commit6aa7a03d856f4cfdbed493c976387b2164a0c922 (patch)
tree0f3f03b94f78a94c069bb86ef1685be69b50772a /src/mesa/main/texstate.h
parent73b150c816c46a88e3e5d97f9b73ab0095f2bc60 (diff)
mesa: use _mesa_get_current_tex_unit() in more places
Diffstat (limited to 'src/mesa/main/texstate.h')
-rw-r--r--src/mesa/main/texstate.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h
index a7d7088c621..17ac68000c5 100644
--- a/src/mesa/main/texstate.h
+++ b/src/mesa/main/texstate.h
@@ -35,6 +35,18 @@
#include "mtypes.h"
+/**
+ * Return pointer to current texture unit.
+ * This the texture unit set by glActiveTexture(), not glClientActiveTexture().
+ */
+static INLINE struct gl_texture_unit *
+_mesa_get_current_tex_unit(GLcontext *ctx)
+{
+ ASSERT(ctx->Texture.CurrentUnit < Elements(ctx->Texture.Unit));
+ return &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]);
+}
+
+
extern void
_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst );
@@ -48,16 +60,14 @@ _mesa_print_texunit_state( GLcontext *ctx, GLuint unit );
*/
/*@{*/
-
-/*
- * GL_ARB_multitexture
- */
extern void GLAPIENTRY
_mesa_ActiveTextureARB( GLenum target );
extern void GLAPIENTRY
_mesa_ClientActiveTextureARB( GLenum target );
+/*@}*/
+
/**
* \name Initialization, state maintenance