mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-13 16:28:31 -05:00
Create Default materials for iw4
This commit is contained in:
17
src/ObjLoading/Game/IW4/AssetLoaders/AssetLoaderMaterial.cpp
Normal file
17
src/ObjLoading/Game/IW4/AssetLoaders/AssetLoaderMaterial.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderMaterial.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "ObjLoading.h"
|
||||
#include "Game/IW4/IW4.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
using namespace IW4;
|
||||
|
||||
void* AssetLoaderMaterial::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* material = memory->Create<Material>();
|
||||
memset(material, 0, sizeof(Material));
|
||||
material->info.name = memory->Dup(assetName.c_str());
|
||||
return material;
|
||||
}
|
Reference in New Issue
Block a user