prosperon/source/engine/3d/model.h
2023-05-12 18:22:05 +00:00

29 lines
591 B
C

#ifndef MODEL_H
#define MODEL_H
#include "mesh.h"
#include "HandmadeMath.h"
extern HMM_Vec3 eye;
struct shader;
struct model {
struct mesh *meshes;
};
/* Get the model at a path, or create and return if it doesn't exist */
struct model *GetExistingModel(const char *path);
/* Make a Model struct */
struct model *MakeModel(const char *path);
/* Load a model from memory into the GPU */
void loadmodel(struct model *model);
void model_init();
void draw_model(struct model *model, HMM_Mat4 amodel, HMM_Mat4 lsm);
void draw_models(struct model *model, struct shader *shader);
#endif