浏览代码

setting MAX_LEVEL based on actual mipcount input (#4622)

master
Jett 2 天前
committed by GitHub
父节点
当前提交
0212ed0a4b
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. +1
    -0
      src/rlgl.h

+ 1
- 0
src/rlgl.h 查看文件

@ -3301,6 +3301,7 @@ unsigned int rlLoadTexture(const void *data, int width, int height, int format,
// Activate Trilinear filtering if mipmaps are available
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, mipmapCount); // user defined mip count would break without this.
}
#endif

正在加载...
取消
保存