Added a brief outline as to what a mesh object might contain
This commit is contained in:
parent
e5fbdd65c8
commit
009a89b907
3 changed files with 15 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
|
||||||
1, 2, 3 // second Triangle
|
1, 2, 3 // second Triangle
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned int VBO, VAO, EBO;
|
GLuint VBO, VAO, EBO;
|
||||||
glGenVertexArrays(1, &VAO);
|
glGenVertexArrays(1, &VAO);
|
||||||
glGenBuffers(1, &VBO);
|
glGenBuffers(1, &VBO);
|
||||||
glGenBuffers(1, &EBO);
|
glGenBuffers(1, &EBO);
|
||||||
|
|
|
||||||
0
src/mesh.c
Normal file
0
src/mesh.c
Normal file
14
src/mesh.h
Normal file
14
src/mesh.h
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "SDL3/SDL_opengl.h"
|
||||||
|
#include "shader.h"
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
float *vertex_buffer;
|
||||||
|
uint vertex_buffer_size;
|
||||||
|
float *element_buffer;
|
||||||
|
uint element_buffer_size;
|
||||||
|
wn_shader *shader;
|
||||||
|
GLuint VBO, VAO, EBO, diffuse_texture;
|
||||||
|
} Mesh;
|
||||||
Loading…
Reference in a new issue