X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpartcache.h;h=af697339efcfa0ed5e46cb998235e0c156ac13c0;hb=9f38197854e699a6093a906ab43f4238f3cd2388;hp=4eef1166d1d9e75f0bc39bd27b087350e8cbf3c1;hpb=01d30637b393b2f8a932b1d943076db580b1e951;p=libs%2Fgltk.git diff --git a/source/partcache.h b/source/partcache.h index 4eef116..af69733 100644 --- a/source/partcache.h +++ b/source/partcache.h @@ -3,6 +3,7 @@ #include #include +#include "mspgltk_api.h" namespace Msp { namespace GLtk { @@ -11,15 +12,14 @@ class Part; struct CachedPart { - const Part *part; - const GL::Texture2D *texture; - GL::Mesh *mesh; + const Part *part = 0; + const GL::Texture2D *texture = 0; + GL::Mesh *mesh = 0; - CachedPart(); ~CachedPart(); }; -class PartCache +class MSPGLTK_API PartCache { public: class Rebuild @@ -35,14 +35,12 @@ public: typedef std::list PartList; private: - bool rebuilding; + bool rebuilding = false; PartList parts; PartList::iterator next; PartList::iterator current; public: - PartCache(); - void begin_rebuild(); void insert_special(const Part &); GL::Mesh &create_mesh(const Part &, const GL::Texture2D &);