main.c (456B)
1 #include "minecraft.h" 2 3 int main() { 4 window_init(); 5 camera_init(vec3_make(0, (CHUNK_HEIGHT / 2) + 2, 0)); 6 shader_init(); 7 world_generate(); 8 render_init(); 9 10 float last = (float)glfwGetTime(); 11 12 while (!glfwWindowShouldClose(Window)) { 13 float now = (float)glfwGetTime(); 14 float dt = now - last; 15 last = now; 16 17 process_input(dt); 18 render_frame(); 19 } 20 blocks_end(); 21 shader_end(); 22 render_end(); 23 glfwTerminate(); 24 exit(0); 25 }