diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-11-08 17:57:42 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2019-11-15 08:20:00 +0000 |
commit | 6f58f70960f6764998dab5919989993e5803d3b9 (patch) | |
tree | d6976fb109cd669e1cc619701bd172bc2f058d9a /src/compositor/compositor_api | |
parent | a17972cca7fe1bd592077af9a9c0b66f5a1ee4de (diff) | |
download | qtwayland-6f58f70960f6764998dab5919989993e5803d3b9.tar.gz |
Compositor: Use RHI-compatible API
Egl clients now work when the compositor is started with QSG_RHI=1 and
QSG_RHI_BACKEND=gl in the environment.
Change-Id: I4ebcee174c86dd65470d41b5799c12def6b68f85
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/compositor/compositor_api')
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index 80e84a88..6fd93927 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -289,8 +289,9 @@ public: } auto texture = buffer.toOpenGLTexture(); + GLuint textureId = texture->textureId(); auto size = surface->bufferSize(); - m_sgTex = surfaceItem->window()->createTextureFromId(texture->textureId(), size, opt); + m_sgTex = surfaceItem->window()->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, &textureId, 0, size, opt); #else qCWarning(qLcWaylandCompositor) << "Without OpenGL support only shared memory textures are supported"; #endif |