Browse Source

setting MAX_LEVEL based on actual mipcount input (#4622)

master
Jett 1 day ago
committed by GitHub
parent
commit
0212ed0a4b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/rlgl.h

+ 1
- 0
src/rlgl.h View File

@ -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…
Cancel
Save