瀏覽代碼

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

Loading…
取消
儲存