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;
23 class MSPGLTK_API PartCache
32 Rebuild(PartCache &c): cache(c) { cache.begin_rebuild(); }
33 ~Rebuild() { cache.end_rebuild(); }
36 typedef std::list<CachedPart> PartList;
41 PartList::iterator next;
42 PartList::iterator current;
48 void insert_special(const Part &);
49 GL::Mesh &create_mesh(const Part &, const GL::Texture2D &);
52 const PartList &get_parts() const { return parts; }