mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 09:09:56 +02:00
Clening up from review comments
This commit is contained in:
parent
920ab88ef3
commit
fc29397d91
2 changed files with 2 additions and 4 deletions
|
@ -214,7 +214,7 @@ bool GLBackend::GLTexture::isReady() const {
|
||||||
|
|
||||||
// Move content bits from the CPU to the GPU for a given mip / face
|
// 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 {
|
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());
|
glTexSubImage2D(target, 0, 0, 0, _gpuTexture.getWidth(), _gpuTexture.getHeight(), texelFormat.format, texelFormat.type, mip->readData());
|
||||||
(void)CHECK_GL_ERROR();
|
(void)CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,7 +235,6 @@ gpu::Texture* TextureUsage::createNormalTextureFromBumpImage(const QImage& srcIm
|
||||||
image = image.convertToFormat(QImage::Format_RGB888);
|
image = image.convertToFormat(QImage::Format_RGB888);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
|
||||||
// PR 5540 by AlessandroSigna integrated here as a specialized TextureLoader for bumpmaps
|
// 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
|
// The conversion is done using the Sobel Filter to calculate the derivatives from the grayscale image
|
||||||
const double pStrength = 2.0;
|
const double pStrength = 2.0;
|
||||||
|
@ -285,8 +284,7 @@ gpu::Texture* TextureUsage::createNormalTextureFromBumpImage(const QImage& srcIm
|
||||||
result.setPixel(i, j, qRgbValue);
|
result.setPixel(i, j, qRgbValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
gpu::Texture* theTexture = nullptr;
|
gpu::Texture* theTexture = nullptr;
|
||||||
if ((image.width() > 0) && (image.height() > 0)) {
|
if ((image.width() > 0) && (image.height() > 0)) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue