Split engine to packages NazaraUtils and NZSL (#375)
* Move code to NazaraUtils and NZSL packages
* Reorder includes
* Tests: Remove glslang and spirv-tools deps
* Tests: Remove glslang init
* Remove NazaraUtils tests and fix Vector4Test
* Fix Linux compilation
* Update msys2-build.yml
* Fix assimp package
* Update xmake.lua
* Update xmake.lua
* Fix shader compilation on MinGW
* Final fixes
* The final fix 2: the fix strikes back!
* Disable cache on CI
* The return of the fix™️
This commit is contained in:
@@ -3,5 +3,5 @@
|
||||
inline BoolData::BoolData() :
|
||||
preview(1, 1)
|
||||
{
|
||||
preview(0, 0) = Nz::Vector4f(1.f, 1.f, 1.f, 0.f);
|
||||
preview(0, 0) = nzsl::Vector4f(1.f, 1.f, 1.f, 0.f);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
inline FloatData::FloatData() :
|
||||
preview(1, 1)
|
||||
{
|
||||
preview(0, 0) = Nz::Vector4f(1.f, 1.f, 1.f, 0.f);
|
||||
preview(0, 0) = nzsl::Vector4f(1.f, 1.f, 1.f, 0.f);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifndef NAZARA_SHADERNODES_MATRIXDATA_HPP
|
||||
#define NAZARA_SHADERNODES_MATRIXDATA_HPP
|
||||
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
#include <NZSL/Ast/Nodes.hpp>
|
||||
#include <ShaderNode/Previews/PreviewValues.hpp>
|
||||
#include <nodes/NodeData>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define NAZARA_SHADERNODES_TEXTUREDATA_HPP
|
||||
|
||||
#include <ShaderNode/Previews/PreviewValues.hpp>
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
#include <NZSL/Ast/Nodes.hpp>
|
||||
#include <nodes/NodeData>
|
||||
|
||||
struct TextureData : public QtNodes::NodeData
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
inline TextureData::TextureData() :
|
||||
preview(64, 64)
|
||||
{
|
||||
preview.Fill(Nz::Vector4f(1.f, 1.f, 1.f, 0.f));
|
||||
preview.Fill(nzsl::Vector4f(1.f, 1.f, 1.f, 0.f));
|
||||
}
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
#ifndef NAZARA_SHADERNODES_VECDATA_HPP
|
||||
#define NAZARA_SHADERNODES_VECDATA_HPP
|
||||
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
#include <Nazara/Math/Vector2.hpp>
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
#include <Nazara/Math/Vector4.hpp>
|
||||
#include <ShaderNode/Previews/PreviewValues.hpp>
|
||||
#include <NZSL/Ast/Nodes.hpp>
|
||||
#include <nodes/NodeData>
|
||||
|
||||
struct VecData : public QtNodes::NodeData
|
||||
@@ -19,43 +22,7 @@ struct VecData : public QtNodes::NodeData
|
||||
PreviewValues preview;
|
||||
};
|
||||
|
||||
|
||||
struct VecTypeDummy {};
|
||||
|
||||
template<std::size_t N>
|
||||
struct VecTypeHelper;
|
||||
|
||||
template<>
|
||||
struct VecTypeHelper<0>
|
||||
{
|
||||
using Type = VecTypeDummy;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct VecTypeHelper<1>
|
||||
{
|
||||
using Type = std::array<float, 1>; //< To allow [0]
|
||||
};
|
||||
|
||||
template<>
|
||||
struct VecTypeHelper<2>
|
||||
{
|
||||
using Type = Nz::Vector2f;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct VecTypeHelper<3>
|
||||
{
|
||||
using Type = Nz::Vector3f;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct VecTypeHelper<4>
|
||||
{
|
||||
using Type = Nz::Vector4f;
|
||||
};
|
||||
|
||||
template<std::size_t N> using VecType = typename VecTypeHelper<N>::Type;
|
||||
template<std::size_t N> using VecType = nzsl::Vector<float, N>;
|
||||
|
||||
constexpr std::array<char, 4> s_vectorComponents = { 'X', 'Y', 'Z', 'W' };
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ inline VecData::VecData(std::size_t ComponentCount) :
|
||||
componentCount(ComponentCount),
|
||||
preview(64, 64)
|
||||
{
|
||||
preview.Fill(Nz::Vector4f(1.f, 1.f, 1.f, 0.f));
|
||||
preview.Fill(nzsl::Vector4f(1.f, 1.f, 1.f, 0.f));
|
||||
}
|
||||
|
||||
inline QtNodes::NodeDataType VecData::type() const
|
||||
|
||||
Reference in New Issue
Block a user