Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Shaders can now be linked to shaders - Need to move pipeline creation into materials (At Least for objects that use a material)
- Loading branch information
1 parent
6e8faa7
commit 04573fa
Showing
12 changed files
with
111 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "MaterialDeserializer.h" | ||
|
||
namespace Arcane | ||
{ | ||
MaterialDeserializer::MaterialDeserializer(std::filesystem::path path) | ||
{ | ||
m_Path = path; | ||
} | ||
|
||
Material* MaterialDeserializer::Deserialize() | ||
{ | ||
// Reading in material json | ||
nlohmann::json jsonObject; | ||
std::ifstream i(m_Path.string()); | ||
i >> jsonObject; | ||
|
||
// Get name of material | ||
std::string name = jsonObject["name"]; | ||
|
||
return Material::Create(nullptr); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include <fstream> | ||
#include <filesystem> | ||
#include <nlohmann/json.hpp> | ||
|
||
#include "Arcane/Renderer/Material.h" | ||
|
||
namespace Arcane | ||
{ | ||
class MaterialDeserializer | ||
{ | ||
public: | ||
MaterialDeserializer(std::filesystem::path path); | ||
|
||
Material* Deserialize(); | ||
private: | ||
std::filesystem::path m_Path; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters