X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpartcache.cpp;h=f4c085e5baa47c4230786eba92a2feb50ac8cf50;hb=9f38197854e699a6093a906ab43f4238f3cd2388;hp=3c3fbb169e3e2c20b707f20b6bdb25f656fc94fd;hpb=caa04d76bc031dd0c4a4157732deb340d934ceeb;p=libs%2Fgltk.git diff --git a/source/partcache.cpp b/source/partcache.cpp index 3c3fbb1..f4c085e 100644 --- a/source/partcache.cpp +++ b/source/partcache.cpp @@ -6,22 +6,12 @@ using namespace std; namespace Msp { namespace GLtk { -CachedPart::CachedPart(): - part(0), - texture(0), - mesh(0) -{ } - CachedPart::~CachedPart() { delete mesh; } -PartCache::PartCache(): - rebuilding(false) -{ } - void PartCache::begin_rebuild() { if(rebuilding) @@ -75,7 +65,7 @@ GL::Mesh &PartCache::create_mesh(const Part &part, const GL::Texture2D &tex) { current = parts.insert(next, CachedPart()); current->texture = &tex; - current->mesh = new GL::Mesh((GL::TEXCOORD2, GL::COLOR4_UBYTE, GL::VERTEX2)); + current->mesh = new GL::Mesh((GL::TEXCOORD2, GL::COLOR4,GL::UNSIGNED_BYTE, GL::VERTEX2)); } else current->mesh->clear();