generated from karl/cpp-template
24 lines
353 B
C++
24 lines
353 B
C++
#pragma once
|
|
|
|
// Must be the first include
|
|
#include <glad/glad.h>
|
|
|
|
// Other includes
|
|
#include <GLFW/glfw3.h>
|
|
|
|
class VertexBuffer {
|
|
public:
|
|
VertexBuffer();
|
|
|
|
void set_data(unsigned int size, const void *data, int flag);
|
|
|
|
void bind();
|
|
|
|
void draw();
|
|
|
|
private:
|
|
GLuint vertex_array;
|
|
GLuint vertex_buffer;
|
|
unsigned int size;
|
|
};
|