diff options
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r-- | src/opengl/qglframebufferobject.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index f60eb62..9dbf5c8 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -299,6 +299,12 @@ bool QGLFramebufferObjectFormat::operator!=(const QGLFramebufferObjectFormat& ot return !(*this == other); } +void QGLFBOGLPaintDevice::setFBO(QGLFramebufferObject* f) +{ + fbo = f; + m_thisFBO = fbo->d_func()->fbo; // This shouldn't be needed +} + void QGLFBOGLPaintDevice::ensureActiveTarget() { QGLContext* ctx = const_cast<QGLContext*>(QGLContext::currentContext()); @@ -377,6 +383,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz, QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext()); ctx = QGLContextPrivate::contextGroup(currentContext); glDevice.setFBO(q); + bool ext_detected = (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject); if (!ext_detected || (ext_detected && !qt_resolve_framebufferobject_extensions(currentContext))) return; @@ -389,6 +396,8 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz, glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_FRAMEBUFFER_EXT, fbo); + glDevice.setFBO(q); + QT_CHECK_GLERROR(); // init texture if (samples == 0) { |