38 lines
825 B
C++
38 lines
825 B
C++
#ifndef __OPENGLPLAYGROUND_OBJECT_HH__
|
|
#define __OPENGLPLAYGROUND_OBJECT_HH__
|
|
|
|
#include <vector>
|
|
#include <glbinding/gl/types.h>
|
|
|
|
#include "objectParser.hh"
|
|
#include "VBOManager.hh"
|
|
|
|
class Program;
|
|
|
|
class Object {
|
|
public:
|
|
Object(VBOManager& vboManager, std::vector<objVertexAttribs> const& vas,
|
|
std::vector<uint16_t> indices, Program& prog);
|
|
|
|
Object(VBOManager& vboManager, std::string const& filename, Program& prog);
|
|
|
|
Object(Object const& copy) = delete;
|
|
|
|
~Object();
|
|
|
|
Object& operator=(Object const& copy) = delete;
|
|
|
|
void draw(glm::mat4 const& modelview, Program *override = nullptr) const;
|
|
|
|
private:
|
|
void construct(std::vector<objVertexAttribs> const& vas);
|
|
|
|
VBOManager& _vboManager;
|
|
VBOManager::VBOAlloc _vbo;
|
|
Program& _prog;
|
|
std::vector<uint16_t> _indices;
|
|
gl::GLuint _vaID;
|
|
};
|
|
|
|
#endif
|