summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglframebufferobject_p.h
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-09-10 16:28:20 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-09-10 16:28:20 +1000
commitcea0b5db7f16177882bbfbbe7b4f92307b045bf7 (patch)
tree73f55e2b2ed97f07233ca4382c0d2d3fcaa982fd /src/opengl/qglframebufferobject_p.h
parent66dc9221163a6b225cdfa351b8df7a01f6ce7bf0 (diff)
Return the correct QGLFormat to the OpenGL1 paint engine for FBO's
QGLPaintDevice::format() was returning the context's format, not the format of the window surface's FBO. This caused the OpenGL1 paint engine to think that the window didn't have depth and stencil buffers, even though the FBO most certainly did. This change makes QGLPaintDevice::format() virtual and overrides it in QGLFBOGLPaintDevice to return an updated format that includes the context parameters plus the extra features that the FBO supports. Reviewed-by: Tom Cooksey
Diffstat (limited to 'src/opengl/qglframebufferobject_p.h')
-rw-r--r--src/opengl/qglframebufferobject_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index c11c496aa6..f80209d213 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -110,15 +110,18 @@ public:
virtual QPaintEngine* paintEngine() const {return fbo->paintEngine();}
virtual QSize size() const {return fbo->size();}
virtual QGLContext* context() const {return const_cast<QGLContext *>(QGLContext::currentContext());}
+ virtual QGLFormat format() const {return fboFormat;}
virtual void ensureActiveTarget();
virtual void beginPaint();
virtual void endPaint();
- void setFBO(QGLFramebufferObject* f);
+ void setFBO(QGLFramebufferObject* f,
+ QGLFramebufferObject::Attachment attachment);
private:
bool wasBound;
QGLFramebufferObject* fbo;
+ QGLFormat fboFormat;
};
class QGLFramebufferObjectPrivate