From fc29397d91d3839cc7c37705f5b5c11203af771a Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 15 Apr 2016 10:10:04 -0700 Subject: [PATCH] Clening up from review comments --- libraries/gpu/src/gpu/GLBackendTexture.cpp | 2 +- libraries/model/src/model/TextureMap.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/gpu/src/gpu/GLBackendTexture.cpp b/libraries/gpu/src/gpu/GLBackendTexture.cpp index 3443bee611..097d7f73cd 100755 --- a/libraries/gpu/src/gpu/GLBackendTexture.cpp +++ b/libraries/gpu/src/gpu/GLBackendTexture.cpp @@ -214,7 +214,7 @@ bool GLBackend::GLTexture::isReady() const { // Move content bits from the CPU to the GPU for a given mip / face void GLBackend::GLTexture::transferMip(GLenum target, const Texture::PixelsPointer& mip) const { - GLTexelFormat texelFormat = GLTexelFormat::evalGLTexelFormat(_gpuTexture.getTexelFormat(), mip->getFormat()); + GLTexelFormat texelFormat = GLTexelFormat::evalGLTexelFormat(_gpuTexture.getTexelFormat(), mip->getFormat()); glTexSubImage2D(target, 0, 0, 0, _gpuTexture.getWidth(), _gpuTexture.getHeight(), texelFormat.format, texelFormat.type, mip->readData()); (void)CHECK_GL_ERROR(); } diff --git a/libraries/model/src/model/TextureMap.cpp b/libraries/model/src/model/TextureMap.cpp index a41e42f606..1ef8d57945 100755 --- a/libraries/model/src/model/TextureMap.cpp +++ b/libraries/model/src/model/TextureMap.cpp @@ -235,7 +235,6 @@ gpu::Texture* TextureUsage::createNormalTextureFromBumpImage(const QImage& srcIm image = image.convertToFormat(QImage::Format_RGB888); } - #if 1 // PR 5540 by AlessandroSigna integrated here as a specialized TextureLoader for bumpmaps // The conversion is done using the Sobel Filter to calculate the derivatives from the grayscale image const double pStrength = 2.0; @@ -285,8 +284,7 @@ gpu::Texture* TextureUsage::createNormalTextureFromBumpImage(const QImage& srcIm result.setPixel(i, j, qRgbValue); } } - #endif - + gpu::Texture* theTexture = nullptr; if ((image.width() > 0) && (image.height() > 0)) {