diff options
author | Brian Paul <[email protected]> | 2002-06-15 03:03:06 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-06-15 03:03:06 +0000 |
commit | 8afe7de8deaf3c9613fd68b344de8c52b02b1879 (patch) | |
tree | f600a192c9d0136faea8864a53eabc819eeb791f /src/mesa/swrast/s_span.c | |
parent | 8bdd0dc8d0e9c9cb2c71fbdd4c77e982cfc0b350 (diff) |
Implemented GL_NV_texture_rectangle extension.
Replace struct gl_texure_object's Dimension w/ Target field.
Added _EnabledUnits to struct gl_texture_attrib - the _ReallyEnabled
field is obsolete, but still present for now. This effectively
removes the 8-texture units limit, 32 units now possible, but unlikely!
New TEXTURE_1D/2D/3D/CUBE/RECT_BIT tokens for unit->_ReallyEnabled field.
Updated device drivers to use ctx->Texture._EnabledUnits.
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r-- | src/mesa/swrast/s_span.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 0a1e3176083..a3271d7806d 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1,4 +1,4 @@ -/* $Id: s_span.c,v 1.43 2002/06/15 02:38:17 brianp Exp $ */ +/* $Id: s_span.c,v 1.44 2002/06/15 03:03:11 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -345,7 +345,7 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) ASSERT(span->interpMask & SPAN_TEXTURE); ASSERT(!(span->arrayMask & SPAN_TEXTURE)); - if (ctx->Texture._ReallyEnabled & ~TEXTURE0_ANY) { + if (ctx->Texture._EnabledUnits > 1) { /* multitexture */ GLuint u; span->arrayMask |= SPAN_TEXTURE; @@ -355,8 +355,8 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) const struct gl_texture_image *img = obj->Image[obj->BaseLevel]; GLboolean needLambda = (obj->MinFilter != obj->MagFilter); if (needLambda) { - const GLfloat texW = (GLfloat) img->Width; - const GLfloat texH = (GLfloat) img->Height; + const GLfloat texW = (GLfloat) img->WidthScale; + const GLfloat texH = (GLfloat) img->HeightScale; const GLfloat dsdx = span->texStepX[u][0]; const GLfloat dsdy = span->texStepY[u][0]; const GLfloat dtdx = span->texStepX[u][1]; @@ -432,8 +432,8 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) span->arrayMask |= SPAN_TEXTURE; if (needLambda) { /* just texture unit 0, with lambda */ - const GLfloat texW = (GLfloat) img->Width; - const GLfloat texH = (GLfloat) img->Height; + const GLfloat texW = (GLfloat) img->WidthScale; + const GLfloat texH = (GLfloat) img->HeightScale; const GLfloat dsdx = span->texStepX[0][0]; const GLfloat dsdy = span->texStepY[0][0]; const GLfloat dtdx = span->texStepX[0][1]; @@ -1137,7 +1137,7 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) span->primitive == GL_POLYGON || span->primitive == GL_BITMAP); ASSERT(span->end <= MAX_WIDTH); ASSERT((span->interpMask & span->arrayMask) == 0); - ASSERT(ctx->Texture._ReallyEnabled); + ASSERT(ctx->Texture._EnabledUnits); /* printf("%s() interp 0x%x array 0x%x\n", __FUNCTION__, span->interpMask, span->arrayMask); |