Finished off some loose ends for hot-reload
This commit is contained in:
parent
2e6ca2d0fd
commit
282c071163
@ -65,8 +65,8 @@ startup :: proc( live_mem, snapshot_mem : ^ virtual.Arena )
|
||||
transient = tracked_allocator_init_vmem( transient_slice, internals_size )
|
||||
temp = tracked_allocator_init_vmem( temp_slice , internals_size )
|
||||
|
||||
// context.allocator = tracked_allocator( transient )
|
||||
// context.temp_allocator = tracked_allocator( temp )
|
||||
context.allocator = tracked_allocator( transient )
|
||||
context.temp_allocator = tracked_allocator( temp )
|
||||
}
|
||||
state := new( State, tracked_allocator( memory.persistent ) )
|
||||
using state
|
||||
@ -164,8 +164,6 @@ render :: proc()
|
||||
draw_debug_text_y += 16
|
||||
}
|
||||
|
||||
// draw_text( "Hot-Reload Count : %v", -1 )
|
||||
|
||||
draw_text( "Screen Width : %v", rl.GetScreenWidth() )
|
||||
draw_text( "Screen Height: %v", rl.GetScreenHeight() )
|
||||
|
||||
|
@ -54,7 +54,7 @@ tracked_allocator :: proc ( self : ^ TrackedAllocator ) -> mem.Allocator {
|
||||
return mem.tracking_allocator( & self.tracker )
|
||||
}
|
||||
|
||||
tracked_allocator_init :: proc( size, internals_size : int ) -> TrackedAllocator
|
||||
tracked_allocator_init :: proc( size, internals_size : int, allocator := context.allocator ) -> TrackedAllocator
|
||||
{
|
||||
result : TrackedAllocator
|
||||
|
||||
@ -69,7 +69,7 @@ tracked_allocator_init :: proc( size, internals_size : int ) -> TrackedAllocator
|
||||
internals_size := internals_size + arena_size
|
||||
raw_size := backing_size + internals_size
|
||||
|
||||
raw_mem, raw_mem_code := mem.alloc( raw_size )
|
||||
raw_mem, raw_mem_code := mem.alloc( raw_size, mem.DEFAULT_ALIGNMENT, allocator )
|
||||
if ( raw_mem_code != mem.Allocator_Error.None )
|
||||
{
|
||||
// TODO(Ed) : Setup a proper logging interface
|
||||
|
Loading…
Reference in New Issue
Block a user