Merge branch 'nazara-next' into graphics-next
This commit is contained in:
@@ -333,7 +333,7 @@ void BufferField::PopulateFieldList(std::size_t structIndex, const std::string&
|
||||
else if constexpr (std::is_same_v<T, std::size_t>)
|
||||
PopulateFieldList(arg, prefix + member.name + ".");
|
||||
else
|
||||
static_assert(AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
static_assert(Nz::AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
},
|
||||
member.type);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <Nazara/Shader/ShaderBuilder.hpp>
|
||||
#include <QtWidgets/QDoubleSpinBox>
|
||||
#include <QtWidgets/QFormLayout>
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <stdexcept>
|
||||
|
||||
template<std::size_t ToComponentCount>
|
||||
|
||||
@@ -48,7 +48,7 @@ struct VecExpressionTypeHelper<4>
|
||||
static constexpr Nz::ShaderNodes::BasicType ExpressionType = Nz::ShaderNodes::BasicType::Float4;
|
||||
};
|
||||
|
||||
template<std::size_t N> constexpr Nz::ShaderNodes::BasicType VecExpressionType = VecExpressionTypeHelper<N>::template ExpressionType;
|
||||
template<std::size_t N> constexpr Nz::ShaderNodes::BasicType VecExpressionType = VecExpressionTypeHelper<N>::ExpressionType;
|
||||
|
||||
|
||||
struct VecTypeDummy {};
|
||||
@@ -86,7 +86,7 @@ struct VecTypeHelper<4>
|
||||
using Type = Nz::Vector4f;
|
||||
};
|
||||
|
||||
template<std::size_t N> using VecType = typename VecTypeHelper<N>::template Type;
|
||||
template<std::size_t N> using VecType = typename VecTypeHelper<N>::Type;
|
||||
|
||||
constexpr std::array<char, 4> s_vectorComponents = { 'X', 'Y', 'Z', 'W' };
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ void ShaderGraph::Load(const QJsonObject& data)
|
||||
if (typeDocRef.isString())
|
||||
memberInfo.type = DecodeEnum<PrimitiveType>(typeDocRef.toString().toStdString()).value();
|
||||
else
|
||||
memberInfo.type = typeDocRef.toInt();
|
||||
memberInfo.type = static_cast<std::size_t>(typeDocRef.toInt());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ QJsonObject ShaderGraph::Save()
|
||||
else if constexpr (std::is_same_v<T, std::size_t>)
|
||||
memberDoc["type"] = int(arg);
|
||||
else
|
||||
static_assert(AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
static_assert(Nz::AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
}, member.type);
|
||||
|
||||
memberArray.append(std::move(memberDoc));
|
||||
@@ -651,7 +651,7 @@ Nz::ShaderExpressionType ShaderGraph::ToShaderExpressionType(const std::variant<
|
||||
return s.name;
|
||||
}
|
||||
else
|
||||
static_assert(AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
static_assert(Nz::AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
}, type);
|
||||
};
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ QString StructEditDialog::GetMemberName(const StructInfo::Member& member)
|
||||
else if constexpr (std::is_same_v<T, std::size_t>)
|
||||
name += QString::fromStdString(m_shaderGraph.GetStruct(arg).name);
|
||||
else
|
||||
static_assert(AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
static_assert(Nz::AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
},
|
||||
member.type);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ StructMemberEditDialog(shaderGraph, parent)
|
||||
else if constexpr (std::is_same_v<T, std::size_t>)
|
||||
m_typeList->setCurrentIndex(static_cast<int>(PrimitiveTypeCount + arg));
|
||||
else
|
||||
static_assert(AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
static_assert(Nz::AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
},
|
||||
member.type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user