#define SETUP_CODE \
struct affine_info info; \
struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
- struct gl_texture_object *obj = \
+ const struct gl_texture_object *obj = \
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
- const GLint b = obj->BaseLevel; \
- const GLfloat twidth = (GLfloat) obj->Image[0][b]->Width; \
- const GLfloat theight = (GLfloat) obj->Image[0][b]->Height; \
- info.texture = (const GLchan *) obj->Image[0][b]->Data; \
- info.twidth_log2 = obj->Image[0][b]->WidthLog2; \
- info.smask = obj->Image[0][b]->Width - 1; \
- info.tmask = obj->Image[0][b]->Height - 1; \
- info.format = obj->Image[0][b]->_BaseFormat; \
+ const struct gl_texture_image *texImg = \
+ obj->Image[0][obj->BaseLevel]; \
+ const GLfloat twidth = (GLfloat) texImg->Width; \
+ const GLfloat theight = (GLfloat) texImg->Height; \
+ info.texture = (const GLchan *) texImg->Data; \
+ info.twidth_log2 = texImg->WidthLog2; \
+ info.smask = texImg->Width - 1; \
+ info.tmask = texImg->Height - 1; \
+ info.format = texImg->TexFormat; \
info.filter = obj->MinFilter; \
info.envmode = unit->EnvMode; \
+ info.er = 0; \
+ info.eg = 0; \
+ info.eb = 0; \
span.arrayMask |= SPAN_RGBA; \
\
if (info.envmode == GL_BLEND) { \
#define SETUP_CODE \
struct persp_info info; \
const struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
- struct gl_texture_object *obj = \
+ const struct gl_texture_object *obj = \
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
- const GLint b = obj->BaseLevel; \
- info.texture = (const GLchan *) obj->Image[0][b]->Data; \
- info.twidth_log2 = obj->Image[0][b]->WidthLog2; \
- info.smask = obj->Image[0][b]->Width - 1; \
- info.tmask = obj->Image[0][b]->Height - 1; \
- info.format = obj->Image[0][b]->_BaseFormat; \
+ const struct gl_texture_image *texImg = \
+ obj->Image[0][obj->BaseLevel]; \
+ info.texture = (const GLchan *) texImg->Data; \
+ info.twidth_log2 = texImg->WidthLog2; \
+ info.smask = texImg->Width - 1; \
+ info.tmask = texImg->Height - 1; \
+ info.format = texImg->TexFormat; \
info.filter = obj->MinFilter; \
info.envmode = unit->EnvMode; \
+ info.er = 0; \
+ info.eg = 0; \
+ info.eb = 0; \
\
if (info.envmode == GL_BLEND) { \
/* potential off-by-one error here? (1.0f -> 2048 -> 0) */ \