27 lines
403 B
C
27 lines
403 B
C
#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_init(size_t vertex_count, size_t index_count);
|
|
void model_cleanup(model_t *m);
|
|
|
|
#endif
|