Fixed chunk coordinate system
This commit is contained in:
parent
132f84a43f
commit
8f5c9cef39
|
@ -261,7 +261,7 @@ bool update()
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
tc_game_state_g = tc_init();
|
||||
tc_new_chunk(&tc_game_state_g.main_world, 0.0f, 0.0f, 0.0f);
|
||||
tc_new_chunk(&tc_game_state_g.main_world, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
block = tc_new_block_at_3f(0.0, 0.0, 0.0);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ tc_worldgen_s tc_default_terrain_generator_g;
|
|||
void tc_draw_chunk(tc_chunk_s *chunk)
|
||||
{
|
||||
mat4x4 model_matrix;
|
||||
mat4x4_translate(model_matrix, chunk->position.x*32, chunk->position.y*32, chunk->position.z*32);
|
||||
mat4x4_translate(model_matrix, chunk->position.x*32, chunk->position.y*32, -chunk->position.z*32);
|
||||
|
||||
int model_matrix_uniform_location =
|
||||
glGetUniformLocation(tc_game_state_g.renderer.draw_shader.program_id, "model_matrix");
|
||||
|
|
Loading…
Reference in New Issue