From 1a721b98caf7559f4a18baa8d3b92269e8f1f6ce Mon Sep 17 00:00:00 2001 From: Aaditya Dhruv Date: Fri, 30 Jan 2026 19:12:03 -0600 Subject: 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 --- src/texture.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/texture.h (limited to 'src/texture.h') 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); -- cgit