Implement Utah teapot model loading

This commit is contained in:
Camden Dixie O'Brien committed 2025-09-29 12:16:10 +01:00
1 parent f546f27a42
commit 620cf7606b
8 files changed
+303 -48

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#ifndef MODEL_H
#define MODEL_H
#include "linear_alg.h"
#include <stdint.h>
#include <stddef.h>
typedef uint16_t index_t;
typedef struct {
vec3_t position;
vec3_t normal;
} vertex_t;
typedef struct {
vertex_t *vertices;
index_t *indices;
size_t vertex_count;
size_t index_count;
} model_t;
model_t model_read(const char *path);
void model_cleanup(model_t *m);
#endif