From de8b4d91a56883c2b2777300d484309601e2e082 Mon Sep 17 00:00:00 2001 From: rude Date: Sat, 12 Jan 2013 12:53:07 +0100 Subject: [PATCH] Use GLint when getting GL_GENERATE_MIPMAP. Using GLboolean caused a stack corruption according to VS2012. --- src/modules/graphics/opengl/Font.cpp | 4 ++-- src/modules/graphics/opengl/Image.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/graphics/opengl/Font.cpp b/src/modules/graphics/opengl/Font.cpp index 7d4195ef8..a7af1eef2 100644 --- a/src/modules/graphics/opengl/Font.cpp +++ b/src/modules/graphics/opengl/Font.cpp @@ -496,8 +496,8 @@ void Font::checkMipmapsCreated() const if (!Image::hasMipmapSupport()) throw love::Exception("Mipmap filtering is not supported on this system!"); - GLboolean mipmapscreated; - glGetTexParameteriv(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, (GLint *)&mipmapscreated); + GLint mipmapscreated; + glGetTexParameteriv(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, &mipmapscreated); // generate mipmaps for this image if we haven't already if (!mipmapscreated) diff --git a/src/modules/graphics/opengl/Image.cpp b/src/modules/graphics/opengl/Image.cpp index 81f17d376..e4140f05a 100644 --- a/src/modules/graphics/opengl/Image.cpp +++ b/src/modules/graphics/opengl/Image.cpp @@ -159,8 +159,8 @@ void Image::checkMipmapsCreated() const bind(); - GLboolean mipmapscreated; - glGetTexParameteriv(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, (GLint *)&mipmapscreated); + GLint mipmapscreated; + glGetTexParameteriv(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, &mipmapscreated); // generate mipmaps for this image if we haven't already if (!mipmapscreated)