1 #ifndef MSP_GLTK_PARTCACHE_H_
2 #define MSP_GLTK_PARTCACHE_H_
4 #include <msp/gl/mesh.h>
5 #include <msp/gl/texture2d.h>
6 #include "mspgltk_api.h"
16 const GL::Texture2D *texture = 0;
22 class MSPGLTK_API PartCache
31 Rebuild(PartCache &c): cache(c) { cache.begin_rebuild(); }
32 ~Rebuild() { cache.end_rebuild(); }
35 typedef std::list<CachedPart> PartList;
38 bool rebuilding = false;
40 PartList::iterator next;
41 PartList::iterator current;
45 void insert_special(const Part &);
46 GL::Mesh &create_mesh(const Part &, const GL::Texture2D &);
49 const PartList &get_parts() const { return parts; }