Implement Utah teapot model loading
This commit is contained in:
1 parent
f546f27a42
commit
620cf7606b
8 files changed
+303
-48
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user