diff options
Diffstat (limited to 'model.h')
-rw-r--r-- | model.h | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com> + * SPDX-License-Identifier: MIT + */ +#ifndef MODEL_H +#define MODEL_H + +#include "gl.h" +#include "fmd.h" + +struct mesh { + struct material { + GLuint diffuse; + } *mtl; + struct { + GLuint idx; + GLuint cnt; + } elems; +}; + +struct model { + struct mesh *meshes; + int nmeshes; + GLuint vao; +}; + +void model_load(struct model *mdl, const struct fmd *fmd); +void model_render(struct model *mdl); + +#endif // MODEL_H |