Use one VAO per hex
This commit is contained in:
parent
7a95e4515d
commit
4e375f7e6a
3 changed files with 68 additions and 58 deletions
10
hex_math.h
10
hex_math.h
|
|
@ -36,8 +36,14 @@ typedef struct {
|
|||
} vec4f;
|
||||
|
||||
typedef struct {
|
||||
vec4f position; // center pos
|
||||
float radius; // side length
|
||||
vec4f position; // center pos
|
||||
float radius; // side length
|
||||
uint32_t vao;
|
||||
uint32_t ebo;
|
||||
uint32_t vbo;
|
||||
float vertices[7*3]; // 7 vert per hex
|
||||
unsigned int indices[6*3]; // 6 triangles to render a hex
|
||||
|
||||
} hex_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue