summaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-26 17:18:37 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-26 21:08:06 +0200
commitccb9eb0cc17c689f6be61e83d2d9fb5724a6338d (patch)
treeb68f89d1bdf582b5dd89259b2b1da5dd43cb1b0b /examples/quick
parente79281533d61dda90d1c5995345a66e6089c7501 (diff)
Follow QQuickGraphicsDevice changes in QQuickRenderTarget
They are not strictly related of course, but the API pattern should be kept. We can also move away from the QSGTexture dependency which is good since that was never directly related. Change-Id: I9aedff5918443bda3d6e3ee1ea389071222d1ad7 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp6
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp b/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp
index c574343a98..884f7e3981 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp
@@ -368,9 +368,9 @@ void Window::updateQuick()
qWarning("Failed to initialize redirected Qt Quick rendering");
// Redirect Qt Quick's output.
- m_quickWindow->setRenderTarget(QQuickRenderTarget::fromNativeTexture({ quint64(m_res.texture), 0 },
- QSize(QML_WIDTH, QML_HEIGHT),
- SAMPLE_COUNT));
+ m_quickWindow->setRenderTarget(QQuickRenderTarget::fromD3D11Texture(m_res.texture,
+ QSize(QML_WIDTH, QML_HEIGHT),
+ SAMPLE_COUNT));
m_quickInitialized = true;
}
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp
index 0d29a155dd..8f3bfe77db 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp
@@ -182,7 +182,7 @@ void WindowSingleThreaded::createTexture()
f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
f->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_textureSize.width(), m_textureSize.height(), 0,
GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
- m_quickWindow->setRenderTarget(QQuickRenderTarget::fromNativeTexture({ quint64(m_textureId), 0 }, m_textureSize));
+ m_quickWindow->setRenderTarget(QQuickRenderTarget::fromOpenGLTexture(m_textureId, m_textureSize));
}
void WindowSingleThreaded::destroyTexture()