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

Shader interface. More...

Inheritance diagram for Diligent::IShader:
Diligent::IDeviceObject Diligent::IShaderD3D11 Diligent::IShaderD3D12 Diligent::IShaderGL Diligent::RefCountedObject< IShaderD3D11 > Diligent::RefCountedObject< IShaderD3D12 > Diligent::RefCountedObject< IShaderGL > Diligent::ObjectBase< IShaderD3D11 > Diligent::ObjectBase< IShaderD3D12 > Diligent::ObjectBase< IShaderGL > Diligent::DeviceObjectBase< IShaderD3D11, ShaderDesc > Diligent::DeviceObjectBase< IShaderD3D12, ShaderDesc > Diligent::DeviceObjectBase< IShaderGL, ShaderDesc > Diligent::ShaderBase< IShaderD3D11, IRenderDeviceD3D11 > Diligent::ShaderBase< IShaderD3D12, IRenderDeviceD3D12 > Diligent::ShaderBase< IShaderGL, IGLDeviceBaseInterface > Diligent::ShaderD3D11Impl Diligent::ShaderD3D12Impl Diligent::ShaderGLImpl

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 ShaderDescGetDesc () const =0
 Returns the shader description.
 
virtual void BindResources (IResourceMapping *pResourceMapping, Uint32 Flags)=0
 Binds shader resources. More...
 
virtual IShaderVariableGetShaderVariable (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.