X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Frender%2Fscene.h;h=6fb45d6102b9fc422f71ba360da33b2e5a87c926;hb=ae45c0397e2cb8f0a01f2f31d01c95ff3870271e;hp=33678b7998900fac18f25cb113f181f5d654e9f3;hpb=fea2752a8abb1de5cc89addc92b804d9ff4fc89a;p=libs%2Fgl.git diff --git a/source/render/scene.h b/source/render/scene.h index 33678b79..6fb45d61 100644 --- a/source/render/scene.h +++ b/source/render/scene.h @@ -1,12 +1,11 @@ #ifndef MSP_GL_SCENE_H_ #define MSP_GL_SCENE_H_ -#include +#include #include #include #include "matrix.h" #include "renderable.h" -#include "vector.h" namespace Msp { namespace GL { @@ -26,12 +25,13 @@ protected: private: ContentMap *content; + unsigned inst_counter; public: - Loader(Scene &, Collection &); - Loader(Scene &, Collection &, ContentMap &); + Loader(Scene &s, Collection &c): Loader(s, c, 0) { } + Loader(Scene &s, Collection &c, ContentMap &m) : Loader(s, c, &m) { } private: - void init(); + Loader(Scene &, Collection &, ContentMap *); void object(const std::string &); void object_tagged(const std::string &, const std::string &); @@ -58,7 +58,7 @@ public: GenericLoader(DataFile::Collection &); ~GenericLoader(); - Scene *get_scene() { Scene *s = scene; scene = 0; return s; } + Scene *get_object() { Scene *s = scene; scene = 0; return s; } private: virtual void init_actions(); @@ -71,8 +71,6 @@ private: typedef TypeRegistry SceneRegistry; protected: - // XXX If a loaded renderable is removed from the scene it needs to be removed from here as well - std::vector owned_data; mutable Matrix culling_matrix; mutable Vector4 frustum_edges[6]; @@ -81,7 +79,7 @@ private: Scene(const Scene &); Scene &operator=(const Scene &); public: - virtual ~Scene(); + virtual ~Scene() { } virtual void add(Renderable &) = 0; virtual void remove(Renderable &) = 0;