diff options
| author | Aaditya Dhruv <[email protected]> | 2026-01-30 00:42:50 -0600 |
|---|---|---|
| committer | Aaditya Dhruv <[email protected]> | 2026-01-30 00:42:50 -0600 |
| commit | 839e04c5b583b51726207fc2508dce5c3afb3f04 (patch) | |
| tree | 70da713f51c513b47ece6b8db1b9bfb28e0b3da8 /src/block.h | |
| parent | 8150b91d4076d15f8df5cd66acc1b8076a2ee1a9 (diff) | |
Add chunk_unloading on chunk Changes
If we change a chunk, unload all chunks. This removes block GPU data
(vbo, ebo, vao). We anyways redraw so we don't lose anything
Diffstat (limited to 'src/block.h')
| -rw-r--r-- | src/block.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/block.h b/src/block.h index b19265d..f55f784 100644 --- a/src/block.h +++ b/src/block.h @@ -24,3 +24,13 @@ int block_init(vec3 pos, struct block* blk); int block_draw(struct block* blk, struct shader* shader); void block_debug(struct block* blk); void block_update(struct block* blk); + +/** + * Remove GPU related data of a block. This is usually called by chunk_unload + * + */ +void block_unload(struct block* blk); +/** + * Load GPU data of a block + */ +void block_load_gpu(struct block* blk); |
