#include "mtypes.h"
#include "enums.h"
#include "api_arrayelt.h"
+#include "texstate.h"
static GLboolean
enable_texture(GLcontext *ctx, GLboolean state, GLbitfield texBit)
{
- const GLuint curr = ctx->Texture.CurrentUnit;
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
const GLbitfield newenabled = state
? (texUnit->Enabled | texBit) : (texUnit->Enabled & ~texBit);
#include "teximage.h"
#include "texobj.h"
#include "texstore.h"
+#include "texstate.h"
/** Set this to 1 to help debug FBO incompleteness problems */
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texObj = _mesa_select_tex_object(ctx, texUnit, target);
_mesa_lock_texture(ctx, texObj);