projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
right hand yellow
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_gen.h
diff --git
a/world_gen.h
b/world_gen.h
index fac1fe7ebb602dbffac6088bb4101d2a3474e075..500592d27eec550986eaab15d2e39cfc11893149 100644
(file)
--- 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,
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],
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,
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();
{
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,
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];
/* 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; j<mdl_arrcount(&world->ent_volume); j++ ){
ent_volume *volume = mdl_arritm( &world->ent_volume, j );
mdl_transform_m4x3( &volume->transform, volume->to_world );
for( u32 j=0; j<mdl_arrcount(&world->ent_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 */
}
/* audio packs */