diff options
author | Brian Paul <[email protected]> | 2003-08-28 23:31:00 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-08-28 23:31:00 +0000 |
commit | f5515cb4af6a4d745e4764d4ca1ed2eb30932319 (patch) | |
tree | 4a580c463d52da96099a4af1b242d9f5cfeb8761 /src/mesa/main/texstate.c | |
parent | 760960028f189e3afcbfef1f877dbd5b86fd1ae4 (diff) |
Move clamping of texture LOD bias to texture application time.
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r-- | src/mesa/main/texstate.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 2c1d155f52e..a62106aa491 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -525,8 +525,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) if (texUnit->LodBias == param[0]) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->LodBias = CLAMP(param[0], -ctx->Const.MaxTextureLodBias, - ctx->Const.MaxTextureLodBias); + texUnit->LodBias = param[0]; } else { TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); @@ -1402,9 +1401,10 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) case GL_TEXTURE_LOD_BIAS: /* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias*/ if (ctx->Extensions.EXT_texture_lod_bias) { - texObj->LodBias = CLAMP(params[0], - -ctx->Const.MaxTextureLodBias, - ctx->Const.MaxTextureLodBias); + if (texObj->LodBias != params[0]) { + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + texObj->LodBias = params[0]; + } } break; |