Got a bit further

This commit is contained in:
Dynamitos
2023-11-05 11:47:22 +01:00
parent 77eb92838c
commit d35f7acddc
11 changed files with 32 additions and 20 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ MaterialLoader::MaterialLoader(Gfx::PGraphics graphics)
{
OMaterialAsset placeholderAsset = new MaterialAsset();
import(MaterialImportArgs{
.filePath = std::filesystem::absolute("./shaders/Placeholder.asset"),
.filePath = std::filesystem::absolute("./shaders/Placeholder.json"),
.importPath = "",
}, placeholderAsset);
AssetRegistry::get().assetRoot->materials[""] = std::move(placeholderAsset);
+1
View File
@@ -257,6 +257,7 @@ void MeshLoader::loadGlobalMeshes(const aiScene* scene, const Array<PMaterialAss
globalMeshes[meshIndex]->id = id;
globalMeshes[meshIndex]->referencedMaterial = materials[mesh->mMaterialIndex]->getMaterial()->instantiate();
globalMeshes[meshIndex]->meshlets = std::move(meshlets);
globalMeshes[meshIndex]->vertexCount = mesh->mNumVertices;
}
}
+3
View File
@@ -11,6 +11,7 @@
#include "Asset/MaterialLoader.h"
#include "Asset/FontLoader.h"
#include "Asset/AssetImporter.h"
#include "Graphics/StaticMeshVertexData.h"
using namespace Seele;
using namespace Seele::Editor;
@@ -29,6 +30,8 @@ int main()
GraphicsInitializer initializer;
graphics->init(initializer);
StaticMeshVertexData* vd = StaticMeshVertexData::getInstance();
vd->init(graphics);
PWindowManager windowManager = new WindowManager();
AssetRegistry::init(std::string("C:/Users/Dynamitos/TrackClear/Assets"), graphics);
AssetImporter::init(graphics, AssetRegistry::getInstance());