ADDED: RL_TEXTURE_MIPMAP_BIAS_RATIO support to rlTextureParameters() for OpenGL 3.3 #2674

This commit is contained in:
Ray 2022-09-01 11:18:22 +02:00
parent a598754b5b
commit 64cca24526

View file

@ -243,6 +243,7 @@
#define RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST 0x2701 // GL_LINEAR_MIPMAP_NEAREST #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_MIP_LINEAR 0x2703 // GL_LINEAR_MIPMAP_LINEAR
#define RL_TEXTURE_FILTER_ANISOTROPIC 0x3000 // Anisotropic filter (custom identifier) #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_REPEAT 0x2901 // GL_REPEAT
#define RL_TEXTURE_WRAP_CLAMP 0x812F // GL_CLAMP_TO_EDGE #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"); else TRACELOG(RL_LOG_WARNING, "GL: Anisotropic filtering not supported");
#endif #endif
} break; } 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; default: break;
} }