X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fscene.h;h=3712ee645b0e7467824e9c7a4f9ca1b67d420eac;hb=84f1549d8146ac54574256ae0243747199e51151;hp=acabd10172c5bab23d107eb4f4d9e86f856fe38d;hpb=dbcb9345c23c5c027d808915962843e7db2d14aa;p=laserbrain_demo diff --git a/src/scene.h b/src/scene.h index acabd10..3712ee6 100644 --- a/src/scene.h +++ b/src/scene.h @@ -6,10 +6,14 @@ #include "mesh.h" #include "snode.h" #include "texture.h" +#include "dataset.h" enum { SCNLOAD_FLIPYZ = 1, - SCNLOAD_FLIPTEX = 2 + SCNLOAD_FLIPTEX = 2, + + SCNLOAD_STAGE_IO = 0x4000, + SCNLOAD_STAGE_GL = 0x8000 }; class Scene { @@ -25,6 +29,7 @@ public: Mesh *walk_mesh; TextureSet *texset; // only owned by Scene if own_texset is true + void *loader_data; explicit Scene(TextureSet *tset = 0); ~Scene(); @@ -36,6 +41,9 @@ public: bool load(const char *fname, unsigned int flags = 0); + // merge scn into this scene, leaving scn empty and safe to destroy + bool merge(Scene *scn); + void add_object(Object *obj); bool remove_object(Object *obj); bool have_object(Object *obj) const; @@ -65,4 +73,16 @@ public: void draw() const; }; + +class SceneSet : public DataSet { +private: + static Scene *create_scene(); + static bool load_scene(Scene *scn, const char *fname); + static bool done_scene(Scene *scn); + static void free_scene(Scene *scn); + +public: + SceneSet(); +}; + #endif // SCENE_H_