Skip to content

Commit

Permalink
feat: add job system extension
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan hoffstadt committed Apr 16, 2024
1 parent 980f18c commit 45f478a
Show file tree
Hide file tree
Showing 6 changed files with 447 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
if not exist ../out/pl_image_ext.dll exit 1
if not exist ../out/pl_stats_ext.dll exit 1
if not exist ../out/pl_debug_ext.dll exit 1
if not exist ../out/pl_job_ext.dll exit 1
if not exist ../out/pl_gpu_allocators_ext.dll exit 1
if not exist ../out/pl_resource_ext.dll exit 1
if not exist ../out/pl_ecs_ext.dll exit 1
Expand Down Expand Up @@ -103,6 +104,7 @@ jobs:
test -f ./out/pl_image_ext.dylib || exit 1
test -f ./out/pl_debug_ext.dylib || exit 1
test -f ./out/pl_graphics_ext.dylib || exit 1
test -f ./out/pl_job_ext.dylib || exit 1
test -f ./out/pl_gpu_allocators_ext.dylib || exit 1
test -f ./out/pl_resource_ext.dylib || exit 1
test -f ./out/pl_ecs_ext.dylib || exit 1
Expand Down Expand Up @@ -167,6 +169,7 @@ jobs:
test -f ./out/pl_image_ext.so || exit 1
test -f ./out/pl_stats_ext.so || exit 1
test -f ./out/pl_debug_ext.so || exit 1
test -f ./out/pl_job_ext.so || exit 1
test -f ./out/pl_gpu_allocators_ext.so || exit 1
test -f ./out/pl_resource_ext.so || exit 1
test -f ./out/pl_ecs_ext.so || exit 1
Expand Down
9 changes: 7 additions & 2 deletions apps/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Index of this file:
#include "pl_ecs_ext.h"
#include "pl_resource_ext.h"
#include "pl_ref_renderer_ext.h"
#include "pl_job_ext.h"

// misc
#include "helper_windows.h"
Expand Down Expand Up @@ -105,6 +106,7 @@ const plEcsI* gptEcs = NULL;
const plCameraI* gptCamera = NULL;
const plResourceI* gptResource = NULL;
const plRefRendererI* gptRenderer = NULL;
const plJobI* gptJobs = NULL;

//-----------------------------------------------------------------------------
// [SECTION] pl_app_load
Expand Down Expand Up @@ -137,6 +139,7 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
gptCamera = ptApiRegistry->first(PL_API_CAMERA);
gptResource = ptApiRegistry->first(PL_API_RESOURCE);
gptRenderer = ptApiRegistry->first(PL_API_REF_RENDERER);
gptJobs = ptApiRegistry->first(PL_API_JOB);

return ptAppData;
}
Expand All @@ -160,14 +163,15 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
// load extensions
const plExtensionRegistryI* ptExtensionRegistry = ptApiRegistry->first(PL_API_EXTENSION_REGISTRY);
ptExtensionRegistry->load("pl_image_ext", NULL, NULL, false);
ptExtensionRegistry->load("pl_job_ext", NULL, NULL, false);
ptExtensionRegistry->load("pl_stats_ext", NULL, NULL, false);
ptExtensionRegistry->load("pl_graphics_ext", NULL, NULL, false);
ptExtensionRegistry->load("pl_gpu_allocators_ext", NULL, NULL, false);
ptExtensionRegistry->load("pl_debug_ext", NULL, NULL, true);
ptExtensionRegistry->load("pl_ecs_ext", NULL, NULL, false);
ptExtensionRegistry->load("pl_resource_ext", NULL, NULL, false);
ptExtensionRegistry->load("pl_ref_renderer_ext", NULL, NULL, true);

// load apis
gptWindows = ptApiRegistry->first(PL_API_WINDOW);
gptThreads = ptApiRegistry->first(PL_API_THREADS);
Expand All @@ -182,6 +186,7 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
gptCamera = ptApiRegistry->first(PL_API_CAMERA);
gptResource = ptApiRegistry->first(PL_API_RESOURCE);
gptRenderer = ptApiRegistry->first(PL_API_REF_RENDERER);
gptJobs = ptApiRegistry->first(PL_API_JOB);

const plWindowDesc tWindowDesc = {
.pcName = "Pilot Light Example",
Expand Down Expand Up @@ -422,7 +427,7 @@ pl_app_update(plAppData* ptAppData)
.bShowAllBoundingBoxes = ptAppData->bDrawAllBoundingBoxes,
.bShowVisibleBoundingBoxes = ptAppData->bDrawVisibleBoundingBoxes,
.bShowOrigin = false,
.bCullStats = true,
.bCullStats = false,
.ptViewCamera = ptCamera2,
.ptCullCamera = ptCamera2
};
Expand Down
Loading

0 comments on commit 45f478a

Please sign in to comment.