WIP Write meta files to track whether raw asset (fbx/gltf/dds) have been compiled into custom binary
This commit is contained in:
parent
a51cbb7e70
commit
584b7e425f
|
@ -82,9 +82,8 @@ namespace Sandbox
|
|||
|
||||
//TODO: REMOVE AFTER PRESENTATION
|
||||
SHADE::SHAssetManager::LoadDataTemp("../../Assets/racoon.gltf");
|
||||
SHADE::SHAssetManager::LoadDataTemp("../../Assets/RaccoonBag_Color_Ver4.dds");
|
||||
//SHADE::SHAssetManager::LoadDataTemp("../../Assets/RaccoonBag_Color_Ver4.dds");
|
||||
SHADE::SHAssetManager::LoadDataTemp("../../Assets/RaccoonPreTexturedVer1_Base9.dds");
|
||||
SHADE::SHAssetManager::LoadDataTemp("../../Assets/TD_Checker_Base_Color.dds");
|
||||
//TODO: REMOVE AFTER PRESENTATION
|
||||
|
||||
//SHADE::SHSystemManager::RegisterRoutine<SHADE::SHAudioSystem, SHADE::SHAudioSystem::AudioRoutine>();
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace Sandbox
|
|||
auto matInst = graphicsSystem->AddOrGetBaseMaterialInstance();
|
||||
auto customMat = graphicsSystem->AddMaterialInstanceCopy(matInst);
|
||||
customMat->SetProperty("data.color", SHVec4(0.0f, 1.0f, 1.0f, 1.0f));
|
||||
customMat->SetProperty("data.textureIndex", 1);
|
||||
customMat->SetProperty("data.textureIndex", 0);
|
||||
customMat->SetProperty("data.alpha", 0.1f);
|
||||
|
||||
// Create Stress Test Objects
|
||||
|
@ -115,7 +115,7 @@ namespace Sandbox
|
|||
renderable.SetMaterial(customMat);
|
||||
renderable.GetModifiableMaterial()->SetProperty("data.color", SHVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
||||
renderable.GetModifiableMaterial()->SetProperty("data.alpha", 1.0f);
|
||||
renderable.GetModifiableMaterial()->SetProperty("data.textureIndex", 1);
|
||||
renderable.GetModifiableMaterial()->SetProperty("data.textureIndex", 0);
|
||||
|
||||
transform.SetWorldPosition ({-3.0f, -1.0f, -1.0f});
|
||||
transform.SetLocalScale({5.0f, 5.0f, 5.0f});
|
||||
|
@ -147,7 +147,7 @@ namespace Sandbox
|
|||
renderableShowcase.SetMaterial(customMat);
|
||||
renderableShowcase.GetModifiableMaterial()->SetProperty("data.color", SHVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
||||
renderableShowcase.GetModifiableMaterial()->SetProperty("data.alpha", 1.0f);
|
||||
renderableShowcase.GetModifiableMaterial()->SetProperty("data.textureIndex", 1);
|
||||
renderableShowcase.GetModifiableMaterial()->SetProperty("data.textureIndex", 0);
|
||||
|
||||
transformShowcase.SetWorldPosition({ 3.0f, -1.0f, -1.0f });
|
||||
transformShowcase.SetLocalScale({ 5.0f, 5.0f, 5.0f });
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace SHADE
|
|||
file >> asset.numBytes;
|
||||
file >> asset.width;
|
||||
file >> asset.height;
|
||||
file >> format;
|
||||
//file >> format;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -199,7 +199,8 @@ namespace SHADE
|
|||
{
|
||||
AssetPath path{ p };
|
||||
|
||||
if (path.extension().string() == GLTF_EXTENSION)
|
||||
if (path.extension().string() == FBX_EXTENSION
|
||||
|| path.extension().string() == GLTF_EXTENSION)
|
||||
{
|
||||
LoadGLTF(
|
||||
{
|
||||
|
|
|
@ -99,6 +99,7 @@ namespace SHADE
|
|||
****************************************************************************/
|
||||
void SHAssetMetaHandler::WriteMetaData(SHAsset const& meta) noexcept
|
||||
{
|
||||
//TODO: Write into binary eventually
|
||||
std::string path{ meta.path.string() };
|
||||
path.append(META_EXTENSION);
|
||||
|
||||
|
@ -109,9 +110,21 @@ namespace SHADE
|
|||
SHLOG_ERROR("Asset write path is invalid: {}", path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
metaFile << "Name: " << meta.name << "\n";
|
||||
metaFile << "ID: " << meta.id << "\n";
|
||||
metaFile << "Type: " << static_cast<int>(meta.type) << std::endl;
|
||||
|
||||
//TODO Add in information that is specific to types like mesh
|
||||
switch(meta.type)
|
||||
{
|
||||
case AssetType::MESH:
|
||||
break;
|
||||
|
||||
default:
|
||||
void;
|
||||
}
|
||||
|
||||
metaFile.close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue