From 5336e061ece349f5622548f2cbbd7f7d88574d33 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 22 May 2017 10:15:34 +0200 Subject: QVulkanWindow: return QMatrix4x4 by value The function never returns nullptr, so return the matrix by value. Change-Id: I7c1eeb43b9693866049763565b575348ddd35548 Reviewed-by: Laszlo Agocs --- examples/vulkan/hellovulkancubes/renderer.cpp | 2 +- examples/vulkan/hellovulkantexture/hellovulkantexture.cpp | 2 +- examples/vulkan/shared/trianglerenderer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/vulkan/hellovulkancubes/renderer.cpp b/examples/vulkan/hellovulkancubes/renderer.cpp index 3b837d85d4..523511337d 100644 --- a/examples/vulkan/hellovulkancubes/renderer.cpp +++ b/examples/vulkan/hellovulkancubes/renderer.cpp @@ -511,7 +511,7 @@ void Renderer::createFloorPipeline() void Renderer::initSwapChainResources() { - m_proj = *m_window->clipCorrectionMatrix(); + m_proj = m_window->clipCorrectionMatrix(); const QSize sz = m_window->swapChainImageSize(); m_proj.perspective(45.0f, sz.width() / (float) sz.height(), 0.01f, 1000.0f); markViewProjDirty(); diff --git a/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp b/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp index 5e52d5e006..086bca781f 100644 --- a/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp +++ b/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp @@ -675,7 +675,7 @@ void VulkanRenderer::initSwapChainResources() qDebug("initSwapChainResources"); // Projection matrix - m_proj = *m_window->clipCorrectionMatrix(); // adjust for Vulkan-OpenGL clip space differences + m_proj = m_window->clipCorrectionMatrix(); // adjust for Vulkan-OpenGL clip space differences const QSize sz = m_window->swapChainImageSize(); m_proj.perspective(45.0f, sz.width() / (float) sz.height(), 0.01f, 100.0f); m_proj.translate(0, 0, -4); diff --git a/examples/vulkan/shared/trianglerenderer.cpp b/examples/vulkan/shared/trianglerenderer.cpp index 7327c5a706..f346f90c89 100644 --- a/examples/vulkan/shared/trianglerenderer.cpp +++ b/examples/vulkan/shared/trianglerenderer.cpp @@ -393,7 +393,7 @@ void TriangleRenderer::initSwapChainResources() qDebug("initSwapChainResources"); // Projection matrix - m_proj = *m_window->clipCorrectionMatrix(); // adjust for Vulkan-OpenGL clip space differences + m_proj = m_window->clipCorrectionMatrix(); // adjust for Vulkan-OpenGL clip space differences const QSize sz = m_window->swapChainImageSize(); m_proj.perspective(45.0f, sz.width() / (float) sz.height(), 0.01f, 100.0f); m_proj.translate(0, 0, -4); -- cgit v1.2.3