#ifndef _RENDER_MESH_H_ #define _RENDER_MESH_H_ #include #include #include "render/buffer.h" #include "linmath.h" struct renderer; struct vec3 { float x, y, z; }; struct vec4 { float x, y, z, w; }; struct ubo { mat4x4 model; mat4x4 view; mat4x4 proj; }; struct vertex { struct vec3 position; struct vec3 normal; struct vec4 color; }; struct mesh { struct buffer vertex; struct buffer index; mat4x4 position; size_t index_count; }; struct mesh upload_mesh(struct renderer *ren, size_t vertex_count, struct vertex vertices[vertex_count], size_t index_count, uint32_t indices[index_count], struct vec3 position); void mesh_destroy(struct renderer *ren, struct mesh *mesh); #endif