mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-07-06 19:21:52 +00:00
chore: move material compilation behind compiler flag
This commit is contained in:
1383
src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp
Normal file
1383
src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp
Normal file
File diff suppressed because it is too large
Load Diff
12
src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.h
Normal file
12
src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "Asset/IAssetCreator.h"
|
||||
#include "Game/IW4/IW4.h"
|
||||
#include "Gdt/IGdtQueryable.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
namespace IW4
|
||||
{
|
||||
std::unique_ptr<AssetCreator<AssetMaterial>> CreateMaterialCompiler(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt);
|
||||
} // namespace IW4
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user