Upgrade Utility
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user