]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/partcache.h
Cache widget parts in meshes
[libs/gltk.git] / source / partcache.h
diff --git a/source/partcache.h b/source/partcache.h
new file mode 100644 (file)
index 0000000..b856f9d
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef MSP_GLTK_PARTCACHE_H_
+#define MSP_GLTK_PARTCACHE_H_
+
+#include <msp/gl/mesh.h>
+#include <msp/gl/texture2d.h>
+
+namespace Msp {
+namespace GLtk {
+
+struct CachedPart
+{
+       const GL::Texture2D *texture;
+       GL::Mesh *mesh;
+
+       CachedPart();
+       ~CachedPart();
+
+       void clear_mesh();
+};
+
+} // namespace GLtk
+} // namespace Msp
+
+#endif