commit f872c8f752a93cf3ba54e8347ba78cfb0c8bab1e parent 3a127afbf93ca30feaa99ca787dfa5d1351ffb83 Author: Michael Savage <mikejsavage@gmail.com> Date: Sat Sep 10 18:22:19 -0700 Move terrain_init after workqueue_init Diffstat:
hm.cc | | | 10 | +++++----- |
diff --git a/hm.cc b/hm.cc @@ -114,11 +114,6 @@ static WORK_QUEUE_CALLBACK( testwq ) { } extern "C" GAME_INIT( game_init ) { - game->pos = glm::vec3( 15000, 3000, 50 ); - game->angles = glm::radians( glm::vec3( -90, 45, 0 ) ); - terrain_init( &game->tm, "terrains/Srtm_ramp2.world.21600x10800.jpg.parts", &mem->persistent_arena ); - terrain_teleport( &game->tm, game->pos ); - workqueue_init( &game->background_tasks, &mem->persistent_arena, 2 ); u32 nums[ 10 ]; for( u32 i = 0; i < 10; i++ ) { @@ -127,6 +122,11 @@ extern "C" GAME_INIT( game_init ) { } workqueue_exhaust( &game->background_tasks ); + game->pos = glm::vec3( 15000, 3000, 50 ); + game->angles = glm::radians( glm::vec3( -90, 45, 0 ) ); + terrain_init( &game->tm, "terrains/gta.png.parts", &mem->persistent_arena, &game->background_tasks ); + terrain_teleport( &game->tm, game->pos ); + game->test_shader = compile_shader( vert_src, frag_src, "screen_colour" ); game->test_at_position = glGetAttribLocation( game->test_shader, "position" ); game->test_at_colour = glGetAttribLocation( game->test_shader, "colour" );