aboutsummaryrefslogtreecommitdiffstats
path: root/fmd.h
blob: af562f94f60f8bb0cfc1e0d1465a3c26363ce53e (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
31
32
/*
 * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
 * SPDX-License-Identifier: MIT
 */
#ifndef FMD_H
#define FMD_H

#include <stdio.h>

#include "gl.h"
#include "vertex.h"

typedef GLuint tri[3];
struct fmd {
	int nverts;
	struct vertex *verts;
	int ntris;
	tri *tris;
	int nmtls;
	char **mtls;
	int nmeshes;
	struct fmd_mesh {
		int midx;
		int tidx;
		int tcnt;
	} *meshes;
};

void fmd_load(struct fmd *fmd, FILE *f);
void fmd_free(struct fmd *fmd);

#endif // FMD_H