+
+void vg_ui(void)
+{
+ if( lightedit )
+ {
+ ui_global_ctx.cursor[0] = 10;
+ ui_global_ctx.cursor[1] = 10;
+ ui_global_ctx.cursor[2] = 200;
+ ui_global_ctx.cursor[3] = 20;
+
+ struct ub_world_lighting *wl = &gpipeline.ub_world_lighting;
+ struct ui_slider_vector
+ s5 = { .min=0.0f, .max=2.0f, .len=3, .data=wl->g_ambient_colour };
+
+ struct ui_slider
+ s8 = { .min=0.0f, .max=2.0f, .data = &gpipeline.shadow_spread },
+ s9 = { .min=0.0f, .max=25.0f, .data = &gpipeline.shadow_length };
+
+ for( int i=0; i<3; i++ )
+ run_light_widget( &gpipeline.widgets[i] );
+
+ gui_text( ui_global_ctx.cursor, "Ambient", 1, 0 );
+ ui_global_ctx.cursor[1] += 16;
+ ui_slider_vector( &ui_global_ctx, &s5 );
+
+ gui_text( ui_global_ctx.cursor, "Shadows", 1, 0 );
+ ui_global_ctx.cursor[1] += 16;
+ ui_slider( &ui_global_ctx, &s8 );
+ ui_slider( &ui_global_ctx, &s9 );
+
+ gui_text( ui_global_ctx.cursor, "Misc", 1, 0 );
+ ui_global_ctx.cursor[1] += 16;
+ struct ui_checkbox c1 = {.data = &wl->g_light_preview};
+ ui_checkbox( &ui_global_ctx, &c1 );
+
+ render_update_lighting_ub();
+ }
+
+ //glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
+ if( cl_ui )
+ {
+ render_world_routes_ui();
+ }
+ //glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+
+ audio_debug_soundscapes();
+ world_audio_debug();
+
+#if 0
+ static double last_b_press = 0.0;
+
+ double localtime = vg_time - last_b_press;
+
+ world_routes_ui_updatetime( 0, localtime );
+ world_routes_ui_draw( 0, (v4f){ 1.0f,0.0f,1.0f,1.0f}, 9.0f );
+
+ if( glfwGetKey(vg_window,GLFW_KEY_B) )
+ world_routes_ui_notch( 0, localtime );
+
+ if( vg_time-last_b_press > 1.0 )
+ if( glfwGetKey(vg_window,GLFW_KEY_N) )
+ {
+ last_b_press = vg_time;
+ world_routes_ui_newseg( 0 );
+ }
+
+ static double last_m_press;
+ if( vg_time-last_m_press > 1.0 )
+ if( glfwGetKey( vg_window, GLFW_KEY_M) )
+ {
+ last_m_press = vg_time;
+
+ vg_info( "start: %u\n",world.routes.routes[0].ui.segment_count );
+ for( int i=0; i<world.routes.routes[0].ui.segment_count; i++ )
+ world_routes_ui_popfirst(0);
+
+ vg_info( "new: %u\n",world.routes.routes[0].ui.segment_count );
+ }
+#endif
+}