scene_copy_slice( world->scene_no_collide, &mat->sm_no_collide );
}
+ /* this FIXME TODO IMPORTANT is going here because need to write down.
+ *
+ * acuire_thread_sync; replace this with a buffer that you fill up with
+ * opengl loader commands in a seperate memory area. the operation blocks
+ * if the buffer is full, then those instructions get ran on the sync line.
+ * (start of the frame)
+ *
+ * also blocks if the other thread is executing the instructions, obviously.
+ *
+ * this prevents rapid context swaps between threads.
+ *
+ * guessing a 50mb loader buffer approx.
+ *
+ * TODO also: fadeout loading screen!
+ */
+
+ for( u32 i=0; i<mdl_arrcount( &world->ent_traffic ); i++ ){
+ ent_traffic *vehc = mdl_arritm( &world->ent_traffic, i );
+
+ for( u32 j=0; j<vehc->submesh_count; j++ ){
+ mdl_submesh *sm = mdl_arritm( &world->meta.submeshs,
+ vehc->submesh_start+j );
+
+ if( sm->flags & k_submesh_flag_consumed ){
+ continue;
+ }
+
+ m4x3f identity;
+ m4x3_identity( identity );
+ scene_add_mdl_submesh( world->scene_no_collide, &world->meta,
+ sm, identity );
+
+ scene_copy_slice( world->scene_no_collide, sm );
+ sm->flags |= k_submesh_flag_consumed;
+ }
+ }
+
/* upload and free that */
vg_acquire_thread_sync();
{
world->textures = vg_linear_alloc( world->heap,
vg_align8(sizeof(GLuint)*world->texture_count) );
+ /* TODO FIXME IMPORTANT
+ *
+ * this is another area that would benefit from our load thread buffer idea.
+ * could get a stall if lots of textures, since its freading, we're locking
+ * the frame up from drawing based on that disk read!!! terrible!
+ */
+
vg_acquire_thread_sync();
{
/* error texture */
mdl_load_array( meta, &world->ent_audio_clip,"ent_audio_clip", heap );
mdl_load_array( meta, &world->ent_audio, "ent_audio", heap );
mdl_load_array( meta, &world->ent_volume, "ent_volume", heap );
+ mdl_load_array( meta, &world->ent_traffic, "ent_traffic", heap );
/* process resources from pack */
world_process_resources( world );