From: Mikko Rasa Date: Mon, 17 Jun 2019 22:12:35 +0000 (+0300) Subject: Change the return type of Renderable::get_instance_key to IntPtr X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=1c03d9e430782b329c684fbf9c9e10230eec1966;p=libs%2Fgl.git Change the return type of Renderable::get_instance_key to IntPtr --- 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