diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-12 17:39:41 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-15 15:34:05 +0200 |
commit | 9b8d4a9e453b23f7b5b70280ee822f7f3a475261 (patch) | |
tree | b3266327294cbb0b82f58417e44e85379acf6465 /tests/manual/rhi/triquadcube | |
parent | ed231455cc22f6280be917780013584020d208d8 (diff) |
rhi manual tests: Prevent warnings with MSVC
The QPair changes trigger warnings about size_t vs. quint32.
We made offsets and sizes 32-bit in the QRhi API to emphasize that
some of the graphics APIs are using 32-bit sizes still. It's a bit
unfortunate that pairs now generate warnings when the size does not
match. Just cast as needed.
Change-Id: I88504eed8be6f4bdb2205b3671e2c2a9db9fcb1e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/manual/rhi/triquadcube')
-rw-r--r-- | tests/manual/rhi/triquadcube/texturedcuberenderer.cpp | 2 | ||||
-rw-r--r-- | tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/rhi/triquadcube/texturedcuberenderer.cpp b/tests/manual/rhi/triquadcube/texturedcuberenderer.cpp index 6492c95104..5031eb219a 100644 --- a/tests/manual/rhi/triquadcube/texturedcuberenderer.cpp +++ b/tests/manual/rhi/triquadcube/texturedcuberenderer.cpp @@ -217,7 +217,7 @@ void TexturedCubeRenderer::queueDraw(QRhiCommandBuffer *cb, const QSize &outputS cb->setShaderResources(); const QRhiCommandBuffer::VertexInput vbufBindings[] = { { m_vbuf, 0 }, - { m_vbuf, 36 * 3 * sizeof(float) } + { m_vbuf, quint32(36 * 3 * sizeof(float)) } }; cb->setVertexInput(0, 2, vbufBindings); cb->draw(36); diff --git a/tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp b/tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp index 18f4828a01..0f2f7047ef 100644 --- a/tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp +++ b/tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp @@ -285,7 +285,7 @@ void TriangleOnCubeRenderer::queueDraw(QRhiCommandBuffer *cb, const QSize &outpu cb->setShaderResources(); const QRhiCommandBuffer::VertexInput vbufBindings[] = { { m_vbuf, 0 }, - { m_vbuf, 36 * 3 * sizeof(float) } + { m_vbuf, quint32(36 * 3 * sizeof(float)) } }; cb->setVertexInput(0, 2, vbufBindings); cb->draw(36); |