mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
Use GLint when getting GL_GENERATE_MIPMAP.
Using GLboolean caused a stack corruption according to VS2012.
This commit is contained in:
@@ -496,8 +496,8 @@ void Font::checkMipmapsCreated() const
|
|||||||
if (!Image::hasMipmapSupport())
|
if (!Image::hasMipmapSupport())
|
||||||
throw love::Exception("Mipmap filtering is not supported on this system!");
|
throw love::Exception("Mipmap filtering is not supported on this system!");
|
||||||
|
|
||||||
GLboolean mipmapscreated;
|
GLint mipmapscreated;
|
||||||
glGetTexParameteriv(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, (GLint *)&mipmapscreated);
|
glGetTexParameteriv(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, &mipmapscreated);
|
||||||
|
|
||||||
// generate mipmaps for this image if we haven't already
|
// generate mipmaps for this image if we haven't already
|
||||||
if (!mipmapscreated)
|
if (!mipmapscreated)
|
||||||
|
|||||||
@@ -159,8 +159,8 @@ void Image::checkMipmapsCreated() const
|
|||||||
|
|
||||||
bind();
|
bind();
|
||||||
|
|
||||||
GLboolean mipmapscreated;
|
GLint mipmapscreated;
|
||||||
glGetTexParameteriv(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, (GLint *)&mipmapscreated);
|
glGetTexParameteriv(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, &mipmapscreated);
|
||||||
|
|
||||||
// generate mipmaps for this image if we haven't already
|
// generate mipmaps for this image if we haven't already
|
||||||
if (!mipmapscreated)
|
if (!mipmapscreated)
|
||||||
|
|||||||
Reference in New Issue
Block a user