+ glViewport( 0,0, vg.window_x, vg.window_y );
+ player__render( &small_cam, &localplayer );
+}
+
+VG_STATIC void render_scene(void)
+{
+ render_fb_bind( gpipeline.fb_main, 1 );
+ glClearColor( 0.0f, 0.0f, 0.0f, 1.0f );
+ glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT );
+
+ /* Draw world */
+ glEnable( GL_DEPTH_TEST );
+
+ world_instance *view_world = localplayer.viewable_world;
+
+ if( view_world == NULL ){
+ glClearColor( 0.25f, 0.25f, 0.0f, 1.0f );
+ glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT );
+ return;
+ }
+
+ for( u32 i=0; i<vg_list_size(world_static.worlds); i++ ){
+ if( world_static.worlds[i].status == k_world_status_loaded ){
+ world_prerender( &world_static.worlds[i] );
+ }
+ }
+
+ render_world( view_world, &main_camera, 0 );
+
+ render_water_texture( view_world, &main_camera, 0 );
+ render_fb_bind( gpipeline.fb_main, 1 );
+ render_water_surface( view_world, &main_camera );
+}
+
+VG_STATIC void render_scene_gate_subview(void)
+{
+ render_fb_bind( gpipeline.fb_main, 1 );
+ world_instance *view_world = localplayer.viewable_world;
+
+ int depth = 1;
+ if( localplayer.gate_waiting ) depth = 0;
+ render_world_gates( view_world, &main_camera, depth );