Getting shaders working with lua.

This commit is contained in:
2026-03-28 21:50:59 -05:00
parent cbb68a399d
commit dbb7e9f53c
49 changed files with 305 additions and 114 deletions

View File

@@ -0,0 +1,26 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "mapchunk.h"
uint32_t mapChunkGetTileindex(const chunkpos_t position) {
return (
(position.z * CHUNK_WIDTH * CHUNK_HEIGHT) +
(position.y * CHUNK_WIDTH) +
position.x
);
}
bool_t mapChunkPositionIsEqual(const chunkpos_t a, const chunkpos_t b) {
return (a.x == b.x) && (a.y == b.y) && (a.z == b.z);
}
void mapChunkRender(const mapchunk_t *chunk) {
for(uint8_t i = 0; i < chunk->meshCount; i++) {
meshDraw(&chunk->meshes[i], 0, -1);
}
}