Berserk
Public Member Functions | List of all members
RHICommandList Class Referenceabstract

Command list for commands capturing and submission. More...

#include <RHICommandList.hpp>

Inheritance diagram for RHICommandList:
Inheritance graph
[legend]
Collaboration diagram for RHICommandList:
Collaboration graph
[legend]

Public Member Functions

BRK_API ~RHICommandList () override=default
 
virtual BRK_API void UpdateVertexBuffer (const Ref< RHIVertexBuffer > &buffer, uint32 byteOffset, uint32 byteSize, const Ref< Data > &data)=0
 
virtual BRK_API void UpdateIndexBuffer (const Ref< RHIIndexBuffer > &buffer, uint32 byteOffset, uint32 byteSize, const Ref< Data > &data)=0
 
virtual BRK_API void UpdateUniformBuffer (const Ref< RHIUniformBuffer > &buffer, uint32 byteOffset, uint32 byteSize, const Ref< Data > &data)=0
 
virtual BRK_API void UpdateTexture2D (const Ref< RHITexture > &texture, uint32 mipLevel, const Rect2u &region, const Ref< Data > &data)=0
 
virtual BRK_API void UpdateTexture2DArray (const Ref< RHITexture > &texture, uint32 arrayIndex, uint32 mipLevel, const Rect2u &region, const Ref< Data > &data)=0
 
virtual BRK_API void UpdateTextureCube (const Ref< RHITexture > &texture, RHITextureCubemapFace face, uint32 mipLevel, const Rect2u &region, const Ref< Data > &data)=0
 
virtual BRK_API void GenerateMipMaps (const Ref< RHITexture > &texture)=0
 
virtual BRK_API void BeginRenderPass (const Ref< RHIRenderPass > &renderPass, const RHIRenderPassBeginInfo &beginInfo)=0
 
virtual BRK_API void BindGraphicsPipeline (const Ref< RHIGraphicsPipeline > &pipeline)=0
 
virtual BRK_API void BindVertexBuffers (const std::vector< Ref< RHIVertexBuffer >> &buffers)=0
 
virtual BRK_API void BindIndexBuffer (const Ref< RHIIndexBuffer > &buffer, RHIIndexType indexType)=0
 
virtual BRK_API void BindResourceSet (const Ref< RHIResourceSet > &resourceSet, uint32 set)=0
 
virtual BRK_API void Draw (uint32 verticesCount, uint32 baseVertex, uint32 instancesCount)=0
 
virtual BRK_API void DrawIndexed (uint32 indexCount, uint32 baseVertex, uint32 instanceCount)=0
 
virtual BRK_API void EndRenderPass ()=0
 
virtual BRK_API void SwapBuffers (const Ref< Window > &window)=0
 
virtual BRK_API void Submit ()=0
 
- Public Member Functions inherited from RHIResource
BRK_API ~RHIResource () override=default
 
- Public Member Functions inherited from RefCnt
virtual ~RefCnt ()
 
bool IsUnique () const
 
std::int32_t GetRefs () const
 
std::int32_t AddRef () const
 
std::int32_t RelRef () const
 

Additional Inherited Members

- Protected Member Functions inherited from RHIResource
void Destroy () const override
 

Detailed Description

Command list for commands capturing and submission.

Warning
Must be accessed on render thread only

Constructor & Destructor Documentation

◆ ~RHICommandList()

BRK_API RHICommandList::~RHICommandList ( )
overridedefault

Member Function Documentation

◆ BeginRenderPass()

virtual BRK_API void RHICommandList::BeginRenderPass ( const Ref< RHIRenderPass > &  renderPass,
const RHIRenderPassBeginInfo beginInfo 
)
pure virtual

Begin render pass for drawing (must be followed with end call)

Implemented in GLCommandList.

◆ BindGraphicsPipeline()

virtual BRK_API void RHICommandList::BindGraphicsPipeline ( const Ref< RHIGraphicsPipeline > &  pipeline)
pure virtual

Bind compiled graphics pipeline for the rendering (must be called inside render pass)

Implemented in GLCommandList.

◆ BindIndexBuffer()

