diff options
Diffstat (limited to 'src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp')
-rw-r--r-- | src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp index 96e055870..f23dd8485 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp @@ -841,8 +841,8 @@ void GraphicsHelperGL4::bindFrameBufferAttachment(QOpenGLTexture *texture, const if (target == QOpenGLTexture::Target1DArray || target == QOpenGLTexture::Target2DArray || target == QOpenGLTexture::Target2DMultisampleArray || target == QOpenGLTexture::Target3D) m_funcs->glFramebufferTextureLayer(GL_DRAW_FRAMEBUFFER, attr, texture->textureId(), attachment.m_mipLevel, attachment.m_layer); - else if (target == QOpenGLTexture::TargetCubeMapArray) - m_funcs->glFramebufferTexture3D(GL_DRAW_FRAMEBUFFER, attr, attachment.m_face, texture->textureId(), attachment.m_mipLevel, attachment.m_layer); + else if (target == QOpenGLTexture::TargetCubeMapArray && attachment.m_face != QAbstractTexture::AllFaces) + m_funcs->glFramebufferTextureLayer( GL_DRAW_FRAMEBUFFER, attr, texture->textureId(), attachment.m_mipLevel, attachment.m_layer * 6 + (attachment.m_face - QAbstractTexture::CubeMapPositiveX)); else if (target == QOpenGLTexture::TargetCubeMap && attachment.m_face != QAbstractTexture::AllFaces) m_funcs->glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, attr, attachment.m_face, texture->textureId(), attachment.m_mipLevel); else |