aboutsummaryrefslogtreecommitdiff
path: root/mons_3d/include/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'mons_3d/include/texture.h')
-rw-r--r--mons_3d/include/texture.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/mons_3d/include/texture.h b/mons_3d/include/texture.h
new file mode 100644
index 0000000..4e3d2e4
--- /dev/null
+++ b/mons_3d/include/texture.h
@@ -0,0 +1,19 @@
+#ifndef MONS_TEXTURE_H
+#define MONS_TEXTURE_H
+
+#include "image.h"
+#include "shader.h"
+#include <stdio.h>
+
+typedef struct mons_texture {
+ unsigned int id;
+ unsigned int width;
+ unsigned int height;
+} mons_texture;
+
+mons_texture mons_texture_from_image(mons_image image);
+mons_texture mons_texture_load(FILE *stream);
+
+void mons_texture_bind(mons_program shader, unsigned int unit, mons_texture texture);
+
+#endif