From 957c64c7b8b5e98d8a03dd84c7e27e7991fb9dbc Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Mon, 6 Apr 2026 17:04:05 -0400 Subject: Initial commit --- micro/tex.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 micro/tex.h (limited to 'micro/tex.h') 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__ -- cgit v1.3-2-g0d8e