diff options
| author | Aaditya Dhruv <[email protected]> | 2026-01-30 19:12:03 -0600 |
|---|---|---|
| committer | Aaditya Dhruv <[email protected]> | 2026-01-30 19:12:03 -0600 |
| commit | 1a721b98caf7559f4a18baa8d3b92269e8f1f6ce (patch) | |
| tree | 32be8966361f8f8ae74c6c0af226e39fe9feb375 /src/chunk.h | |
| parent | 4992ce0098cac8caef6c9315816b688d96259bce (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/chunk.h')
| -rw-r--r-- | src/chunk.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/chunk.h b/src/chunk.h index 0122cf9..d49ba80 100644 --- a/src/chunk.h +++ b/src/chunk.h @@ -1,5 +1,6 @@ #pragma once #include "block.h" +#include "texture.h" #include "world.h" #include <stdint.h> #define CHUNK_WIDTH 16 @@ -49,5 +50,6 @@ void chunk_unload(struct chunk* chunk); * Technically this wraps block_draw, so block_draw is the one doing all the work * @param chunk Chunk to draw * @param shader Shader to pass to block_draw + * @param texture Textures that block_draw will use */ -void chunk_draw(struct chunk* chunk, struct shader* shader); +void chunk_draw(struct chunk* chunk, struct shader* shader, struct texture* texture); |
