#ifndef Model_h__ #define Model_h__ #include #include #include #include #include #include #include "OpenGL.h" #include "GLM.h" #include #include #include "glerror.h" #include "Texture.h" #include "OBJ.h" class Model { public: Model(OBJ &obj); Model(const char* path); struct TextureGroup { std::shared_ptr Texture; unsigned int StartIndex; unsigned int EndIndex; }; GLuint VAO; std::vector TextureGroups; std::vector> texture; glm::mat4 GetMatrix(); std::vector Vertices; private: std::vector Normals; std::vector TextureCoords; GLuint VertexBuffer; GLuint NormalBuffer; GLuint TextureCoordBuffer; bool Loadobj( const char* path, std::vector & out_vertices, std::vector &out_normals, std::vector & out_TextureCoords ); void CreateBuffers( std::vector _Vertices, std::vector _Normals, std::vector_TextureCoords ); }; #endif // Model_h__