WIP: fleshing out cod2 for once a bit more
Planning to try out a flavor of Ryan's multi-threaded laned procs with the some extra threads hooked up separately to a job system. Will most likely do 2 threads main/helper on live lanes, then 2 others on job queue loops
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
# Sectr Package
|
||||
|
||||
|
||||
|
@@ -12,23 +12,21 @@ ModuleAPI :: struct {
|
||||
lib: dynlib.Library,
|
||||
// write-time: FileTime,
|
||||
|
||||
startup: type_of( startup ),
|
||||
shutdown: type_of( sectr_shutdown ),
|
||||
reload: type_of( hot_reload ),
|
||||
tick: type_of( tick ),
|
||||
clean_frame: type_of( clean_frame ),
|
||||
startup: type_of( startup ),
|
||||
hot_reload: type_of( hot_reload ),
|
||||
}
|
||||
|
||||
StartupContext :: struct {}
|
||||
|
||||
@export
|
||||
startup :: proc(ctx: StartupContext)
|
||||
startup :: proc(host_mem: ^HostMemory)
|
||||
{
|
||||
|
||||
|
||||
thread_wide_startup()
|
||||
}
|
||||
|
||||
@export
|
||||
sectr_shutdown :: proc()
|
||||
thread_wide_startup :: proc()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -38,15 +36,3 @@ hot_reload :: proc()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@export
|
||||
tick :: proc()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@export
|
||||
clean_frame ::proc()
|
||||
{
|
||||
|
||||
}
|
||||
|
16
code2/sectr/engine/host_api.odin
Normal file
16
code2/sectr/engine/host_api.odin
Normal file
@@ -0,0 +1,16 @@
|
||||
package sectr
|
||||
|
||||
HostMemory :: struct {
|
||||
client_api: ModuleAPI,
|
||||
client_memory: ^State,
|
||||
host_api: Host_API,
|
||||
}
|
||||
|
||||
Host_API :: struct {
|
||||
launch_thread: #type proc(),
|
||||
|
||||
request_virtual_memory: #type proc(),
|
||||
request_virtual_mapped_io: #type proc(),
|
||||
|
||||
sync_client_module : #type proc(),
|
||||
}
|
@@ -1 +1,3 @@
|
||||
package sectr
|
||||
|
||||
|
||||
|
@@ -1 +1,9 @@
|
||||
package sectr
|
||||
|
||||
// This should be the only global on client module side.
|
||||
host_memory: ^HostMemory
|
||||
|
||||
|
||||
State :: struct {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user