summaryrefslogtreecommitdiff
path: root/src/texture.h
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2026-01-30 19:12:03 -0600
committerAaditya Dhruv <[email protected]>2026-01-30 19:12:03 -0600
commit1a721b98caf7559f4a18baa8d3b92269e8f1f6ce (patch)
tree32be8966361f8f8ae74c6c0af226e39fe9feb375 /src/texture.h
parent4992ce0098cac8caef6c9315816b688d96259bce (diff)
Add basic block textures
- Remove the code that sent colors through uniform variables, instead send texture data - Each vertex now has a texture coordinate - struct texture is a easy way to represent textures, can be extended later - Shaders updated to use textures
Diffstat (limited to 'src/texture.h')
-rw-r--r--src/texture.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/texture.h b/src/texture.h
new file mode 100644
index 0000000..721356b
--- /dev/null
+++ b/src/texture.h
@@ -0,0 +1,9 @@
+#pragma once
+#include "glad/glad.h"
+struct texture {
+ GLuint _tbo;
+};
+
+void texture_init(struct texture** texture);
+void texture_load(struct texture* texture, char* path);
+void texture_draw(struct texture* texture);