X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_render.h;h=b1972ba546cf7cafd4774294559c7a39eaabbfc2;hb=8c376ed2e4021a18b0a6c6e800109d67ad09d198;hp=ad0d5c43a2d469fdb31c1650a7559241e08a7457;hpb=f99902f513b0ad606437bf32de47405dd4ea5f98;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_render.h b/world_render.h index ad0d5c4..b1972ba 100644 --- a/world_render.h +++ b/world_render.h @@ -49,7 +49,7 @@ VG_STATIC void world_render_init(void) fb->resolution_div = 0; fb->attachments[0].display_name = NULL; - fb->attachments[0].purpose = k_framebuffer_attachment_type_colour; + fb->attachments[0].purpose = k_framebuffer_attachment_type_texture; fb->attachments[0].internalformat = GL_RG16F; fb->attachments[0].format = GL_RG; fb->attachments[0].type = GL_FLOAT; @@ -359,16 +359,19 @@ VG_STATIC void render_world_gates( world_instance *world, camera *cam, } if( gate ){ -#if 0 - world_instance *dest_world = &world_global.worlds[ gate->world_index ]; - render_gate( dest_world, gate, cam, layer_depth ); -#else - render_gate( world, gate, cam, layer_depth ); -#endif - /* should really be set in fixed update since its used in the physics * of most systems. too bad! */ world->rendering_gate = gate; + + if( gate->type == k_gate_type_teleport ){ + render_gate( world, gate, cam, layer_depth ); + } + else if( gate->type == k_gate_type_nonlocel ){ + world_instance *dest_world = &world_global.worlds[ gate->target ]; + render_gate( dest_world, gate, cam, layer_depth ); + } + else + world->rendering_gate = NULL; } } @@ -377,7 +380,6 @@ VG_STATIC void world_prerender( world_instance *world ) static double g_time = 0.0; g_time += vg.time_delta * (1.0/(k_day_length*60.0)); - struct ub_world_lighting *state = &world->ub_lighting; state->g_time = g_time;