summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-08-28 03:04:41 +0000
committerBrian Paul <[email protected]>2003-08-28 03:04:41 +0000
commit781fb93877ea3a6faeefcdb48d9b463da7d954a3 (patch)
treec933acef1652c7af93315b5a74cd735793e68740 /src/mesa/main/texstate.c
parenta6ed6f48e6bf4ca5427d921cac863cf3b42f7efc (diff)
Added OpenGL 1.4's per-texture LOD bias.
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 8110772d3c8..2c1d155f52e 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1399,6 +1399,14 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
return;
}
break;
+ 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);
+ }
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -1775,6 +1783,12 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
return;
}
break;
+ case GL_TEXTURE_LOD_BIAS:
+ if (ctx->Extensions.EXT_texture_lod_bias) {
+ *params = obj->LodBias;
+ break;
+ }
+ break;
default:
; /* silence warnings */
}
@@ -1801,6 +1815,12 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
switch (pname) {
case GL_TEXTURE_MAG_FILTER:
*params = (GLint) obj->MagFilter;
+ case GL_TEXTURE_LOD_BIAS:
+ if (ctx->Extensions.EXT_texture_lod_bias) {
+ *params = (GLint) obj->LodBias;
+ break;
+ }
+ break;
return;
case GL_TEXTURE_MIN_FILTER:
*params = (GLint) obj->MinFilter;