Nameless Engine
|
#include <GlslGlobalShaderResourceBinding.h>
Protected Member Functions | |
GlslGlobalShaderResourceBinding (GlobalShaderResourceBindingManager *pManager, const std::string &sShaderResourceName, const std::array< GpuResource *, FrameResourceManager::getFrameResourceCount()> &vResourcesToBind) | |
virtual std::optional< Error > | bindToPipelines (Pipeline *pSpecificPipeline) override |
Protected Member Functions inherited from ne::GlobalShaderResourceBinding | |
GlobalShaderResourceBinding (GlobalShaderResourceBindingManager *pManager, const std::string &sShaderResourceName, const std::array< GpuResource *, FrameResourceManager::getFrameResourceCount()> &vResourcesToBind) | |
virtual std::optional< Error > | bindToPipelines (Pipeline *pSpecificPipeline)=0 |
void | unregisterBinding () |
const std::string & | getShaderResourceName () const |
std::array< GpuResource *, FrameResourceManager::getFrameResourceCount()> | getBindedResources () const |
Friends | |
class | GlobalShaderResourceBinding |
Additional Inherited Members | |
Public Member Functions inherited from ne::GlobalShaderResourceBinding | |
GlobalShaderResourceBinding (const GlobalShaderResourceBinding &)=delete | |
GlobalShaderResourceBinding & | operator= (const GlobalShaderResourceBinding &)=delete |
GlobalShaderResourceBinding (GlobalShaderResourceBinding &&)=delete | |
GlobalShaderResourceBinding & | operator= (GlobalShaderResourceBinding &&)=delete |
Static Protected Member Functions inherited from ne::GlobalShaderResourceBinding | |
static std::optional< Error > | create (Renderer *pRenderer, GlobalShaderResourceBindingManager *pManager, const std::string &sShaderResourceName, const std::array< GpuResource *, FrameResourceManager::getFrameResourceCount()> &vResourcesToBind) |
Used for binding GPU resources as "global" GLSL shader resources (that don't change on a per-object basis).
|
protected |
Initializes a new object, does not trigger bindToPipelines.
pManager | Manager that creates this object. |
sShaderResourceName | Name of the shader resource (name from shader code) to bind the resources. |
vResourcesToBind | Resources to bind to pipelines. This can be the same resource for all frame resources (for example a texture) or a separate resource per frame (can be used for some CPU-write resources). |
|
overrideprotectedvirtual |
Binds the resource to a specific pipeline or all graphics pipelines that use it.
pSpecificPipeline | nullptr if need to bind to all graphics pipelines, otherwise a valid pointer to bind only to that pipeline. |
Implements ne::GlobalShaderResourceBinding.