Diligent Engine API Reference: Diligent::IShaderResourceBinding Class Reference

Diligent Engine API Reference

Public Member Functions | List of all members
Diligent::IShaderResourceBinding Class Referenceabstract

Shader resource binding interface. More...

Inheritance diagram for Diligent::IShaderResourceBinding:

## Public Member Functions
virtual void | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
| Queries the specific interface, see IObject::QueryInterface() for details.
virtual class IPipelineState * | GetPipelineState ()=0
| Returns pointer to the referenced buffer object. More...
virtual void | BindResources (Uint32 ShaderFlags, IResourceMapping *pResMapping, Uint32 Flags)=0
| Binds all resource using the resource mapping. More...
virtual IShaderVariable * | GetVariable (SHADER_TYPE ShaderType, const char *Name)=0
| Returns variable. More...

## Detailed Description

Shader resource binding interface.

## Member Function Documentation

## ◆ BindResources()

virtual void Diligent::IShaderResourceBinding::BindResources | ( | Uint32 | ShaderFlags,
|  | IResourceMapping * | pResMapping,
|  | Uint32 | Flags
| ) |  |
| pure virtual

Binds all resource using the resource mapping.

Parameters

  [in] | ShaderFlags | - Flags for the shader stages, for which resources will be bound. Any combination of Diligent::SHADER_TYPE may be specified.
  [in] | pResMapping | - Shader resource mapping, where required resources will be looked up
  [in] | Flags | - Additional flags. See Diligent::BIND_SHADER_RESOURCES_FLAGS.

Implemented in Diligent::ShaderResourceBindingD3D11Impl, Diligent::ShaderResourceBindingD3D12Impl, and Diligent::ShaderResourceBindingGLImpl.

## ◆ GetPipelineState()

virtual class IPipelineState* Diligent::IShaderResourceBinding::GetPipelineState | ( |  | ) |
| pure virtual

Returns pointer to the referenced buffer object.

The method calls AddRef() on the returned interface, so Release() must be called to avoid memory leaks.

Implemented in Diligent::ShaderResourceBindingBase< IShaderResourceBindingGL >, Diligent::ShaderResourceBindingBase< IShaderResourceBindingD3D12 >, and Diligent::ShaderResourceBindingBase< IShaderResourceBindingD3D11 >.

## ◆ GetVariable()

virtual IShaderVariable* Diligent::IShaderResourceBinding::GetVariable | ( | SHADER_TYPE | ShaderType,
|  | const char * | Name
| ) |  |
| pure virtual

Returns variable.

Parameters

  [in] | ShaderType | - Type of the shader to look up the variable. Must be one of Diligent::SHADER_TYPE.
  | Name | - Variable name

Implemented in Diligent::ShaderResourceBindingD3D11Impl, Diligent::ShaderResourceBindingD3D12Impl, and Diligent::ShaderResourceBindingGLImpl.