aboutsummaryrefslogtreecommitdiffstats
path: root/model.h
blob: 33db3b411ce1247c132d0a8c0b8bef14f6ded7de (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
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