patch: enable live reloading

Does not yet reload emissive patches ("_light" argument for surfaces).
Does not reload deleted surfaces.
This commit is contained in:
Ivan Avdeev 2021-12-21 11:37:45 -08:00
parent 8b1971e0d1
commit 659402cb2a
1 changed files with 8 additions and 0 deletions

View File

@ -45,12 +45,20 @@ static struct {
draw_list_t *draw_list;
} g_lists;
static void reloadPatches( void ) {
XVK_ParseMapEntities();
// Assumes that the map has been loaded
VK_LightsLoadMapStaticLights();
}
void VK_SceneInit( void )
{
g_lists.draw_list = g_lists.draw_stack;
g_lists.draw_stack_pos = 0;
if (vk_core.rtx) {
gEngine.Cmd_AddCommand("vk_rtx_reload_materials", XVK_ReloadMaterials, "Reload PBR materials");
gEngine.Cmd_AddCommand("vk_rtx_reload_patches", reloadPatches, "Reload patches (does not update surface deletion)");
}
}