From 1d758d370c975d98f49ba5a9e8277e7e0e26495d 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: 148f4367351f79994f51699a656a938c6784af8f [formerly 27ef2f23da51c156f615bb33e6b3138b44f77498] [formerly 120334bc6e2bd3fcff30fde0febc901d83cdeb9b [formerly 9f4d16e134fb009ce021f4720ffc6d410cc5bd3c]] Former-commit-id: 55595b1a006dfa313e7f088f76ff6880971530c4 [formerly 7e3a37de6c217d1b7734be14df74c174f6e0b4d6] Former-commit-id: 0ebdab2df6d218a51c5ee425482bff7c660fddd8 --- 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; };