marching-cubes-opengl/VertexBuffer.h

25 lines
380 B
C
Raw Normal View History

#pragma once
// Must be the first include
#include <glad/glad.h>
// Other includes
#include <GLFW/glfw3.h>
class VertexBuffer {
public:
VertexBuffer();
2021-03-20 00:57:18 +01:00
void set_data(int size, int dimension, const void *data, int flag);
2021-03-20 00:57:18 +01:00
void bind_array();
void bind_buffer();
2021-03-19 19:42:35 +01:00
void draw();
private:
GLuint vertex_array;
GLuint vertex_buffer;
2021-03-19 23:54:24 +01:00
int size;
};