aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/metalunderqml
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-04 01:00:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-10-04 11:29:16 +0200
commit9c7121df1579d38c7f4136da6146d7acae8fedcc (patch)
tree0917e293d83b4c1ce635cf65185e6ad98fe66519 /examples/quick/scenegraph/metalunderqml
parentf529d38103a6c1c5c7b76ad92e0e5641719e369e (diff)
parentc211b93bb87308601fe1c808634eb648d1949c40 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/imports/qtquick2/plugins.qmltypes src/quick/items/qquickitemsmodule.cpp Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
Diffstat (limited to 'examples/quick/scenegraph/metalunderqml')
-rw-r--r--examples/quick/scenegraph/metalunderqml/metalsquircle.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/quick/scenegraph/metalunderqml/metalsquircle.mm b/examples/quick/scenegraph/metalunderqml/metalsquircle.mm
index 8a1a03dc68..5ca6daa01a 100644
--- a/examples/quick/scenegraph/metalunderqml/metalsquircle.mm
+++ b/examples/quick/scenegraph/metalunderqml/metalsquircle.mm
@@ -215,7 +215,7 @@ void SquircleRenderer::frameStart()
prepareShader(FragmentStage);
if (!m_initialized)
- init(m_window->graphicsStateInfo()->framesInFlight);
+ init(m_window->graphicsStateInfo().framesInFlight);
}
static const float vertices[] = {
@@ -233,7 +233,7 @@ void SquircleRenderer::mainPassRecordingStart()
// the scenegraph's main renderpass. It does not create its own passes,
// rendertargets, etc. so no synchronization is needed.
- const QQuickWindow::GraphicsStateInfo *stateInfo = m_window->graphicsStateInfo();
+ const QQuickWindow::GraphicsStateInfo &stateInfo(m_window->graphicsStateInfo());
QSGRendererInterface *rif = m_window->rendererInterface();
id<MTLRenderCommandEncoder> encoder = (id<MTLRenderCommandEncoder>) rif->getResource(
@@ -242,7 +242,7 @@ void SquircleRenderer::mainPassRecordingStart()
m_window->beginExternalCommands();
- void *p = [m_ubuf[stateInfo->currentFrameSlot] contents];
+ void *p = [m_ubuf[stateInfo.currentFrameSlot] contents];
float t = m_t;
memcpy(p, &t, 4);
@@ -255,7 +255,7 @@ void SquircleRenderer::mainPassRecordingStart()
vp.zfar = 1;
[encoder setViewport: vp];
- [encoder setFragmentBuffer: m_ubuf[stateInfo->currentFrameSlot] offset: 0 atIndex: 0];
+ [encoder setFragmentBuffer: m_ubuf[stateInfo.currentFrameSlot] offset: 0 atIndex: 0];
[encoder setVertexBuffer: m_vbuf offset: 0 atIndex: 1];
[encoder setRenderPipelineState: m_pipeline];
[encoder drawPrimitives: MTLPrimitiveTypeTriangleStrip vertexStart: 0 vertexCount: 4 instanceCount: 1 baseInstance: 0];