Berserk
Public Member Functions | List of all members
GLCommandList Class Referencefinal

GL command list implementation (wrapper for context) More...

#include <GLCommandList.hpp>

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

Public Member Functions

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

GL command list implementation (wrapper for context)

Constructor & Destructor Documentation

◆ GLCommandList()

BRK_API GLCommandList::GLCommandList ( )
default

◆ ~GLCommandList()

BRK_API GLCommandList::~GLCommandList ( )
overridedefault

Member Function Documentation

◆ BeginRenderPass()

void GLCommandList::BeginRenderPass ( const Ref< RHIRenderPass > &  renderPass,
const RHIRenderPassBeginInfo beginInfo 
)
overridevirtual

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

Implements RHICommandList.

◆ BindGraphicsPipeline()

void GLCommandList::BindGraphicsPipeline ( const Ref< RHIGraphicsPipeline > &  pipeline)
overridevirtual

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

Implements RHICommandList.

◆ BindIndexBuffer()

void GLCommandList::BindIndexBuffer ( const Ref< RHIIndexBuffer > &  buffer,
RHIIndexType  indexType 
)
overridevirtual

Bind index buffer (must be called inside render pass)

Implements RHICommandList.

◆ BindResourceSet()

void GLCommandList::BindResourceSet ( const Ref< RHIResourceSet > &  resourceSet,
uint32  set 
)
overridevirtual

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

Implements RHICommandList.

◆ BindVertexBuffers()

void GLCommandList::BindVertexBuffers ( const std::vector< Ref< RHIVertexBuffer >> &  buffers)
overridevirtual

Bind vertex buffers (must be called inside render pass)

Implements RHICommandList.

◆ Draw()

void GLCommandList::Draw ( uint32  verticesCount,
uint32  baseVertex,
uint32  instancesCount 
)
overridevirtual

Issue draw call for vertex data only

Implements RHICommandList.

◆ DrawIndexed()

void GLCommandList::DrawIndexed ( uint32  indexCount,
uint32  baseVertex,
uint32  instanceCount 
)
overridevirtual

Issue draw call for indexed data rendering only

Implements RHICommandList.

◆ EndRenderPass()

void GLCommandList::EndRenderPass ( )
overridevirtual

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

Implements RHICommandList.

◆ GenerateMipMaps()

void GLCommandList::GenerateMipMaps ( const Ref< RHITexture > &  texture)
overridevirtual

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

Implements RHICommandList.

◆ Submit()

void GLCommandList::Submit ( )
overridevirtual

Submit list for execution

Implements RHICommandList.

◆ SwapBuffers()

void GLCommandList::SwapBuffers ( const Ref< Window > &  window)
overridevirtual

Request buffers swap

Implements RHICommandList.

◆ UpdateIndexBuffer()

void GLCommandList::UpdateIndexBuffer ( const Ref< RHIIndexBuffer > &  buffer,
uint32  byteOffset,
uint32  byteSize,
const Ref< Data > &  data 
)
overridevirtual

Update index buffer with data

Implements RHICommandList.

◆ UpdateTexture2D()

void GLCommandList::UpdateTexture2D ( const Ref< RHITexture > &  texture,
uint32  mipLevel,
const Rect2u region,
const Ref< Data > &  data 
)
overridevirtual

Update chosen region and mip level of 2d texture

Implements RHICommandList.

◆ UpdateTexture2DArray()

void GLCommandList::UpdateTexture2DArray ( const Ref< RHITexture > &  texture,
uint32  arrayIndex,
uint32  mipLevel,
const Rect2u region,
const Ref< Data > &  data 
)
overridevirtual

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

Implements RHICommandList.

◆ UpdateTextureCube()

void GLCommandList::UpdateTextureCube ( const Ref< RHITexture > &  texture,
RHITextureCubemapFace  face,
uint32  mipLevel,
const Rect2u region,
const Ref< Data > &  data 
)
overridevirtual

Update chosen face, region and mip level of cube texture

Implements RHICommandList.

◆ UpdateUniformBuffer()

void GLCommandList::UpdateUniformBuffer ( const Ref< RHIUniformBuffer > &  buffer,
uint32  byteOffset,
uint32  byteSize,
const Ref< Data > &  data 
)
overridevirtual

Update uniform buffer with data

Implements RHICommandList.

◆ UpdateVertexBuffer()

void GLCommandList::UpdateVertexBuffer ( const Ref< RHIVertexBuffer > &  buffer,
uint32  byteOffset,
uint32  byteSize,
const Ref< Data > &  data 
)
overridevirtual

Update vertex buffer with data

Implements RHICommandList.


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