mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
97993b72fee39803a2c21e8d3e6adf6e3a686fc6
* feat(gameplay): implement greedy meshing for chunk generation Replace the per-face vertex generation with a greedy meshing algorithm that merges adjacent faces of the same block type into larger quads. Introduce `FaceKey` struct and helper functions (`axis_dir_to_face`, `get_block_safe`, `is_face_culled`, `choose_buf`) to support the new algorithm. Comment out the old `gen_vertices` implementation. In texture management, rename `m_pbr_texture_array` to `m_normal_texture_array` to reflect its actual usage, and set texture wrap mode to `GL_REPEAT` for both the block and normal texture arrays. * fix(primitive_data): correct back face texture coordinates and tangents * fix(texture-manager): correct texture deletion and refactor reload Make hot_reload private and add public need_reload method. Update UI to call need_reload instead of hot_reload. Fix incorrect use of glDeleteBuffers for normal texture array by using glDeleteTextures.
What's it
A cube game like Minecraft, using C++ and OpenGL.
Build Guide
Prerequisites
- CMake (>= 3.24)
- C++ 23 compatible compiler
Step
- Clone the repository
git clone https://github.com/zhenyan121/Cubed.git && cd Cubed - Configure with CMake
mkdir build && cd build cmake -G "Ninja" .. - Build the project
ninja
Languages
C++
96.8%
C
2.1%
GLSL
0.6%
Python
0.3%
CMake
0.2%