diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-04-27 15:19:43 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-05-20 11:12:29 +0000 |
commit | de7f96bb4046592d5b7491565d77414ab22a6ffe (patch) | |
tree | 2f23427c62805e2e1c20846d9837edd7849f0661 /src | |
parent | de219a6a08177e845158ba29c2cc0ad542be9968 (diff) |
Texture: proper code alignment
Change-Id: I28f12dbc9418fc8a5d0254a43c02a66dd420e459
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/render/texture/texture.cpp | 42 | ||||
-rw-r--r-- | src/render/texture/texturedatamanager_p.h | 4 |
2 files changed, 23 insertions, 23 deletions
diff --git a/src/render/texture/texture.cpp b/src/render/texture/texture.cpp index 7d01e8080..5037d395a 100644 --- a/src/render/texture/texture.cpp +++ b/src/render/texture/texture.cpp @@ -341,20 +341,20 @@ void Texture::setToGLTexture(QTextureImageData *imgData) if (imgData->isCompressed()) { m_gl->setCompressedData(level, - layer, - static_cast<QOpenGLTexture::CubeMapFace>(QOpenGLTexture::CubeMapPositiveX + face), - bytes.size(), - bytes.constData()); + layer, + static_cast<QOpenGLTexture::CubeMapFace>(QOpenGLTexture::CubeMapPositiveX + face), + bytes.size(), + bytes.constData()); } else { QOpenGLPixelTransferOptions uploadOptions; uploadOptions.setAlignment(1); m_gl->setData(level, - layer, - static_cast<QOpenGLTexture::CubeMapFace>(QOpenGLTexture::CubeMapPositiveX + face), - imgData->pixelFormat(), - imgData->pixelType(), - bytes.constData(), - &uploadOptions); + layer, + static_cast<QOpenGLTexture::CubeMapFace>(QOpenGLTexture::CubeMapPositiveX + face), + imgData->pixelFormat(), + imgData->pixelType(), + bytes.constData(), + &uploadOptions); } } } @@ -430,17 +430,17 @@ void Texture::updateWrapAndFilters() void Texture::updateDNA() { - int key = m_width + m_height + m_depth + m_layers + m_mipLevels + - (m_generateMipMaps ? 1 : 0) + - static_cast<int>(m_target) + - static_cast<int>(m_format) + - static_cast<int>(m_magnificationFilter) + - static_cast<int>(m_minificationFilter) + - static_cast<int>(m_wrapModeX) + - static_cast<int>(m_wrapModeY) + - static_cast<int>(m_wrapModeZ) + - static_cast<int>(m_comparisonFunction) + - static_cast<int>(m_comparisonMode); + const int key = m_width + m_height + m_depth + m_layers + m_mipLevels + + (m_generateMipMaps ? 1 : 0) + + static_cast<int>(m_target) + + static_cast<int>(m_format) + + static_cast<int>(m_magnificationFilter) + + static_cast<int>(m_minificationFilter) + + static_cast<int>(m_wrapModeX) + + static_cast<int>(m_wrapModeY) + + static_cast<int>(m_wrapModeZ) + + static_cast<int>(m_comparisonFunction) + + static_cast<int>(m_comparisonMode); m_textureDNA = ::qHash(key) + ::qHash(m_maximumAnisotropy); // apply non-unique hashes from texture images or texture data diff --git a/src/render/texture/texturedatamanager_p.h b/src/render/texture/texturedatamanager_p.h index ebff9dc3a..2a285c695 100644 --- a/src/render/texture/texturedatamanager_p.h +++ b/src/render/texture/texturedatamanager_p.h @@ -91,8 +91,8 @@ public: private: QVector<Qt3DCore::QNodeId> m_texturesPending; - QVector<FunctorTextureDataPair > m_textureDataFunctors; - QVector<FunctorImageHandlesPair > m_texturesImagesPerFunctor; + QVector<FunctorTextureDataPair> m_textureDataFunctors; + QVector<FunctorImageHandlesPair> m_texturesImagesPerFunctor; mutable QMutex m_mutex; QVector<HTextureData> m_textureHandlesToRelease; }; |