From cd1e9d036ff1354c65b016ba8af0d6d6bd7cea92 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 6 Jan 2014 12:26:28 +0100 Subject: Revised createTextureFromBuffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- examples/qwindow-compositor/qwindowcompositor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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()); } -- cgit v1.2.3