From 009a89b907026da5ad2e99e0370dad950c63757e Mon Sep 17 00:00:00 2001 From: Warwick Date: Wed, 3 Dec 2025 18:48:23 +0000 Subject: [PATCH] Added a brief outline as to what a mesh object might contain --- src/main.c | 2 +- src/mesh.c | 0 src/mesh.h | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/mesh.c create mode 100644 src/mesh.h diff --git a/src/main.c b/src/main.c index a929ba3..273793b 100644 --- a/src/main.c +++ b/src/main.c @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) { 1, 2, 3 // second Triangle }; - unsigned int VBO, VAO, EBO; + GLuint VBO, VAO, EBO; glGenVertexArrays(1, &VAO); glGenBuffers(1, &VBO); glGenBuffers(1, &EBO); diff --git a/src/mesh.c b/src/mesh.c new file mode 100644 index 0000000..e69de29 diff --git a/src/mesh.h b/src/mesh.h new file mode 100644 index 0000000..9247ad8 --- /dev/null +++ b/src/mesh.h @@ -0,0 +1,14 @@ +#pragma once + +#include "SDL3/SDL_opengl.h" +#include "shader.h" +#include + +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;