Berserk
Classes | Public Member Functions | List of all members
RHIResourceSetDesc Class Reference

Describes single set of GPU resource for shader. More...

#include <RHIResourceSet.hpp>

Classes

struct  BufferBinding
 
struct  SamplerBinding
 
struct  TextureBinding
 

Public Member Functions

BRK_API RHIResourceSetDesc ()=default
 
BRK_API ~RHIResourceSetDesc ()=default
 
BRK_API void AddTexture (Ref< RHITexture > texture, uint32 location, uint32 arrayIndex=0)
 
BRK_API void AddSampler (Ref< RHISampler > sampler, uint32 location, uint32 arrayIndex=0)
 
BRK_API void AddBuffer (Ref< RHIUniformBuffer > buffer, uint32 location, uint32 offset, uint32 range)
 
BRK_API bool SetTexture (Ref< RHITexture > texture, uint32 location, uint32 arrayIndex=0)
 
BRK_API bool SetSampler (Ref< RHISampler > sampler, uint32 location, uint32 arrayIndex=0)
 
BRK_API bool SetBuffer (Ref< RHIUniformBuffer > buffer, uint32 location, uint32 offset, uint32 range)
 
BRK_API void Clear ()
 
BRK_API const std::vector< TextureBinding > & GetTextures () const
 
BRK_API const std::vector< SamplerBinding > & GetSamplers () const
 
BRK_API const std::vector< BufferBinding > & GetBuffers () const
 

Detailed Description

Describes single set of GPU resource for shader.

Constructor & Destructor Documentation

◆ RHIResourceSetDesc()

BRK_API RHIResourceSetDesc::RHIResourceSetDesc ( )
default

◆ ~RHIResourceSetDesc()

BRK_API RHIResourceSetDesc::~RHIResourceSetDesc ( )
default

Member Function Documentation

◆ AddBuffer()

void RHIResourceSetDesc::AddBuffer ( Ref< RHIUniformBuffer buffer,
uint32  location,
uint32  offset,
uint32  range 
)

Add buffer binding to the set

◆ AddSampler()

void RHIResourceSetDesc::AddSampler ( Ref< RHISampler sampler,
uint32  location,
uint32  arrayIndex = 0 
)

Add sampler binding to the set

◆ AddTexture()

BRK_NS_BEGIN void RHIResourceSetDesc::AddTexture ( Ref< RHITexture texture,
uint32  location,
uint32  arrayIndex = 0 
)

Add texture binding to the set

◆ Clear()

void RHIResourceSetDesc::Clear ( )

Clear all bindings

◆ GetBuffers()

BRK_API const std::vector<BufferBinding>& RHIResourceSetDesc::GetBuffers ( ) const
inline
Returns
Buffer bindings

◆ GetSamplers()

BRK_API const std::vector<SamplerBinding>& RHIResourceSetDesc::GetSamplers ( ) const
inline
Returns
Sampler bindings

◆ GetTextures()

BRK_API const std::vector<TextureBinding>& RHIResourceSetDesc::GetTextures ( ) const
inline
Returns
Texture bindings

◆ SetBuffer()

bool RHIResourceSetDesc::SetBuffer ( Ref< RHIUniformBuffer buffer,
uint32  location,
uint32  offset,
uint32  range 
)

Update (or add new) previously set buffer binding in the set

◆ SetSampler()

bool RHIResourceSetDesc::SetSampler ( Ref< RHISampler sampler,
uint32  location,
uint32  arrayIndex = 0 
)

Update (or add new) previously set sampler binding in the set

◆ SetTexture()

bool RHIResourceSetDesc::SetTexture ( Ref< RHITexture texture,
uint32  location,
uint32  arrayIndex = 0 
)

Update (or add new) previously set texture binding in the set


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