Added objects
This commit is contained in:
parent
f86fcad89f
commit
107e207a83
5 changed files with 53 additions and 10 deletions
24
include/object.hpp
Normal file
24
include/object.hpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef OBJECT_HPP
|
||||
#define OBJECT_HPP
|
||||
|
||||
#include <core.hpp>
|
||||
#include <transformable.hpp>
|
||||
#include <vertexArray.hpp>
|
||||
|
||||
namespace oglu
|
||||
{
|
||||
class OGLU_API Object : public Transformable
|
||||
{
|
||||
public:
|
||||
Object(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
|
||||
Object(const Object& other);
|
||||
~Object();
|
||||
|
||||
void Render();
|
||||
|
||||
private:
|
||||
VertexArray VAO;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -12,6 +12,7 @@
|
|||
#include <vertexArray.hpp>
|
||||
#include <shader.hpp>
|
||||
#include <texture.hpp>
|
||||
#include <object.hpp>
|
||||
|
||||
namespace oglu
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace oglu
|
|||
/**
|
||||
* @brief Structure to store topology data.
|
||||
*/
|
||||
OGLU_API struct VertexAttribute {
|
||||
struct OGLU_API VertexAttribute {
|
||||
/*@{*/
|
||||
GLuint index; ///< Index of the vertex attribute
|
||||
GLint size; ///< Number of elements in this attribute
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue