2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-06 16:57:25 +00:00

feat: add templated iw4 material loading

This commit is contained in:
Jan
2025-06-26 22:25:29 +01:00
parent f897a41188
commit 2073265a86
17 changed files with 1924 additions and 1464 deletions

File diff suppressed because it is too large Load Diff

View 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>> CreateCompilingMaterialLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt);
} // namespace IW4

File diff suppressed because it is too large Load Diff

View File

@@ -8,5 +8,5 @@
namespace IW4
{
std::unique_ptr<AssetCreator<AssetMaterial>> CreateMaterialLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt);
std::unique_ptr<AssetCreator<AssetMaterial>> CreateMaterialLoader(MemoryManager& memory, ISearchPath& searchPath);
} // namespace IW4

View File

@@ -6,6 +6,7 @@
#include "Leaderboard/LoaderLeaderboardIW4.h"
#include "LightDef/LoaderLightDefIW4.h"
#include "Localize/LoaderLocalizeIW4.h"
#include "Material/CompilingMaterialLoad.h"
#include "Material/LoaderMaterialIW4.h"
#include "Menu/LoaderMenuListIW4.h"
#include "ObjLoading.h"
@@ -126,7 +127,8 @@ namespace
// collection.AddAssetCreator(std::make_unique<AssetLoaderXAnim>(memory));
// collection.AddAssetCreator(std::make_unique<AssetLoaderXModelSurfs>(memory));
// collection.AddAssetCreator(std::make_unique<AssetLoaderXModel>(memory));
collection.AddAssetCreator(CreateMaterialLoader(memory, searchPath, gdt));
collection.AddAssetCreator(CreateMaterialLoader(memory, searchPath));
collection.AddAssetCreator(CreateCompilingMaterialLoader(memory, searchPath, gdt));
collection.AddAssetCreator(CreatePixelShaderLoader(memory, searchPath));
collection.AddAssetCreator(CreateVertexShaderLoader(memory, searchPath));
collection.AddAssetCreator(CreateVertexDeclLoader(memory));