From 93725d90f5f07e9111a3dcb9861a8f23b025c451 Mon Sep 17 00:00:00 2001 From: Lynix Date: Fri, 5 Aug 2016 09:09:14 +0200 Subject: [PATCH] Graphics/InstancedRenderable: Take a const reference to the matrix instead of a non-const one Former-commit-id: a2c84a7e8f1c3f91bb53e60eb95aec43c77bdce9 [formerly 966bf202d970596c9917805c3bb54dd04f84891f] [formerly 7372d35968df90baea6655c6439d545f454cd549 [formerly edc986573b5aa4e26805d484aa25dc98db1b99c1]] Former-commit-id: 0a81a7c0eb3bb9c3ca45060f1348f7d0e944c473 [formerly 60dda05c845ed52fc0d54976ad06f2261496b105] Former-commit-id: 6b3e85831f9631220837194f1f684f3350a93bc3 --- SDK/include/NDK/Components/GraphicsComponent.hpp | 2 +- include/Nazara/Graphics/InstancedRenderable.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SDK/include/NDK/Components/GraphicsComponent.hpp b/SDK/include/NDK/Components/GraphicsComponent.hpp index a7ac3ebc2..92aeeed2f 100644 --- a/SDK/include/NDK/Components/GraphicsComponent.hpp +++ b/SDK/include/NDK/Components/GraphicsComponent.hpp @@ -66,7 +66,7 @@ namespace Ndk struct Renderable { - Renderable(Nz::Matrix4f& transformMatrix) : + Renderable(const Nz::Matrix4f& transformMatrix) : data(transformMatrix), dataUpdated(false) { diff --git a/include/Nazara/Graphics/InstancedRenderable.hpp b/include/Nazara/Graphics/InstancedRenderable.hpp index d1c07bf9b..d854a41d6 100644 --- a/include/Nazara/Graphics/InstancedRenderable.hpp +++ b/include/Nazara/Graphics/InstancedRenderable.hpp @@ -54,7 +54,7 @@ namespace Nz struct InstanceData { - InstanceData(Matrix4f& referenceMatrix) : + InstanceData(const Matrix4f& referenceMatrix) : transformMatrix(&referenceMatrix), flags(0) { @@ -75,7 +75,7 @@ namespace Nz std::vector data; BoundingVolumef volume; - Matrix4f* transformMatrix; + const Matrix4f* transformMatrix; UInt32 flags; int renderOrder; };