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:
Jérôme Leclercq
2022-05-25 19:36:10 +02:00
committed by GitHub
parent 3f8f1c4653
commit 03e2801dbe
483 changed files with 1139 additions and 59112 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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>

View File

@@ -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

View File

@@ -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));
}

View File

@@ -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' };

View File

@@ -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