aboutsummaryrefslogtreecommitdiff
path: root/include/mgl/graphics/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mgl/graphics/texture.h')
-rw-r--r--include/mgl/graphics/texture.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/mgl/graphics/texture.h b/include/mgl/graphics/texture.h
new file mode 100644
index 0000000..669be1e
--- /dev/null
+++ b/include/mgl/graphics/texture.h
@@ -0,0 +1,21 @@
+#ifndef MGL_TEXTURE_H
+#define MGL_TEXTURE_H
+
+typedef enum {
+ MGL_TEXTURE_GRAY = 1,
+ MGL_TEXTURE_GRAY_ALPHA = 2,
+ MGL_TEXTURE_RGB = 3,
+ MGL_TEXTURE_RGB_ALPHA = 4
+} mgl_texture_format;
+
+typedef struct {
+ unsigned int id;
+ int width;
+ int height;
+ mgl_texture_format format;
+} mgl_texture;
+
+int mgl_texture_load_from_file(mgl_texture *self, const char *filepath);
+void mgl_texture_unload(mgl_texture *self);
+
+#endif /* MGL_TEXTURE_H */