aboutsummaryrefslogtreecommitdiffstats
path: root/fmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'fmd.h')
-rw-r--r--fmd.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/fmd.h b/fmd.h
new file mode 100644
index 0000000..af562f9
--- /dev/null
+++ b/fmd.h
@@ -0,0 +1,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