CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUIndexBuffer Class Reference

#include <CeresEngine/RenderAPI/GPUBufferObject.hpp>

Inheritance diagram for CeresEngine::GPUIndexBuffer:
CeresEngine::GPUBufferObject

Public Member Functions

 GPUIndexBuffer ()=default
 Creates a new empty IndexBuffer.
 
 GPUIndexBuffer (GPUBufferPtr buffer, GPUBufferSize offset=0, IndexType indexType=IndexType::UInt32, GPUBufferSize length=GPUBuffer::whole)
 Creates a new IndexBuffer from an existing GPU buffer.
 
 GPUIndexBuffer (GPUBuffer &buffer, const GPUBufferSize offset=0, const IndexType indexType=IndexType::UInt32, const GPUBufferSize length=GPUBuffer::whole)
 
 GPUIndexBuffer (GPUDevice &device, GPUBufferSize size, IndexType indexType=IndexType::UInt32, const GPUMemoryProperties &memoryProperty=GPUMemoryProperty::DeviceLocal, String name="")
 Creates a new IndexBuffer.
 
 GPUIndexBuffer (std::nullptr_t)
 Creates a new empty IndexBuffer.
 
 GPUIndexBuffer (const GPUIndexBuffer &)=default
 Creates a new IndexBuffer by copying another.
 
GPUIndexBufferoperator= (const GPUIndexBuffer &)=default
 Assigns the IndexBuffer by copying another.
 
 GPUIndexBuffer (GPUIndexBuffer &&)=default
 Creates a new IndexBuffer by moving another.
 
GPUIndexBufferoperator= (GPUIndexBuffer &&)=default
 Assigns a IndexBuffer by moving another.
 
 ~GPUIndexBuffer ()
 Destroys the IndexBuffer.
 
IndexType getIndexType () const noexcept
 
- Public Member Functions inherited from CeresEngine::GPUBufferObject
 GPUBufferObject ()=default
 Creates a new empty BufferObject.
 
 GPUBufferObject (GPUBufferPtr buffer, GPUBufferSize offset=0, GPUBufferSize length=GPUBuffer::whole)
 Creates a new BufferObject from an existing GPU buffer.
 
 GPUBufferObject (GPUBuffer &buffer, const GPUBufferSize offset=0, const GPUBufferSize length=GPUBuffer::whole)
 
 GPUBufferObject (GPUDevice &device, const GPUBufferDescriptor &descriptor)
 Creates a new BufferObject.
 
 GPUBufferObject (std::nullptr_t)
 Creates a new empty BufferObject.
 
GPUBufferObjectoperator= (std::nullptr_t)
 Assigns the BufferObject an empty value.
 
 GPUBufferObject (const GPUBufferObject &)=default
 Creates a new BufferObject by copying another.
 
GPUBufferObjectoperator= (const GPUBufferObject &)=default
 Assigns the BufferObject by copying another.
 
 GPUBufferObject (GPUBufferObject &&)=default
 Creates a new BufferObject by moving another.
 
GPUBufferObjectoperator= (GPUBufferObject &&)=default
 Assigns a BufferObject by moving another.
 
 ~GPUBufferObject ()
 Destroys the BufferObject.
 
void flush (GPUBufferSize offset=0, GPUBufferSize size=GPUBuffer::whole)
 Flushes the cached memory data starting at offset with size bytes.
 
void invalidate (GPUBufferSize offset=0, GPUBufferSize size=GPUBuffer::whole)
 Invalidates the cached memory data starting at offset with size bytes.
 
GPUBufferPtr getBuffer () const noexcept
 
GPUBufferSize getOffset () const noexcept
 
GPUBufferSize getLength () const noexcept
 
 operator bool () const noexcept
 

Private Attributes

IndexType mIndexType = IndexType::UInt32
 The index type to be used when rendering.
 

Additional Inherited Members

- Protected Attributes inherited from CeresEngine::GPUBufferObject
GPUBufferPtr mBuffer = nullptr
 A pointer to the GPU allocated buffer.
 
GPUBufferSize mOffset = 0
 The offset to the beginning of the buffer object data.
 
GPUBufferSize mLength = GPUBuffer::whole
 The length of the buffer data.
 

Constructor & Destructor Documentation

◆ GPUIndexBuffer() [1/7]

CeresEngine::GPUIndexBuffer::GPUIndexBuffer ( )
default

Creates a new empty IndexBuffer.

◆ GPUIndexBuffer() [2/7]

CeresEngine::GPUIndexBuffer::GPUIndexBuffer ( GPUBufferPtr  buffer,
GPUBufferSize  offset = 0,
IndexType  indexType = IndexType::UInt32,
GPUBufferSize  length = GPUBuffer::whole 
)
explicit

Creates a new IndexBuffer from an existing GPU buffer.

Parameters
bufferThe existing GPU buffer
offsetThe offset to the beginning of the index buffer
indexTypeThe index type to be used when rendering

◆ GPUIndexBuffer() [3/7]

CeresEngine::GPUIndexBuffer::GPUIndexBuffer ( GPUBuffer buffer,
const GPUBufferSize  offset = 0,
const IndexType  indexType = IndexType::UInt32,
const GPUBufferSize  length = GPUBuffer::whole 
)
inlineexplicit

◆ GPUIndexBuffer() [4/7]

CeresEngine::GPUIndexBuffer::GPUIndexBuffer ( GPUDevice device,
GPUBufferSize  size,
IndexType  indexType = IndexType::UInt32,
const GPUMemoryProperties memoryProperty = GPUMemoryProperty::DeviceLocal,
String  name = "" 
)
explicit

Creates a new IndexBuffer.

Parameters
deviceThe device to create the buffer from
sizeThe buffer size in bytes
indexTypeThe index type to be used when rendering
memoryPropertyThe memory property flags
nameThe buffer name (used for debugging only).

◆ GPUIndexBuffer() [5/7]

CeresEngine::GPUIndexBuffer::GPUIndexBuffer ( std::nullptr_t  )
inline

Creates a new empty IndexBuffer.

◆ GPUIndexBuffer() [6/7]

CeresEngine::GPUIndexBuffer::GPUIndexBuffer ( const GPUIndexBuffer )
default

Creates a new IndexBuffer by copying another.

The contents of the buffer are not copied.

◆ GPUIndexBuffer() [7/7]

CeresEngine::GPUIndexBuffer::GPUIndexBuffer ( GPUIndexBuffer &&  )
default

Creates a new IndexBuffer by moving another.

◆ ~GPUIndexBuffer()

CeresEngine::GPUIndexBuffer::~GPUIndexBuffer ( )

Destroys the IndexBuffer.

Member Function Documentation

◆ getIndexType()

IndexType CeresEngine::GPUIndexBuffer::getIndexType ( ) const
inlinenoexcept
Returns
The index type to be used when rendering.

◆ operator=() [1/2]

GPUIndexBuffer & CeresEngine::GPUIndexBuffer::operator= ( const GPUIndexBuffer )
default

Assigns the IndexBuffer by copying another.

The contents of the buffer are not copied.

◆ operator=() [2/2]

GPUIndexBuffer & CeresEngine::GPUIndexBuffer::operator= ( GPUIndexBuffer &&  )
default

Assigns a IndexBuffer by moving another.

Member Data Documentation

◆ mIndexType

IndexType CeresEngine::GPUIndexBuffer::mIndexType = IndexType::UInt32
private

The index type to be used when rendering.


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