Finished off some loose ends for hot-reload

This commit is contained in:
Edward R. Gonzalez 2024-01-30 01:54:37 -05:00
parent 2e6ca2d0fd
commit 282c071163
3 changed files with 4 additions and 7 deletions

View File

@ -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() )

View File

@ -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

View File

@ -14,7 +14,6 @@
"path": "C:/projects/SectrPrototype/code"
}
],
"enable_format": false,
"enable_document_symbols": true,
"enable_semantic_tokens": false,
"enable_hover": true,