void view_draw_scene_build(int tick) { // setup projection gl_3D_view(); gl_3D_rotate(&view.render->camera.pnt,&view.render->camera.ang); gl_setup_project(); // compile all lights in map gl_lights_compile(tick); // setup draw lists view_create_area_mask(); view_start_draw_list(); // add mesh and liquids to draw list view_add_mesh_draw_list(); view_add_liquid_draw_list(); // setup objects and projectiles // and add to draw list view_setup_objects(tick); view_setup_projectiles(tick); // add scene effects view_add_effect_draw_list(tick); // add scene halos halo_draw_clear(); view_add_halos(); }
void view_draw_dim3rtl_scene_build(void) { int n,tick; obj_type *obj; proj_type *proj; map_light_type *lit; map_particle_type *prt; // build the scene // we don't have to do as much as opengl // so just setup the animations tick=game_time_get(); view_setup_objects_rtl(tick); view_setup_projectiles_rtl(tick); // update the sky cube sky_update(); // no halos yet halo_draw_clear(); // create the model vertex/etc // lists for updating rtl and // add any halos for (n=0; n!=max_obj_list; n++) { obj=server.obj_list.objs[n]; if (obj==NULL) continue; if (obj->hidden) continue; render_model_build_vertex_lists(&obj->draw,TRUE); view_add_model_halo(&obj->draw,obj->idx); } for (n=0; n!=max_proj_list; n++) { proj=server.proj_list.projs[n]; if (!proj->on) continue; render_model_build_vertex_lists(&proj->draw,FALSE); view_add_model_halo(&proj->draw,-1); } // map and particle halos lit=map.lights; for (n=0; n!=map.nlight; n++) { halo_draw_add(&lit->pnt,-1,lit->setting.halo_idx); lit++; } prt=map.particles; for (n=0; n!=map.nparticle; n++) { halo_draw_add(&prt->pnt,-1,prt->light_setting.halo_idx); prt++; } }