virtual BRK_API void RHICommandList::BindIndexBuffer ( const Ref< RHIIndexBuffer > &  buffer,
RHIIndexType  indexType 
)
pure virtual

Bind index buffer (must be called inside render pass)

Implemented in GLCommandList.

◆ BindResourceSet()

virtual BRK_API void RHICommandList::BindResourceSet ( const Ref< RHIResourceSet > &  resourceSet,
uint32  set 
)
pure virtual

Bind resource set to specified set index (must be called inside render pass)

Implemented in GLCommandList.

◆ BindVertexBuffers()

virtual BRK_API void RHICommandList::BindVertexBuffers ( const std::vector< Ref< RHIVertexBuffer >> &  buffers)
pure virtual

Bind vertex buffers (must be called inside render pass)

Implemented in GLCommandList.

◆ Draw()

virtual BRK_API void RHICommandList::Draw ( uint32  verticesCount,
uint32  baseVertex,
uint32  instancesCount 
)
pure virtual

Issue draw call for vertex data only

Implemented in GLCommandList.

◆ DrawIndexed()

virtual BRK_API void RHICommandList::DrawIndexed ( uint32  indexCount,
uint32  baseVertex,
uint32  instanceCount 
)
pure virtual

Issue draw call for indexed data rendering only

Implemented in GLCommandList.

◆ EndRenderPass()

virtual BRK_API void RHICommandList::EndRenderPass ( )
pure virtual

End render pass (must be called in the end after begin render pass)

Implemented in GLCommandList.

◆ GenerateMipMaps()

virtual BRK_API void RHICommandList::GenerateMipMaps ( const Ref< RHITexture > &  texture)
pure virtual

Generate mip maps for the texture (2d, 2d array, cube)

Implemented in GLCommandList.

◆ Submit()

virtual BRK_API void RHICommandList::Submit ( )
pure virtual

Submit list for execution

Implemented in GLCommandList.

◆ SwapBuffers()

virtual BRK_API void RHICommandList::SwapBuffers ( const Ref< Window > &  window)
pure virtual

Request buffers swap

Implemented in GLCommandList.

◆ UpdateIndexBuffer()

virtual BRK_API void RHICommandList::UpdateIndexBuffer ( const Ref< RHIIndexBuffer > &  buffer,
uint32  byteOffset,
uint32  byteSize,
const Ref< Data > &  data 
)
pure virtual

Update index buffer with data

Implemented in GLCommandList.

◆ UpdateTexture2D()

virtual BRK_API void RHICommandList::UpdateTexture2D ( const Ref< RHITexture > &  texture,
uint32  mipLevel,
const Rect2u region,
const Ref< Data > &  data 
)
pure virtual

Update chosen region and mip level of 2d texture

Implemented in GLCommandList.

◆ UpdateTexture2DArray()

virtual BRK_API void RHICommandList::UpdateTexture2DArray ( const Ref< RHITexture > &  texture,
uint32  arrayIndex,
uint32  mipLevel,
const Rect2u region,
const Ref< Data > &  data 
)
pure virtual

Update chosen array index, region and mip level of 2d texture array

Implemented in GLCommandList.

◆ UpdateTextureCube()

virtual BRK_API void RHICommandList::UpdateTextureCube ( const Ref< RHITexture > &  texture,
RHITextureCubemapFace  face,
uint32  mipLevel,
const Rect2u region,
const Ref< Data > &  data 
)
pure virtual

Update chosen face, region and mip level of cube texture

Implemented in GLCommandList.

◆ UpdateUniformBuffer()

virtual BRK_API void RHICommandList::UpdateUniformBuffer ( const Ref< RHIUniformBuffer > &  buffer,
uint32  byteOffset,
uint32  byteSize,
const Ref< Data > &  data 
)
pure virtual

Update uniform buffer with data

Implemented in GLCommandList.

◆ UpdateVertexBuffer()

virtual BRK_API void RHICommandList::UpdateVertexBuffer ( const Ref< RHIVertexBuffer > &  buffer,
uint32  byteOffset,
uint32  byteSize,
const Ref< Data > &  data 
)
pure virtual

Update vertex buffer with data

Implemented in GLCommandList.


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