Upgrade Utility

This commit is contained in:
Jérôme Leclercq
2021-05-24 19:10:53 +02:00
parent b936946154
commit cce32a64d4
120 changed files with 2328 additions and 2971 deletions

View File

@@ -2,12 +2,13 @@
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Utility/VertexBuffer.hpp>
#include <memory>
#include <Nazara/Utility/Debug.hpp>
namespace Nz
{
inline const BufferRef& VertexBuffer::GetBuffer() const
inline const std::shared_ptr<Buffer>& VertexBuffer::GetBuffer() const
{
return m_buffer;
}
@@ -32,23 +33,14 @@ namespace Nz
return m_vertexCount;
}
inline const VertexDeclarationConstRef& VertexBuffer::GetVertexDeclaration() const
inline const std::shared_ptr<const VertexDeclaration>& VertexBuffer::GetVertexDeclaration() const
{
return m_vertexDeclaration;
}
inline bool VertexBuffer::IsValid() const
{
return m_buffer.IsValid() && m_vertexDeclaration.IsValid();
}
template<typename... Args>
VertexBufferRef VertexBuffer::New(Args&&... args)
{
std::unique_ptr<VertexBuffer> object(new VertexBuffer(std::forward<Args>(args)...));
object->SetPersistent(false);
return object.release();
return m_buffer && m_vertexDeclaration;
}
}