diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-01-06 12:26:28 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-06 13:12:32 +0100 |
commit | cd1e9d036ff1354c65b016ba8af0d6d6bd7cea92 (patch) | |
tree | fc7ff2a2fc5c3f2862b3c0e46589fc44ee1f1a9f /examples | |
parent | b2bfcec54cb46fa9e6555d3cb77ae6b995392ac6 (diff) |
Revised createTextureFromBuffer
The context is not passed anymore to texture() and similar functions since
they have to use the current context anyhow.
createTextureFromBuffer() becomes bindTextureToBuffer() which is called
with the texture bound. The integration can also provide its own texture in
case the one created and managed by the surfacebuffer is not suitable.
Change-Id: I1bfc4fe35c0e3db6081b47c551f20f4bca9aa04e
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qwindow-compositor/qwindowcompositor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/qwindow-compositor/qwindowcompositor.cpp b/examples/qwindow-compositor/qwindowcompositor.cpp index 7fe8facc4..8e71ef069 100644 --- a/examples/qwindow-compositor/qwindowcompositor.cpp +++ b/examples/qwindow-compositor/qwindowcompositor.cpp @@ -247,7 +247,7 @@ GLuint QWindowCompositor::composeSurface(QWaylandSurface *surface) if (surface->type() == QWaylandSurface::Shm) { texture = m_textureCache->bindTexture(QOpenGLContext::currentContext(),surface->image()); } else if (surface->type() == QWaylandSurface::Texture) { - texture = surface->texture(QOpenGLContext::currentContext()); + texture = surface->texture(); } functions->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, @@ -272,7 +272,7 @@ void QWindowCompositor::paintChildren(QWaylandSurface *surface, QWaylandSurface if (subSurface->size().isValid()) { GLuint texture = 0; if (subSurface->type() == QWaylandSurface::Texture) { - texture = subSurface->texture(QOpenGLContext::currentContext()); + texture = subSurface->texture(); } else if (surface->type() == QWaylandSurface::Shm ) { texture = m_textureCache->bindTexture(QOpenGLContext::currentContext(),surface->image()); } |