summaryrefslogtreecommitdiff
path: root/src/core/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/texture.h')
-rw-r--r--src/core/texture.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/texture.h b/src/core/texture.h
index 9e0d884..06016ad 100644
--- a/src/core/texture.h
+++ b/src/core/texture.h
@@ -14,13 +14,26 @@ typedef enum {
WRAPMODE_CLAMP,
} WrapMode;
+typedef enum {
+ COMPONENT_RGBA,
+ COMPONENT_DEPTH
+} TextureComponent;
+
typedef struct {
uint width, height;
- Color32* pixels;
+ Color32* pixels; /*RGBA*/
+ FilterMode filter_mode;
+ WrapMode wrap_mode;
} Texture;
Texture* texture_loadfromfile(const char* path);
+Texture* texture_create(uint width, uint height);
+
+void texture_setfiltermode(Texture* tex, FilterMode filter);
+void texture_setwrapmode(Texture* tex, WrapMode wrap);
+
+Color32 texture_sampling(Texture* tex, float x, float y);
-Color32 texture_sampling(Texture* tex, FilterMode filter_mode, WrapMode wrap_mode, float x, float y);
+void texture_free(Texture* tex);
#endif \ No newline at end of file