summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandintegration.cpp
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-10-27 21:44:04 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-01-25 17:59:45 (GMT)
commit81e5d2db862cfaf58eb6394c9fe1968547926c78 (patch)
treef28a3300d8bc672f46214834c9828f83b1def373 /src/plugins/platforms/wayland/qwaylandintegration.cpp
parent8288733d680bba6be762ed0e26aa4e95cdfe68e8 (diff)
downloadQt-81e5d2db862cfaf58eb6394c9fe1968547926c78.zip
Qt-81e5d2db862cfaf58eb6394c9fe1968547926c78.tar.gz
Qt-81e5d2db862cfaf58eb6394c9fe1968547926c78.tar.bz2
Wayland: render to a texture, not a renderbuffer
This will let us source from offscreen GL widget surfaces and copy into the parent surface.
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandintegration.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylandintegration.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp
index 6842dbf..866a197 100644
--- a/src/plugins/platforms/wayland/qwaylandintegration.cpp
+++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp
@@ -538,10 +538,10 @@ void QWaylandGLContext::makeCurrent()
eglMakeCurrent(mDisplay->eglDisplay(), 0, 0, mBuffer->mContext);
glBindFramebuffer(GL_FRAMEBUFFER, mBuffer->mFbo);
- glBindRenderbuffer(GL_RENDERBUFFER, mBuffer->mRbo);
- glEGLImageTargetRenderbufferStorageOES(GL_RENDERBUFFER, mBuffer->mImage);
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_RENDERBUFFER, mBuffer->mRbo);
+ glBindTexture(GL_TEXTURE_2D, mBuffer->mTexture);
+ glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, mBuffer->mImage);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+ GL_TEXTURE_2D, mBuffer->mTexture, 0);
}
void QWaylandGLContext::doneCurrent()