summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-19 16:16:48 -0600
committerBrian Paul <brianp@vmware.com>2009-09-19 16:43:17 -0600
commit883dd9d770f0d25fb8474dc381faa99ee38de0e6 (patch)
tree57af13eaea642d22be7fc561fb8e2acac8a99a49 /src/mesa
parent3ed9dab19cfb2576f2a0fef92107f9246db7bdc1 (diff)
mesa: use _mesa_get_current_tex_unit() helper
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texgen.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index e3feb024c3..b3ecfc784e 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -35,6 +35,7 @@
#include "main/enums.h"
#include "main/macros.h"
#include "main/texgen.h"
+#include "main/texstate.h"
#include "math/m_matrix.h"
@@ -79,7 +80,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -231,7 +232,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -269,7 +270,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -307,7 +308,7 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {