diff --git a/src/osg/FrameBufferObject.cpp b/src/osg/FrameBufferObject.cpp index 9990ecb82..220cfe87e 100644 --- a/src/osg/FrameBufferObject.cpp +++ b/src/osg/FrameBufferObject.cpp @@ -571,7 +571,7 @@ void FrameBufferAttachment::attach(State &state, GLenum target, GLenum attachmen ext->glFramebufferTexture3D(target, attachment_point, GL_TEXTURE_3D, tobj->id(), _ximpl->level, _ximpl->zoffset); break; case Pimpl::TEXTURE2DARRAY: - if (_ximpl->cubeMapFace == Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER) + if (_ximpl->zoffset == Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER) { if (ext->glFramebufferTexture) {