From 83052dc7c7ddb8169e1e5607a2fb2f9c6097c6f0 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 5 Nov 2009 14:12:55 +0100 Subject: Remove unnessisary QGLFBOGLPaintDevice re-implementations Now QGLFBO doesn't do stacking, QGLPaintDevice's base implementation is ok to use. Reviewed-By: Trond --- src/opengl/qglframebufferobject.cpp | 30 ------------------------------ src/opengl/qglframebufferobject_p.h | 3 --- 2 files changed, 33 deletions(-) diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 5295b6d..ddb107e 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -342,36 +342,6 @@ QGLContext *QGLFBOGLPaintDevice::context() const return fboContext; } -void QGLFBOGLPaintDevice::ensureActiveTarget() -{ - if (QGLContext::currentContext() != context()) - context()->makeCurrent(); - - QGLContext* ctx = const_cast(QGLContext::currentContext()); - Q_ASSERT(ctx); - const GLuint fboId = fbo->d_func()->fbo(); - if (ctx->d_func()->current_fbo != fboId) { - ctx->d_func()->current_fbo = fboId; - glBindFramebuffer(GL_FRAMEBUFFER_EXT, fboId); - } -} - -void QGLFBOGLPaintDevice::beginPaint() -{ - if (QGLContext::currentContext() != context()) - context()->makeCurrent(); - - wasBound = fbo->isBound(); - if (!wasBound) - fbo->bind(); -} - -void QGLFBOGLPaintDevice::endPaint() -{ - if (!wasBound) - fbo->release(); -} - bool QGLFramebufferObjectPrivate::checkFramebufferStatus() const { QGL_FUNCP_CONTEXT; diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h index c341459..800cb68 100644 --- a/src/opengl/qglframebufferobject_p.h +++ b/src/opengl/qglframebufferobject_p.h @@ -111,9 +111,6 @@ public: virtual QSize size() const {return fbo->size();} virtual QGLContext* context() const; virtual QGLFormat format() const {return fboFormat;} - virtual void ensureActiveTarget(); - virtual void beginPaint(); - virtual void endPaint(); void setFBO(QGLFramebufferObject* f, QGLFramebufferObject::Attachment attachment); -- cgit v0.12