#pragma once #define GLEW_STATIC #include #include "rwbinarystream.h" #include #include #include class Model { public: RW::BSClump clump; struct Texture { std::string name; std::string alphaName; }; struct Material { std::vector textures; }; struct SubGeometry { GLuint EBO; size_t material; std::vector indices; }; struct Geometry { GLuint VBO, EBO; RW::BSGeometryBounds geometryBounds; std::vector texcoords; std::vector triangles; std::vector vertices; std::vector normals; std::vector materials; std::vector subgeom; }; std::vector geometries; }; class LoaderDFF { private: template T readStructure(char *data, size_t &dataI); RW::BSSectionHeader readHeader(char *data, size_t &dataI); public: std::unique_ptr loadFromMemory(char *data); };