From a13450b36f6a5dfe3121ad344aab4ff598c0c4ab Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 8 Sep 2016 22:25:04 -0700 Subject: [PATCH] Fix ubuntu warning --- libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp index ce359ad6c2..db8186221c 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp @@ -106,8 +106,10 @@ bool TransferState::increment() { return true; } + uint8_t maxFace = (uint8_t)((_texture._target == GL_TEXTURE_CUBE_MAP) ? GLTexture::CUBE_NUM_FACES : 1); + uint8_t nextFace = _face + 1; // Done with this face? Move on to the next - if (_face + 1 < ((_texture._target == GL_TEXTURE_CUBE_MAP) ? GLTexture::CUBE_NUM_FACES : 1)) { + if (nextFace < maxFace) { ++_face; _mipOffset = uvec3(0); _mipLevel = 0;