Added objects
This commit is contained in:
parent
f86fcad89f
commit
107e207a83
5 changed files with 53 additions and 10 deletions
23
src/object.cpp
Normal file
23
src/object.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "object.hpp"
|
||||
|
||||
namespace oglu
|
||||
{
|
||||
Object::Object(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize) :
|
||||
VAO(MakeVertexArray(vertices, verticesSize, indices, indicesSize, topology, topologySize))
|
||||
{
|
||||
}
|
||||
|
||||
Object::Object(const Object& other) :
|
||||
VAO(other.VAO)
|
||||
{
|
||||
}
|
||||
|
||||
Object::~Object()
|
||||
{
|
||||
}
|
||||
|
||||
void Object::Render()
|
||||
{
|
||||
VAO->BindAndDraw();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue