X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Fscene.h;h=6fb45d6102b9fc422f71ba360da33b2e5a87c926;hb=ae45c0397e2cb8f0a01f2f31d01c95ff3870271e;hp=305bf62aefd5a2ed3fb4748bf9258772643eb52b;hpb=83ab54cf1339fcac560daa90496e6d4e956f7367;p=libs%2Fgl.git diff --git a/source/render/scene.h b/source/render/scene.h index 305bf62a..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,15 +25,17 @@ 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 &); + void scene(const std::string &); }; public: @@ -57,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(); @@ -70,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]; @@ -80,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;