chill out cubemaps
[carveJwlIkooP6JGAAIwe30JlM.git] / skaterift.c
index 5804a3d647c3604072989d5e6a6b236fe6cc92ae..3188fd9adee822628b7291a4d84788a5db364f39 100644 (file)
@@ -507,6 +507,19 @@ VG_STATIC void render_main_game(void){
 
    /* --------------------------------------------------------------------- */
 
+   world_instance *view_world = localplayer.viewable_world;
+   if( view_world != NULL ){
+      render_world_cubemaps( view_world );
+
+      ent_gate *gate = view_world->rendering_gate;
+      if( gate ){
+         if( gate->flags & k_ent_gate_nonlocal ){
+            world_instance *dest = &world_static.instances[ gate->target ];
+            render_world_cubemaps( dest );
+         }
+      }
+   }
+
    /* variable res target */
    render_fb_bind( gpipeline.fb_main, 1 );
    glClearColor( 0.0f, 0.0f, 0.0f, 1.0f );