#ifndef VERTEXBUFFER_H #define VERTEXBUFFER_H #include "rendering/Attributes.h" #include "wrapper/GL.h" class VertexBuffer final { GL::VertexArray vertexArray; GL::Buffer vertexBuffer; public: VertexBuffer(); ~VertexBuffer(); VertexBuffer(const VertexBuffer& other) = delete; VertexBuffer(VertexBuffer&& other) = delete; VertexBuffer& operator=(const VertexBuffer& other) = delete; VertexBuffer& operator=(VertexBuffer&& other) = delete; void setAttributes(const Attributes& attributes); void setStaticData(int size, const void* data = nullptr); void setStreamData(int size, const void* data = nullptr); void setDynamicData(int size, const void* data = nullptr); void updateData(int offset, int size, const void* data); void draw(int vertices, int offset = 0); void drawStrip(int vertices, int offset = 0); void drawPoints(int vertices, int offset = 0); private: void bindArray() const; void bindBuffer() const; }; #endif