#include <map>
#include <set>
+#include <msp/core/inttypes.h>
#include "scene.h"
namespace Msp {
{
private:
typedef std::set<Renderable *> RenderableSet;
- typedef std::map<long, RenderableSet> InstanceMap;
+ typedef std::map<IntPtr, RenderableSet> InstanceMap;
InstanceMap renderables;
ObjectInstance(const Object &);
const Object &get_object() const { return object; }
- virtual long get_instance_key() const { return reinterpret_cast<long>(&object); }
+ virtual IntPtr get_instance_key() const { return reinterpret_cast<IntPtr>(&object); }
virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const { return object.get_bounding_sphere(); }
#define MSP_GL_RENDERABLE_H_
#include <string>
+#include <msp/core/inttypes.h>
#include <msp/geometry/boundingsphere.h>
#include "tag.h"
/** 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