chore: move material compilation behind compiler flag

This commit is contained in:
Jan
2025-06-28 16:06:11 +01:00
parent b05a473e6a
commit f23b47ca13
7 changed files with 18 additions and 11 deletions

View File

@ -2,6 +2,7 @@
#include "Game/IW4/IW4.h"
#include "Image/ImageIwdPostProcessor.h"
#include "Material/CompilerMaterialIW4.h"
#include <memory>
@ -9,11 +10,13 @@ using namespace IW4;
namespace
{
void ConfigureCompilers(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath)
void ConfigureCompilers(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt)
{
auto& memory = zone.Memory();
// No compilers yet
#ifdef EXPERIMENTAL_MATERIAL_COMPILATION
collection.AddAssetCreator(CreateCompilingMaterialLoader(memory, searchPath, gdt));
#endif
}
void ConfigurePostProcessors(AssetCreatorCollection& collection,
@ -39,5 +42,6 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
IOutputPath& outDir,
IOutputPath& cacheDir) const
{
ConfigureCompilers(collection, zone, searchPath, gdt);
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, zoneStates, outDir);
}