#include <msp/gl/primitivebuilder.h>
#include <msp/gl/texture2d.h>
-#include <msp/datafile/loader.h>
+#include <msp/datafile/objectloader.h>
#include "geometry.h"
namespace Msp {
class Graphic
{
public:
- class Loader: public DataFile::Loader
+ class Loader: public DataFile::CollectionObjectLoader<Graphic, Resources>
{
- private:
- Graphic &graph;
- Resources &res;
-
public:
- typedef Resources Collection;
-
Loader(Graphic &, Resources &);
- Graphic &get_object() const { return graph; }
+
private:
void texture(const std::string &);
void slice(unsigned, unsigned, unsigned, unsigned);