From fb2791c41847d76327b6665398b44be41a44c02d Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 8 Dec 2019 10:59:54 +0800 Subject: *misc --- src/core/texture.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/core/texture.h') diff --git a/src/core/texture.h b/src/core/texture.h index d6aee82..20a0228 100644 --- a/src/core/texture.h +++ b/src/core/texture.h @@ -4,8 +4,23 @@ #include "vert.h" typedef struct Texture{ - uint id;/*identifier*/ uint width, height; + Color* pixels; }Texture; +void texture_loadfromfile(const char* path, Texture* out); + +typedef enum FilterMode { + FILTERMODE_POINT, + FILTERMODE_BILINEAR, + FILTERMODE_TRILINEAR, +} FilterMode; + +typedef enum WrapMode{ + WRAPMODE_REPEAT, + WRAPMODE_CLAMP, +} WrapMode; + +Color32 texture_sampling(Texture* tex, FilterMode filter_mode, WrapMode wrap_mode, float x, float y); + #endif \ No newline at end of file -- cgit v1.1-26-g67d0