From 1c03d9e430782b329c684fbf9c9e10230eec1966 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 18 Jun 2019 01:12:35 +0300 Subject: [PATCH] Change the return type of Renderable::get_instance_key to IntPtr --- source/instancescene.h | 3 ++- source/objectinstance.h | 2 +- source/renderable.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/instancescene.h b/source/instancescene.h index 2a918401..a5ac2cd1 100644 --- a/source/instancescene.h +++ b/source/instancescene.h @@ -3,6 +3,7 @@ #include #include +#include #include "scene.h" namespace Msp { @@ -17,7 +18,7 @@ class InstanceScene: public Scene { private: typedef std::set RenderableSet; - typedef std::map InstanceMap; + typedef std::map InstanceMap; InstanceMap renderables; diff --git a/source/objectinstance.h b/source/objectinstance.h index 7c2cc9a7..6577dd2a 100644 --- a/source/objectinstance.h +++ b/source/objectinstance.h @@ -35,7 +35,7 @@ public: ObjectInstance(const Object &); const Object &get_object() const { return object; } - virtual long get_instance_key() const { return reinterpret_cast(&object); } + virtual IntPtr get_instance_key() const { return reinterpret_cast(&object); } virtual const Geometry::BoundingSphere *get_bounding_sphere() const { return object.get_bounding_sphere(); } diff --git a/source/renderable.h b/source/renderable.h index 6e1505ca..80fe172e 100644 --- a/source/renderable.h +++ b/source/renderable.h @@ -2,6 +2,7 @@ #define MSP_GL_RENDERABLE_H_ #include +#include #include #include "tag.h" @@ -34,7 +35,7 @@ public: /** Returns a key used for grouping Renderables in an InstanceScene. The returned value is treated as opaque. */ - virtual long get_instance_key() const { return 0; } + virtual IntPtr get_instance_key() const { return 0; } /** Returns the model matrix of the Renderable. Null is returned if no such matrix exists. The matrix should be in world space for some effects to work -- 2.43.0