summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2022-09-01 11:18:22 +0200
committerRay <[email protected]>2022-09-01 11:18:22 +0200
commit64cca24526d8d2f82e87039a1d492dcbe07b994d (patch)
treeab99022515408db49f5e8e608a5d6f1c77c4a061 /src
parenta598754b5bf4fbc5b606ba161fe243666ae4f758 (diff)
downloadraylib-64cca24526d8d2f82e87039a1d492dcbe07b994d.tar.gz
raylib-64cca24526d8d2f82e87039a1d492dcbe07b994d.zip
ADDED: `RL_TEXTURE_MIPMAP_BIAS_RATIO` support to `rlTextureParameters()` for OpenGL 3.3 #2674
Diffstat (limited to 'src')
-rw-r--r--src/rlgl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 123791a0..363b45bd 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -243,6 +243,7 @@
#define RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST 0x2701 // GL_LINEAR_MIPMAP_NEAREST
#define RL_TEXTURE_FILTER_MIP_LINEAR 0x2703 // GL_LINEAR_MIPMAP_LINEAR
#define RL_TEXTURE_FILTER_ANISOTROPIC 0x3000 // Anisotropic filter (custom identifier)
+#define RL_TEXTURE_MIPMAP_BIAS_RATIO 0x4000 // Texture mipmap bias (percentage ratio)
#define RL_TEXTURE_WRAP_REPEAT 0x2901 // GL_REPEAT
#define RL_TEXTURE_WRAP_CLAMP 0x812F // GL_CLAMP_TO_EDGE
@@ -1551,6 +1552,9 @@ void rlTextureParameters(unsigned int id, int param, int value)
else TRACELOG(RL_LOG_WARNING, "GL: Anisotropic filtering not supported");
#endif
} break;
+#if defined(GRAPHICS_API_OPENGL_33)
+ case RL_TEXTURE_MIPMAP_BIAS_RATIO: glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, value/100.0f);
+#endif
default: break;
}