diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-05-27 17:44:49 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-05-28 17:53:32 +0200 |
commit | 56977990e04efa051b1ebd4ce9274d6b69c7bd0c (patch) | |
tree | eaa66635b67faaf94df7b0670fa9e0971268a936 /tests/manual/rhi/multiwindow | |
parent | c991d87ee2c239fedb77f76f25936dddf5eb5982 (diff) |
rhi: Harmonize create-destroy API pattern with the rest of Qt
For historical reasons we use build and release instead of create and
destroy. This becomes confusing now that more modules in Qt start taking
QRhi into use. Migrate to the more familiar naming, so those who have
used QWindow or QOpenGLContext before will find it natural.
Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/manual/rhi/multiwindow')
-rw-r--r-- | tests/manual/rhi/multiwindow/multiwindow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/manual/rhi/multiwindow/multiwindow.cpp b/tests/manual/rhi/multiwindow/multiwindow.cpp index 5fb5bb22ab..c5c667fe57 100644 --- a/tests/manual/rhi/multiwindow/multiwindow.cpp +++ b/tests/manual/rhi/multiwindow/multiwindow.cpp @@ -201,14 +201,14 @@ void ensureSharedResources(QRhiRenderPassDescriptor *rp) { if (!d.vbuf) { d.vbuf = r.r->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, sizeof(vertexData)); - d.vbuf->build(); + d.vbuf->create(); d.initialUpdates = r.r->nextResourceUpdateBatch(); d.initialUpdates->uploadStaticBuffer(d.vbuf, vertexData); } if (!d.ubuf) { d.ubuf = r.r->newBuffer(QRhiBuffer::Dynamic, QRhiBuffer::UniformBuffer, 68); - d.ubuf->build(); + d.ubuf->create(); } if (!d.srb) { @@ -216,7 +216,7 @@ void ensureSharedResources(QRhiRenderPassDescriptor *rp) d.srb->setBindings({ QRhiShaderResourceBinding::uniformBuffer(0, QRhiShaderResourceBinding::VertexStage | QRhiShaderResourceBinding::FragmentStage, d.ubuf) }); - d.srb->build(); + d.srb->create(); } if (!d.ps) { @@ -251,7 +251,7 @@ void ensureSharedResources(QRhiRenderPassDescriptor *rp) d.ps->setShaderResourceBindings(d.srb); d.ps->setRenderPassDescriptor(rp); - d.ps->build(); + d.ps->create(); } } @@ -427,7 +427,7 @@ void Window::releaseResources() void Window::resizeSwapChain() { - m_hasSwapChain = m_sc->buildOrResize(); + m_hasSwapChain = m_sc->createOrResize(); const QSize outputSize = m_sc->currentPixelSize(); m_proj = r.r->clipSpaceCorrMatrix(); @@ -439,7 +439,7 @@ void Window::releaseSwapChain() { if (m_hasSwapChain) { m_hasSwapChain = false; - m_sc->release(); + m_sc->destroy(); } } |