Use correct framebuffer object.
authorHannu Lyytinen <hannu.lyytinen@nomovok.com>
Tue, 10 Apr 2012 17:29:33 +0000 (20:29 +0300)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Apr 2012 10:41:20 +0000 (12:41 +0200)
KMS plugin deals with FBO IDs not equal to zero (the default FBO),
so return the correct ID.

Change-Id: I904fc0b8d732f856b4526bd7f73cc48c358c8441
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
src/plugins/platforms/kms/qkmscontext.cpp
src/plugins/platforms/kms/qkmscontext.h

index 66829bc..4ae5325 100644 (file)
@@ -110,4 +110,11 @@ QSurfaceFormat QKmsContext::format() const
     return QSurfaceFormat();
 }
 
+GLuint QKmsContext::defaultFramebufferObject(QPlatformSurface *surface) const
+{
+    QPlatformWindow *window = static_cast<QPlatformWindow *>(surface);
+    QKmsScreen *screen = static_cast<QKmsScreen *> (QPlatformScreen::platformScreenForWindow(window->window()));
+    return screen->framebufferObject();
+}
+
 QT_END_NAMESPACE
index 57f3a1a..6378780 100644 (file)
@@ -65,6 +65,8 @@ public:
 
     EGLContext eglContext() const;
 
+    GLuint defaultFramebufferObject(QPlatformSurface *surface) const;
+
 private:
 
     QKmsDevice *m_device;