Add unity build support
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Nz
|
||||
{
|
||||
namespace
|
||||
{
|
||||
const UInt8 r_shader[] = {
|
||||
const UInt8 r_basicMaterialShader[] = {
|
||||
#include <Nazara/Graphics/Resources/Shaders/basic_material.nzsl.h>
|
||||
};
|
||||
}
|
||||
@@ -254,7 +254,7 @@ namespace Nz
|
||||
#endif
|
||||
|
||||
if (!shaderModule)
|
||||
shaderModule = ShaderLang::Parse(std::string_view(reinterpret_cast<const char*>(r_shader), sizeof(r_shader)));
|
||||
shaderModule = ShaderLang::Parse(std::string_view(reinterpret_cast<const char*>(r_basicMaterialShader), sizeof(r_basicMaterialShader)));
|
||||
|
||||
auto shader = std::make_shared<UberShader>(ShaderStageType::Fragment | ShaderStageType::Vertex, std::move(shaderModule));
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Nz
|
||||
{
|
||||
namespace
|
||||
{
|
||||
const UInt8 r_shader[] = {
|
||||
const UInt8 r_depthMaterialShader[] = {
|
||||
#include <Nazara/Graphics/Resources/Shaders/depth_material.nzsl.h>
|
||||
};
|
||||
}
|
||||
@@ -36,7 +36,7 @@ namespace Nz
|
||||
#endif
|
||||
|
||||
if (!shaderModule)
|
||||
shaderModule = ShaderLang::Parse(std::string_view(reinterpret_cast<const char*>(r_shader), sizeof(r_shader)));
|
||||
shaderModule = ShaderLang::Parse(std::string_view(reinterpret_cast<const char*>(r_depthMaterialShader), sizeof(r_depthMaterialShader)));
|
||||
|
||||
auto shader = std::make_shared<UberShader>(ShaderStageType::Fragment | ShaderStageType::Vertex, std::move(shaderModule));
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// https://themaister.net/blog/2017/08/15/render-graphs-and-vulkan-a-deep-dive/
|
||||
|
||||
#include <Nazara/Graphics/FrameGraph.hpp>
|
||||
#include <Nazara/Core/Algorithm.hpp>
|
||||
#include <Nazara/Core/StackArray.hpp>
|
||||
#include <Nazara/Graphics/Graphics.hpp>
|
||||
#include <stdexcept>
|
||||
@@ -16,13 +17,6 @@ namespace Nz
|
||||
{
|
||||
namespace
|
||||
{
|
||||
template<typename T> const T& Retrieve(const std::unordered_map<std::size_t, T>& map, std::size_t id)
|
||||
{
|
||||
auto it = map.find(id);
|
||||
assert(it != map.end());
|
||||
return it->second;
|
||||
}
|
||||
|
||||
template<typename T> void UniquePushBack(std::vector<T>& vec, const T& value)
|
||||
{
|
||||
auto it = std::find(vec.begin(), vec.end(), value);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Nz
|
||||
{
|
||||
namespace
|
||||
{
|
||||
const UInt8 r_shader[] = {
|
||||
const UInt8 r_phongMaterialShader[] = {
|
||||
#include <Nazara/Graphics/Resources/Shaders/phong_material.nzsl.h>
|
||||
};
|
||||
}
|
||||
@@ -335,7 +335,7 @@ namespace Nz
|
||||
#endif
|
||||
|
||||
if (!shaderModule)
|
||||
shaderModule = ShaderLang::Parse(std::string_view(reinterpret_cast<const char*>(r_shader), sizeof(r_shader)));
|
||||
shaderModule = ShaderLang::Parse(std::string_view(reinterpret_cast<const char*>(r_phongMaterialShader), sizeof(r_phongMaterialShader)));
|
||||
|
||||
auto shader = std::make_shared<UberShader>(ShaderStageType::Fragment | ShaderStageType::Vertex, std::move(shaderModule));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user