diff options
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 |