aboutsummaryrefslogtreecommitdiffstats
path: root/model.h
blob: 182faeaab6bb14d1ec9dab1dd21952d4b5f92ea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * 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"
#include "mtl.h"

struct mesh {
	mtlidx 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