Diligent Engine API Reference: Diligent::IShader Class Reference

Diligent Engine API Reference

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

Shader interface. More...

Inheritance diagram for Diligent::IShader:

## Public Member Functions
virtual void | QueryInterface (const Diligent::INTERFACE_ID &IID, IObject **ppInterface)=0
| Queries the specific interface, see IObject::QueryInterface() for details.
virtual const ShaderDesc & | GetDesc () const =0
| Returns the shader description.
virtual void | BindResources (IResourceMapping *pResourceMapping, Uint32 Flags)=0
| Binds shader resources. More...
virtual IShaderVariable * | GetShaderVariable (const Char *Name)=0
| Returns an interface to a shader variable. If the shader variable is not found, an interface to a dummy variable will be returned. More...
Public Member Functions inherited from Diligent::IDeviceObject
virtual void | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
| Queries the specific interface, see IObject::QueryInterface() for details.

## Detailed Description

Shader interface.

## Member Function Documentation

## ◆ BindResources()

virtual void Diligent::IShader::BindResources | ( | IResourceMapping * | pResourceMapping,
|  | Uint32 | Flags
| ) |  |
| pure virtual

Binds shader resources.

Parameters

  [in] | pResourceMapping | - Pointer to IResourceMapping interface to look for resources.
  [in] | Flags | - Additional flags for the operation. See Diligent::BIND_SHADER_RESOURCES_FLAGS for details.

Remarks
  The shader will keep strong references to all resources bound to it.

Implemented in Diligent::ShaderGLImpl, Diligent::ShaderD3D12Impl, and Diligent::ShaderD3D11Impl.

## ◆ GetShaderVariable()

virtual IShaderVariable* Diligent::IShader::GetShaderVariable | ( | const Char * | Name | ) |
| pure virtual

Returns an interface to a shader variable. If the shader variable is not found, an interface to a dummy variable will be returned.

Parameters

  [in] | Name | - Name of the variable.

Remarks
  The method does not increment the reference counter of the returned interface.

Implemented in Diligent::ShaderGLImpl, Diligent::ShaderD3D12Impl, and Diligent::ShaderD3D11Impl.