Cogs.Core
Public Member Functions | List of all members
Cogs::BuffersCommon Struct Reference
Inheritance diagram for Cogs::BuffersCommon:
Cogs::IBuffers Cogs::BuffersD3D11 Cogs::BuffersD3D12 Cogs::BuffersGL20 Cogs::BuffersGLES30 Cogs::BuffersNull Cogs::BuffersVK Cogs::BuffersWebGPU

Public Member Functions

virtual VertexFormatHandle createVertexFormat (const VertexElement *elements, size_t count) override
 
virtual const VertexFormatgetVertexFormat (VertexFormatHandle handle) override
 
virtual VertexArrayObjectHandle loadVertexArrayObject (const EffectHandle effectHandle, const VertexBufferHandle *vertexBufferHandles, const size_t vertexBufferCount, const VertexFormat *const *vertexFormats=nullptr, const uint32_t *vertexBufferStrides=nullptr, const uint32_t *vertexBufferOffsets=nullptr, const IndexBufferHandle indexBufferHandle=IndexBufferHandle::NoHandle, uint32_t indexBufferStride=0) override
 
virtual void releaseVertexArrayObject (VertexArrayObjectHandle) override
 
- Public Member Functions inherited from Cogs::IBuffers
virtual void annotate (BufferHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual void annotate (VertexBufferHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual VertexBufferHandle loadVertexBuffer (const void *vertexData, const size_t count, const VertexFormat &vertexFormat)=0
 Loads a new vertex buffer and populates it with the given data.
 
virtual VertexBufferHandle loadVertexBuffer (const void *vertexData, const size_t count, VertexFormatHandle vertexFormatHandle)=0
 
virtual void releaseVertexBuffer (VertexBufferHandle vertexBufferHandle)=0
 Release the vertex buffer with the given handle.
 
virtual IndexBufferHandle loadIndexBuffer (const void *indexData, const size_t count, const size_t indexSize)=0
 Loads a new index buffer and populates it with the given indexData.
 
virtual void releaseIndexBuffer (IndexBufferHandle indexBufferHandle)=0
 Releases the index buffer with the given handle.
 
virtual VertexArrayObjectHandle loadVertexArrayObject (const EffectHandle effectHandle, const VertexBufferHandle *vertexBufferHandles, const size_t vertexBufferCount, const VertexFormat *const *vertexFormats=nullptr, const uint32_t *vertexBufferStrides=nullptr, const uint32_t *vertexBufferOffsets=nullptr, const IndexBufferHandle indexBufferHandle=IndexBufferHandle::NoHandle, uint32_t indexBufferStride=0)=0
 Create a vertex array object that encapsulates binding of a set of vertex buffers and an optional index buffer.
 
virtual void releaseVertexArrayObject (VertexArrayObjectHandle vertexArrayObjectHandle)=0
 Releases the vertex array object with the given handle.
 
virtual InputLayoutHandle loadInputLayout (const VertexFormatHandle *vertexFormats, const size_t count, EffectHandle effectHandle)=0
 Loads a new input layout to map vertex flow between vertex buffers with the given vertexFormats to effects using the vertex layout of the given effectHandle.
 
virtual void releaseInputLayout (InputLayoutHandle inputLayoutHandle)=0
 Releases the input layout with the given inputLayoutHandle.
 
virtual BufferHandle loadBuffer (const void *data, const size_t size, Usage::EUsage usage, uint32_t accessMode, uint32_t bindFlags, uint32_t stride=0)=0
 Loads a new buffer using the given data to populate the buffer.
 
virtual VertexFormatHandle createVertexFormat (const VertexElement *elements, size_t count)=0
 
virtual const VertexFormatgetVertexFormat (VertexFormatHandle handle)=0
 
virtual void retrieveSubBuffer (void *data, BufferHandle source, const size_t offset, const size_t size)=0
 Retrieves the contents of a buffer.
 
virtual void releaseBuffer (BufferHandle bufferHandle)=0
 Releases the buffer with the given bufferHandle.
 
virtual void * getNativeHandle (BufferHandle bufferHandle)=0
 Get the device-specific handle (D3D buffer pointer, OpenGL buffer ID etc) associated with the given buffer handle.
 
virtual void releaseResources ()=0
 Releases all allocated buffer resources.
 

Detailed Description

Definition at line 7 of file BuffersCommon.h.

Member Function Documentation

◆ createVertexFormat()

Cogs::VertexFormatHandle Cogs::BuffersCommon::createVertexFormat ( const VertexElement elements,
size_t  count 
)
overridevirtual

Implements Cogs::IBuffers.

Definition at line 10 of file BuffersCommon.cpp.

◆ getVertexFormat()

const Cogs::VertexFormat * Cogs::BuffersCommon::getVertexFormat ( VertexFormatHandle  handle)
overridevirtual

Implements Cogs::IBuffers.

Definition at line 15 of file BuffersCommon.cpp.

◆ loadVertexArrayObject()

Cogs::VertexArrayObjectHandle Cogs::BuffersCommon::loadVertexArrayObject ( const EffectHandle  effectHandle,
const VertexBufferHandle vertexBufferHandles,
const size_t  vertexBufferCount,
const VertexFormat *const *  vertexFormats = nullptr,
const uint32_t *  vertexBufferStrides = nullptr,
const uint32_t *  vertexBufferOffsets = nullptr,
const IndexBufferHandle  indexBufferHandle = IndexBufferHandle::NoHandle,
uint32_t  indexBufferStride = 0 
)
overridevirtual

Logs an unsupported error, override to provide support.

Implements Cogs::IBuffers.

Reimplemented in Cogs::BuffersGLES30.

Definition at line 20 of file BuffersCommon.cpp.

References Cogs::Handle_t< VertexArrayObjectTag >::InvalidHandle.

◆ releaseVertexArrayObject()

void Cogs::BuffersCommon::releaseVertexArrayObject ( VertexArrayObjectHandle  )
overridevirtual

Logs an unsupported error, override to provide support.

Implements Cogs::IBuffers.

Reimplemented in Cogs::BuffersGLES30.

Definition at line 29 of file BuffersCommon.cpp.


The documentation for this struct was generated from the following files: