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