Fix build on MIPS

On MIPS toolchains, the 'mips' keyword is a macro defined to 1.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This commit is contained in:
Paul Cercueil
2019-12-19 11:30:38 +01:00
parent 6a552d5a6f
commit 0bac89e00f
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ namespace graphics
namespace opengl
{
static GLenum createFBO(GLuint &framebuffer, TextureType texType, PixelFormat format, GLuint texture, int layers, int mips)
static GLenum createFBO(GLuint &framebuffer, TextureType texType, PixelFormat format, GLuint texture, int layers, int nb_mips)
{
// get currently bound fbo to reset to it later
GLuint current_fbo = gl.getFramebuffer(OpenGL::FRAMEBUFFER_ALL);
@@ -60,7 +60,7 @@ static GLenum createFBO(GLuint &framebuffer, TextureType texType, PixelFormat fo
// Make sure all faces and layers of the texture are initialized to
// transparent black. This is unfortunately probably pretty slow for
// 2D-array and 3D textures with a lot of layers...
for (int mip = mips - 1; mip >= 0; mip--)
for (int mip = nb_mips - 1; mip >= 0; mip--)
{
int nlayers = layers;
if (texType == TEXTURE_VOLUME)