summaryrefslogtreecommitdiff
path: root/micro/tex.h
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-04-06 17:04:05 -0400
committeriamcheeseman <[email protected]>2026-04-06 17:06:53 -0400
commit957c64c7b8b5e98d8a03dd84c7e27e7991fb9dbc (patch)
treef5fc230703791cee8d8e7851fb87eaef07ae63a2 /micro/tex.h
Initial commit
Diffstat (limited to 'micro/tex.h')
-rw-r--r--micro/tex.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/micro/tex.h b/micro/tex.h
new file mode 100644
index 0000000..3e58817
--- /dev/null
+++ b/micro/tex.h
@@ -0,0 +1,37 @@
+#ifndef __MICRO_TEX_H__
+#define __MICRO_TEX_H__
+
+#include "common.h"
+
+struct renderer;
+
+struct texture {
+ u32 handle;
+ int width;
+ int height;
+};
+
+struct render_texture {
+ u32 handle;
+ struct texture color;
+ struct texture depth;
+ // struct texture stencil; TODO
+
+ int width;
+ int height;
+};
+
+struct texture load_texture(const char *file_path);
+struct texture load_texture_from_mem(u8 *data, int width, int height);
+void free_texture(struct texture tex);
+
+bool is_texture_init(struct texture tex);
+
+struct render_texture create_render_texture(
+ int width,
+ int height,
+ bool add_depth
+);
+void free_render_texture(struct render_texture rtex);
+
+#endif // __MICRO_TEX_H__