X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_gen.h;h=500592d27eec550986eaab15d2e39cfc11893149;hb=8f83be5a31728cd6bf95020e729367cc44308763;hp=fac1fe7ebb602dbffac6088bb4101d2a3474e075;hpb=4b8aac300ee193cfa12011dfe0238cfe7d7ffce7;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_gen.h b/world_gen.h index fac1fe7..500592d 100644 --- a/world_gen.h +++ b/world_gen.h @@ -356,7 +356,7 @@ VG_STATIC void world_compute_light_indices( world_instance *world ) int total_cubes = icubes_count[0]*icubes_count[1]*icubes_count[2]; u32 *cubes_index = vg_linear_alloc( world_global.generic_heap, - total_cubes * sizeof(u32) * 2.0f ); + vg_align8(total_cubes*sizeof(u32)*2) ); vg_info( "Computing light cubes (%d) [%f %f %f] -> [%f %f %f]\n", total_cubes, cubes_min[0], -cubes_min[2], cubes_min[1], @@ -626,7 +626,7 @@ VG_STATIC void world_process_resources( world_instance *world ) world->texture_count = world->meta.textures.count+1; world->textures = vg_linear_alloc( world_global.generic_heap, - sizeof(GLuint)*world->texture_count ); + vg_align8(sizeof(GLuint)*world->texture_count) ); vg_acquire_thread_sync(); { @@ -660,7 +660,7 @@ VG_STATIC void world_process_resources( world_instance *world ) world->surface_count = world->meta.materials.count+1; world->surfaces = vg_linear_alloc( world_global.generic_heap, - sizeof(struct world_surface)*world->surface_count ); + vg_align8(sizeof(struct world_surface)*world->surface_count) ); /* error material */ struct world_surface *errmat = &world->surfaces[0]; @@ -796,7 +796,7 @@ VG_STATIC void world_entities_init( world_instance *world ) for( u32 j=0; jent_volume); j++ ){ ent_volume *volume = mdl_arritm( &world->ent_volume, j ); mdl_transform_m4x3( &volume->transform, volume->to_world ); - m4x3_invert_affine( volume->to_world, volume->to_local ); + m4x3_invert_full( volume->to_world, volume->to_local ); } /* audio packs */