Fix some compilation errors
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
static_assert(std::is_same_v<std::size_t, UInt32> || std::is_same_v<std::size_t, UInt64>);
|
||||
|
||||
class NAZARA_SHADER_API ShaderAstSerializerBase
|
||||
{
|
||||
public:
|
||||
@@ -67,7 +69,7 @@ namespace Nz
|
||||
virtual void Value(UInt8& val) = 0;
|
||||
virtual void Value(UInt16& val) = 0;
|
||||
virtual void Value(UInt32& val) = 0;
|
||||
inline void Value(std::size_t& val);
|
||||
virtual void Value(UInt64& val) = 0;
|
||||
|
||||
virtual void Variable(ShaderNodes::VariablePtr& var) = 0;
|
||||
template<typename T> void Variable(std::shared_ptr<T>& var);
|
||||
@@ -99,6 +101,7 @@ namespace Nz
|
||||
void Value(UInt8& val) override;
|
||||
void Value(UInt16& val) override;
|
||||
void Value(UInt32& val) override;
|
||||
void Value(UInt64& val) override;
|
||||
void Variable(ShaderNodes::VariablePtr& var) override;
|
||||
|
||||
ByteStream& m_stream;
|
||||
@@ -129,6 +132,7 @@ namespace Nz
|
||||
void Value(UInt8& val) override;
|
||||
void Value(UInt16& val) override;
|
||||
void Value(UInt32& val) override;
|
||||
void Value(UInt64& val) override;
|
||||
void Variable(ShaderNodes::VariablePtr& var) override;
|
||||
|
||||
ByteStream& m_stream;
|
||||
|
||||
@@ -100,19 +100,6 @@ namespace Nz
|
||||
var = std::static_pointer_cast<T>(value);
|
||||
}
|
||||
|
||||
inline void ShaderAstSerializerBase::Value(std::size_t& val)
|
||||
{
|
||||
bool isWriting = IsWriting();
|
||||
|
||||
UInt32 value;
|
||||
if (isWriting)
|
||||
value = static_cast<UInt32>(val);
|
||||
|
||||
Value(value);
|
||||
if (!isWriting)
|
||||
val = static_cast<std::size_t>(value);
|
||||
}
|
||||
|
||||
inline ShaderAstSerializer::ShaderAstSerializer(ByteStream& stream) :
|
||||
m_stream(stream)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Nz
|
||||
bool Initialize(UInt64 size, BufferUsageFlags usage) override;
|
||||
|
||||
const UInt8* GetData() const;
|
||||
UInt64 GetSize() const;
|
||||
UInt64 GetSize() const override;
|
||||
DataStorage GetStorage() const override;
|
||||
|
||||
void* Map(BufferAccess access, UInt64 offset = 0, UInt64 size = 0) override;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Nz
|
||||
|
||||
VertexDeclaration(VertexInputRate inputRate, std::initializer_list<ComponentEntry> components);
|
||||
VertexDeclaration(const VertexDeclaration&) = delete;
|
||||
VertexDeclaration(VertexDeclaration&&) noexcept = default;
|
||||
VertexDeclaration(VertexDeclaration&&) = default;
|
||||
~VertexDeclaration() = default;
|
||||
|
||||
inline const Component* FindComponent(VertexComponent vertexComponent, std::size_t componentIndex) const;
|
||||
@@ -51,7 +51,7 @@ namespace Nz
|
||||
template<typename T> bool HasComponentOfType(VertexComponent vertexComponent, std::size_t componentIndex = 0) const;
|
||||
|
||||
VertexDeclaration& operator=(const VertexDeclaration&) = delete;
|
||||
VertexDeclaration& operator=(VertexDeclaration&&) noexcept = default;
|
||||
VertexDeclaration& operator=(VertexDeclaration&&) = default;
|
||||
|
||||
static inline const VertexDeclarationRef& Get(VertexLayout layout);
|
||||
static bool IsTypeSupported(ComponentType type);
|
||||
|
||||
Reference in New Issue
Block a user