Utility/Buffer: Refactor Buffer classes
This commit is contained in:
@@ -7,6 +7,41 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
inline AbstractBuffer* Buffer::GetImpl() const
|
||||
{
|
||||
return m_impl.get();
|
||||
}
|
||||
|
||||
inline UInt32 Buffer::GetSize() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
inline DataStorage Buffer::GetStorage() const
|
||||
{
|
||||
return m_impl->GetStorage();
|
||||
}
|
||||
|
||||
inline BufferType Buffer::GetType() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
|
||||
inline BufferUsageFlags Buffer::GetUsage() const
|
||||
{
|
||||
return m_usage;
|
||||
}
|
||||
|
||||
inline bool Buffer::HasStorage(DataStorage storage) const
|
||||
{
|
||||
return GetStorage() == storage;
|
||||
}
|
||||
|
||||
inline bool Buffer::IsValid() const
|
||||
{
|
||||
return m_impl != nullptr;
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
BufferRef Buffer::New(Args&&... args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user