summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/mrt/mrt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/rhi/mrt/mrt.cpp')
-rw-r--r--tests/manual/rhi/mrt/mrt.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/manual/rhi/mrt/mrt.cpp b/tests/manual/rhi/mrt/mrt.cpp
index b80af7ac87..dc72c7d194 100644
--- a/tests/manual/rhi/mrt/mrt.cpp
+++ b/tests/manual/rhi/mrt/mrt.cpp
@@ -200,12 +200,10 @@ void Window::customInit()
{ QRhiShaderStage::Vertex, getShader(QLatin1String(":/mrt.vert.qsb")) },
{ QRhiShaderStage::Fragment, getShader(QLatin1String(":/mrt.frag.qsb")) }
});
- QVector<QRhiGraphicsPipeline::TargetBlend> blends;
- for (int i = 0; i < ATTCOUNT; ++i) {
- QRhiGraphicsPipeline::TargetBlend blend;
- blends.append(blend);
- }
- d.triPs->setTargetBlends(blends);
+
+ QRhiGraphicsPipeline::TargetBlend blends[ATTCOUNT]; // defaults to blending == false
+ d.triPs->setTargetBlends(blends, blends + ATTCOUNT);
+
inputLayout.setBindings({
{ 5 * sizeof(float) }
});
@@ -283,7 +281,7 @@ void Window::customRender()
}
const QSize outputSizeInPixels = m_sc->currentPixelSize();
- cb->beginPass(m_sc->currentFrameRenderTarget(), QColor::fromRgbF(0.4f, 0.7f, 0.0f, 1.0f), { 1.0f, 0 }, u);
+ cb->beginPass(m_sc->currentFrameRenderTarget(), m_clearColor, { 1.0f, 0 }, u);
cb->setGraphicsPipeline(d.ps);
cb->setViewport({ 0, 0, float(outputSizeInPixels.width()), float(outputSizeInPixels.height()) });
vbufBinding.second = 0;