2019-08-09 04:18:08 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-08-16 11:07:57 +00:00
|
|
|
enum class VertexFormat : int32_t { Flat, World };
|
|
|
|
|
2019-08-09 04:18:08 +00:00
|
|
|
class VertexBuffer
|
|
|
|
{
|
|
|
|
public:
|
2019-08-16 09:24:22 +00:00
|
|
|
VertexBuffer();
|
2019-08-10 05:46:29 +00:00
|
|
|
~VertexBuffer();
|
2019-08-09 04:18:08 +00:00
|
|
|
|
2019-08-10 05:46:29 +00:00
|
|
|
GLuint GetBuffer();
|
2019-08-16 11:07:57 +00:00
|
|
|
GLuint GetVAO();
|
|
|
|
|
|
|
|
VertexFormat Format = VertexFormat::Flat;
|
|
|
|
|
|
|
|
static const int FlatStride = 24;
|
|
|
|
static const int WorldStride = 36;
|
|
|
|
|
|
|
|
static void SetupFlatVAO();
|
|
|
|
static void SetupWorldVAO();
|
2019-08-09 21:15:48 +00:00
|
|
|
|
|
|
|
private:
|
2019-08-10 05:46:29 +00:00
|
|
|
GLuint mBuffer = 0;
|
2019-08-16 11:07:57 +00:00
|
|
|
GLuint mVAO = 0;
|
2019-08-09 04:18:08 +00:00
|
|
|
};
|