Show ResourceID instead of nothing in component UI panel.

This commit is contained in:
a.pilote
2022-07-15 22:08:54 -04:00
parent 06f4913b45
commit de3434703d
7 changed files with 42 additions and 30 deletions

View File

@@ -13,7 +13,7 @@ namespace Nuake {
mGBuffer->SetTexture(CreateRef<Texture>(Vector2(1920, 1080), GL_RGB), GL_COLOR_ATTACHMENT1);
mGBuffer->SetTexture(CreateRef<Texture>(Vector2(1920, 1080), GL_RGB), GL_COLOR_ATTACHMENT2);
mGBuffer->SetTexture(CreateRef<Texture>(Vector2(1920, 1080), GL_RGB), GL_COLOR_ATTACHMENT3);
mShadingBuffer = CreateScope<FrameBuffer>(true, Vector2(1920, 1080));
Ref<Texture> shadedTexture = CreateRef<Texture>(Vector2(1920, 1080), GL_RGB, GL_RGB16F, GL_FLOAT);
mShadingBuffer->SetTexture(shadedTexture);
@@ -27,7 +27,6 @@ namespace Nuake {
mToneMapBuffer = CreateScope<FrameBuffer>(false, Vector2(1920, 1080));
mToneMapBuffer->SetTexture(CreateRef<Texture>(Vector2(1920, 1080), GL_RGB), GL_COLOR_ATTACHMENT0);
}
void SceneRenderer::Cleanup()

View File

@@ -18,8 +18,7 @@ namespace Nuake
ResourceLoader() = default;
~ResourceLoader() = default;
static Ref<Material> LoadResource(const std::string& path)
static Ref<Material> LoadMaterial(const std::string& path)
{
const std::string FILE_NOT_FOUND = "[Resource Loader] File doesn't exists. \n ";
const std::string WRONG_EXTENSION = "[Resource Loader] Resource type mismatch file extension. \n expected: ";
@@ -55,7 +54,6 @@ namespace Nuake
return material;
}
private:
static UUID ReadUUID(json j)
{

View File

@@ -30,12 +30,12 @@ namespace Nuake
bool Deserialize(const std::string str)
{
BEGIN_DESERIALIZE();
ModelPath = j["ModelPath"];
ModelPath = j["ModelPath"].dump();
ModelResource = CreateRef<Model>();
if (j.contains("ModelResource"))
{
auto res = j["ModelResource"];
auto& res = j["ModelResource"];
ModelResource->Deserialize(res.dump());
}