Skip to content

Commit

Permalink
setting MAX_LEVEL based on actual mipcount input
Browse files Browse the repository at this point in the history
  • Loading branch information
JettMonstersGoBoom committed Dec 20, 2024
1 parent 26e12d6 commit c314347
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rlgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c314347

Please sign in to comment.