Added Texture class

This commit is contained in:
Robert 2021-01-21 12:07:43 +01:00
parent 1b2ed0cdf5
commit e2e15dd98f
13 changed files with 8005 additions and 35 deletions

View file

@ -2,7 +2,6 @@
#define DRAWABLE_HPP
#include <core.hpp>
#include <glad/glad.h>
namespace oglu
{
@ -15,13 +14,13 @@ namespace oglu
const GLvoid* pointer;
} VertexAttribute;
class OGLU_API AbstractObject
class OGLU_API AbstractVertexArray
{
public:
AbstractObject(const AbstractObject& other);
~AbstractObject();
AbstractVertexArray(const AbstractVertexArray& other);
~AbstractVertexArray();
friend std::shared_ptr<AbstractObject> OGLU_API MakeObject(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
friend std::shared_ptr<AbstractVertexArray> OGLU_API MakeObject(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
GLuint GetVAO() { return VAO; }
void Bind();
@ -31,7 +30,7 @@ namespace oglu
void BindAndDraw();
private:
AbstractObject(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
AbstractVertexArray(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
inline void RegisterVertexAttribPointer(GLuint index, const VertexAttribute& topology);
@ -39,7 +38,7 @@ namespace oglu
GLsizei count;
};
typedef std::shared_ptr<AbstractObject> Object;
typedef std::shared_ptr<AbstractVertexArray> VertexArray;
}
#endif