Berserk
|
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 |
Describes single set of GPU resource for shader.
|
default |
|
default |
void RHIResourceSetDesc::AddBuffer | ( | Ref< RHIUniformBuffer > | buffer, |
uint32 | location, | ||
uint32 | offset, | ||
uint32 | range | ||
) |
Add buffer binding to the set
void RHIResourceSetDesc::AddSampler | ( | Ref< RHISampler > | sampler, |
uint32 | location, | ||
uint32 | arrayIndex = 0 |
||
) |
Add sampler binding to the set
BRK_NS_BEGIN void RHIResourceSetDesc::AddTexture | ( | Ref< RHITexture > | texture, |
uint32 | location, | ||
uint32 | arrayIndex = 0 |
||
) |
Add texture binding to the set
void RHIResourceSetDesc::Clear | ( | ) |
Clear all bindings
|
inline |
|
inline |
|
inline |
bool RHIResourceSetDesc::SetBuffer | ( | Ref< RHIUniformBuffer > | buffer, |
uint32 | location, | ||
uint32 | offset, | ||
uint32 | range | ||
) |
Update (or add new) previously set buffer binding in the set
bool RHIResourceSetDesc::SetSampler | ( | Ref< RHISampler > | sampler, |
uint32 | location, | ||
uint32 | arrayIndex = 0 |
||
) |
Update (or add new) previously set sampler binding in the set
bool RHIResourceSetDesc::SetTexture | ( | Ref< RHITexture > | texture, |
uint32 | location, | ||
uint32 | arrayIndex = 0 |
||
) |
Update (or add new) previously set texture binding in the set