LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::Buffer Class Referenceabstract

Hardware buffer interface. More...

#include <Buffer.h>

Inheritance diagram for LLGL::Buffer:
LLGL::Resource LLGL::RenderSystemChild LLGL::Interface LLGL::NonCopyable

Public Member Functions

ResourceType GetResourceType () const override final
 Returns ResourceType::Buffer.
long GetBindFlags () const
 Returns the binding flags this buffer was created with.
virtual BufferDescriptor GetDesc () const =0
 Queries a descriptor of this buffer.
Public Member Functions inherited from LLGL::Resource
virtual bool GetNativeHandle (void *nativeHandle, std::size_t nativeHandleSize)=0
 Returns the native resource handle.
Public Member Functions inherited from LLGL::RenderSystemChild
virtual void SetDebugName (const char *name)
 Sets the name of this class instance for debugging purposes.
Public Member Functions inherited from LLGL::Interface
virtual bool IsInstanceOf (int id) const
 Returns true if this object is an instance of the specified interface.
Public Member Functions inherited from LLGL::NonCopyable
 NonCopyable (const NonCopyable &)=delete
NonCopyable & operator= (const NonCopyable &)=delete
virtual ~NonCopyable ()=default

Protected Member Functions

 Buffer (long bindFlags)
Protected Member Functions inherited from LLGL::NonCopyable
 NonCopyable ()=default

Detailed Description

Hardware buffer interface.

See also
RenderSystem::CreateBuffer

Constructor & Destructor Documentation

◆ Buffer()

LLGL::Buffer::Buffer ( long bindFlags)
protected

Member Function Documentation

◆ GetBindFlags()

long LLGL::Buffer::GetBindFlags ( ) const
inline

Returns the binding flags this buffer was created with.

See also
BufferDescriptor::bindFlags

◆ GetDesc()

virtual BufferDescriptor LLGL::Buffer::GetDesc ( ) const
pure virtual

Queries a descriptor of this buffer.

Remarks
This function only queries the following attributes:
  • size
  • bindFlags
  • cpuAccessFlags
  • miscFlags
All other attributes (such as vertexAttribs etc.) cannot be queried by this function. Those attributes are set to the default value specified in BufferDescriptor.
The returned flags (such as cpuAccessFlags etc.) are not necessarily the same that were specified when the resource was created. They reflect the capabilities of the actual hardware buffer. For example, a buffer created with CPUAccessFlags::Read might return CPUAccessFlags::ReadWrite, if the renderer backend does not distinguish between different CPU access flags.
See also
BufferDescriptor
Texture::GetDesc

◆ GetResourceType()

ResourceType LLGL::Buffer::GetResourceType ( ) const
finaloverridevirtual

Returns ResourceType::Buffer.

Implements LLGL::Resource.


The documentation for this class was generated from the following file: