build: update for PL changes

This commit is contained in:
Jonathan Hoffstadt 2025-03-27 21:27:44 -05:00
parent d9a584a55a
commit 04b4613b9c
2 changed files with 16 additions and 18 deletions

View File

@ -21,7 +21,7 @@ Index of this file:
// [SECTION] apis
//-----------------------------------------------------------------------------
#define plExampleI_version (plVersion){1, 0, 0}
#define plExampleI_version {1, 0, 0}
//-----------------------------------------------------------------------------
// [SECTION] public api

View File

@ -51,7 +51,7 @@ Index of this file:
#include "pl_virtual_memory_ext.h"
#include "pl_console_ext.h"
#include "pl_screen_log_ext.h"
#include "pl_debug_ext.h" // not technically stable
#include "pl_tools_ext.h"
// example extensions
#include "pl_example_ext.h"
@ -108,7 +108,7 @@ const plDrawBackendI* gptDrawBackend = NULL;
const plProfileI* gptProfile = NULL;
const plExampleI* gptExample = NULL;
const plStatsI* gptStats = NULL;
const plDebugApiI* gptDebug = NULL;
const plToolsI* gptTools = NULL;
const plImageI* gptImage = NULL;
const plGPUAllocatorsI* gptGpuAllocators = NULL;
const plJobI* gptJob = NULL;
@ -174,7 +174,7 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
gptProfile = pl_get_api_latest(ptApiRegistry, plProfileI);
gptStats = pl_get_api_latest(ptApiRegistry, plStatsI);
gptExample = pl_get_api_latest(ptApiRegistry, plExampleI);
gptDebug = pl_get_api_latest(ptApiRegistry, plDebugApiI);
gptTools = pl_get_api_latest(ptApiRegistry, plToolsI);
gptImage = pl_get_api_latest(ptApiRegistry, plImageI);
gptGpuAllocators = pl_get_api_latest(ptApiRegistry, plGPUAllocatorsI);
gptJob = pl_get_api_latest(ptApiRegistry, plJobI);
@ -214,7 +214,7 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
gptProfile = pl_get_api_latest(ptApiRegistry, plProfileI);
gptStats = pl_get_api_latest(ptApiRegistry, plStatsI);
gptExample = pl_get_api_latest(ptApiRegistry, plExampleI);
gptDebug = pl_get_api_latest(ptApiRegistry, plDebugApiI);
gptTools = pl_get_api_latest(ptApiRegistry, plToolsI);
gptImage = pl_get_api_latest(ptApiRegistry, plImageI);
gptGpuAllocators = pl_get_api_latest(ptApiRegistry, plGPUAllocatorsI);
gptJob = pl_get_api_latest(ptApiRegistry, plJobI);
@ -248,19 +248,19 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
};
gptWindows->create_window(tWindowDesc, &ptAppData->ptWindow);
// initialize APIs that require it
gptDebug->initialize();
// retrieve some console variables
ptAppData->pbShowLogging = (bool*)gptConsole->get_variable("d.LogTool", NULL, NULL);
ptAppData->pbShowStats = (bool*)gptConsole->get_variable("d.StatTool", NULL, NULL);
ptAppData->pbShowProfiling = (bool*)gptConsole->get_variable("d.ProfileTool", NULL, NULL);
ptAppData->pbShowMemoryAllocations = (bool*)gptConsole->get_variable("d.MemoryAllocationTool", NULL, NULL);
ptAppData->pbShowDeviceMemoryAnalyzer = (bool*)gptConsole->get_variable("d.DeviceMemoryAnalyzerTool", NULL, NULL);
// setup graphics extension
pl__setup_graphics_extensions(ptAppData);
// initialize APIs that require it
gptTools->initialize((plToolsInit){.ptDevice = ptAppData->ptDevice});
// retrieve some console variables
ptAppData->pbShowLogging = (bool*)gptConsole->get_variable("t.LogTool", NULL, NULL);
ptAppData->pbShowStats = (bool*)gptConsole->get_variable("t.StatTool", NULL, NULL);
ptAppData->pbShowProfiling = (bool*)gptConsole->get_variable("t.ProfileTool", NULL, NULL);
ptAppData->pbShowMemoryAllocations = (bool*)gptConsole->get_variable("t.MemoryAllocationTool", NULL, NULL);
ptAppData->pbShowDeviceMemoryAnalyzer = (bool*)gptConsole->get_variable("t.DeviceMemoryAnalyzerTool", NULL, NULL);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~setup draw extensions~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// initialize
@ -418,7 +418,7 @@ pl_app_update(plAppData* ptAppData)
if(ptAppData->bShowUiDebug)
gptUi->show_debug_window(&ptAppData->bShowUiDebug);
gptDebug->update();
gptTools->update();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~graphics work~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -531,8 +531,6 @@ pl__setup_graphics_extensions(plAppData* ptAppData)
};
ptAppData->ptDevice = gptGfx->create_device(&tDeviceInit);
gptDataRegistry->set_data("device", ptAppData->ptDevice); // used by debug extension
// create command pools
for(uint32_t i = 0; i < gptGfx->get_frames_in_flight(); i++)
ptAppData->atCmdPools[i] = gptGfx->create_command_pool(ptAppData->ptDevice, NULL);