From 56977990e04efa051b1ebd4ce9274d6b69c7bd0c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 27 May 2020 17:44:49 +0200 Subject: 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 --- .../rhi/compressedtexture_bc1/compressedtexture_bc1.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/manual/rhi/compressedtexture_bc1') diff --git a/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp b/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp index af454c2487..b6526027d3 100644 --- a/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp +++ b/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp @@ -72,29 +72,29 @@ void Window::customInit() qFatal("This backend does not support BC1"); d.vbuf = m_r->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, sizeof(cube)); - d.vbuf->build(); + d.vbuf->create(); d.vbufReady = false; d.ubuf = m_r->newBuffer(QRhiBuffer::Dynamic, QRhiBuffer::UniformBuffer, 68); - d.ubuf->build(); + d.ubuf->create(); QSize imageSize; d.compressedData = loadBC1(QLatin1String(":/qt256_bc1_9mips.dds"), &imageSize); qDebug() << d.compressedData.count() << imageSize << m_r->mipLevelsForSize(imageSize); d.tex = m_r->newTexture(QRhiTexture::BC1, imageSize, 1, QRhiTexture::MipMapped); - d.tex->build(); + d.tex->create(); d.sampler = m_r->newSampler(QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge); - d.sampler->build(); + d.sampler->create(); d.srb = m_r->newShaderResourceBindings(); d.srb->setBindings({ QRhiShaderResourceBinding::uniformBuffer(0, QRhiShaderResourceBinding::VertexStage | QRhiShaderResourceBinding::FragmentStage, d.ubuf), QRhiShaderResourceBinding::sampledTexture(1, QRhiShaderResourceBinding::FragmentStage, d.tex, d.sampler) }); - d.srb->build(); + d.srb->create(); d.ps = m_r->newGraphicsPipeline(); @@ -131,7 +131,7 @@ void Window::customInit() d.ps->setShaderResourceBindings(d.srb); d.ps->setRenderPassDescriptor(m_rp); - d.ps->build(); + d.ps->create(); } void Window::customRelease() -- cgit v1.2.3