build: update for PL changes
This commit is contained in:
parent
d9a584a55a
commit
04b4613b9c
@ -21,7 +21,7 @@ Index of this file:
|
|||||||
// [SECTION] apis
|
// [SECTION] apis
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#define plExampleI_version (plVersion){1, 0, 0}
|
#define plExampleI_version {1, 0, 0}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] public api
|
// [SECTION] public api
|
||||||
|
32
src/app.c
32
src/app.c
@ -51,7 +51,7 @@ Index of this file:
|
|||||||
#include "pl_virtual_memory_ext.h"
|
#include "pl_virtual_memory_ext.h"
|
||||||
#include "pl_console_ext.h"
|
#include "pl_console_ext.h"
|
||||||
#include "pl_screen_log_ext.h"
|
#include "pl_screen_log_ext.h"
|
||||||
#include "pl_debug_ext.h" // not technically stable
|
#include "pl_tools_ext.h"
|
||||||
|
|
||||||
// example extensions
|
// example extensions
|
||||||
#include "pl_example_ext.h"
|
#include "pl_example_ext.h"
|
||||||
@ -108,7 +108,7 @@ const plDrawBackendI* gptDrawBackend = NULL;
|
|||||||
const plProfileI* gptProfile = NULL;
|
const plProfileI* gptProfile = NULL;
|
||||||
const plExampleI* gptExample = NULL;
|
const plExampleI* gptExample = NULL;
|
||||||
const plStatsI* gptStats = NULL;
|
const plStatsI* gptStats = NULL;
|
||||||
const plDebugApiI* gptDebug = NULL;
|
const plToolsI* gptTools = NULL;
|
||||||
const plImageI* gptImage = NULL;
|
const plImageI* gptImage = NULL;
|
||||||
const plGPUAllocatorsI* gptGpuAllocators = NULL;
|
const plGPUAllocatorsI* gptGpuAllocators = NULL;
|
||||||
const plJobI* gptJob = NULL;
|
const plJobI* gptJob = NULL;
|
||||||
@ -174,7 +174,7 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
|
|||||||
gptProfile = pl_get_api_latest(ptApiRegistry, plProfileI);
|
gptProfile = pl_get_api_latest(ptApiRegistry, plProfileI);
|
||||||
gptStats = pl_get_api_latest(ptApiRegistry, plStatsI);
|
gptStats = pl_get_api_latest(ptApiRegistry, plStatsI);
|
||||||
gptExample = pl_get_api_latest(ptApiRegistry, plExampleI);
|
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);
|
gptImage = pl_get_api_latest(ptApiRegistry, plImageI);
|
||||||
gptGpuAllocators = pl_get_api_latest(ptApiRegistry, plGPUAllocatorsI);
|
gptGpuAllocators = pl_get_api_latest(ptApiRegistry, plGPUAllocatorsI);
|
||||||
gptJob = pl_get_api_latest(ptApiRegistry, plJobI);
|
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);
|
gptProfile = pl_get_api_latest(ptApiRegistry, plProfileI);
|
||||||
gptStats = pl_get_api_latest(ptApiRegistry, plStatsI);
|
gptStats = pl_get_api_latest(ptApiRegistry, plStatsI);
|
||||||
gptExample = pl_get_api_latest(ptApiRegistry, plExampleI);
|
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);
|
gptImage = pl_get_api_latest(ptApiRegistry, plImageI);
|
||||||
gptGpuAllocators = pl_get_api_latest(ptApiRegistry, plGPUAllocatorsI);
|
gptGpuAllocators = pl_get_api_latest(ptApiRegistry, plGPUAllocatorsI);
|
||||||
gptJob = pl_get_api_latest(ptApiRegistry, plJobI);
|
gptJob = pl_get_api_latest(ptApiRegistry, plJobI);
|
||||||
@ -248,19 +248,19 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
|
|||||||
};
|
};
|
||||||
gptWindows->create_window(tWindowDesc, &ptAppData->ptWindow);
|
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
|
// setup graphics extension
|
||||||
pl__setup_graphics_extensions(ptAppData);
|
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~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~setup draw extensions~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// initialize
|
// initialize
|
||||||
@ -418,7 +418,7 @@ pl_app_update(plAppData* ptAppData)
|
|||||||
if(ptAppData->bShowUiDebug)
|
if(ptAppData->bShowUiDebug)
|
||||||
gptUi->show_debug_window(&ptAppData->bShowUiDebug);
|
gptUi->show_debug_window(&ptAppData->bShowUiDebug);
|
||||||
|
|
||||||
gptDebug->update();
|
gptTools->update();
|
||||||
|
|
||||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~graphics work~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~graphics work~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -531,8 +531,6 @@ pl__setup_graphics_extensions(plAppData* ptAppData)
|
|||||||
};
|
};
|
||||||
ptAppData->ptDevice = gptGfx->create_device(&tDeviceInit);
|
ptAppData->ptDevice = gptGfx->create_device(&tDeviceInit);
|
||||||
|
|
||||||
gptDataRegistry->set_data("device", ptAppData->ptDevice); // used by debug extension
|
|
||||||
|
|
||||||
// create command pools
|
// create command pools
|
||||||
for(uint32_t i = 0; i < gptGfx->get_frames_in_flight(); i++)
|
for(uint32_t i = 0; i < gptGfx->get_frames_in_flight(); i++)
|
||||||
ptAppData->atCmdPools[i] = gptGfx->create_command_pool(ptAppData->ptDevice, NULL);
|
ptAppData->atCmdPools[i] = gptGfx->create_command_pool(ptAppData->ptDevice, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user