diff options
author | chai <chaifix@163.com> | 2019-12-08 10:59:54 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-12-08 10:59:54 +0800 |
commit | fb2791c41847d76327b6665398b44be41a44c02d (patch) | |
tree | e6083a40093f04520079b89e87fbcc47caf5f598 /src/core/texture.h | |
parent | 8518e135ff5c312bd5a3b496d400c751aa3bd5b3 (diff) |
*misc
Diffstat (limited to 'src/core/texture.h')
-rw-r--r-- | src/core/texture.h | 17 |
1 files changed, 16 insertions, 1 deletions
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 |