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::IObject Diligent::IShaderD3D11 Diligent::IShaderD3D12 Diligent::IShaderGL Diligent::RefCountedObject< IShaderD3D11, FixedBlockMemoryAllocator > Diligent::RefCountedObject< IShaderD3D12, FixedBlockMemoryAllocator > Diligent::RefCountedObject< IShaderGL, FixedBlockMemoryAllocator > Diligent::ObjectBase< IShaderD3D11, FixedBlockMemoryAllocator > Diligent::ObjectBase< IShaderD3D12, FixedBlockMemoryAllocator > Diligent::ObjectBase< IShaderGL, FixedBlockMemoryAllocator > Diligent::DeviceObjectBase< IShaderD3D11, ShaderDesc, FixedBlockMemoryAllocator > Diligent::DeviceObjectBase< IShaderD3D12, ShaderDesc, FixedBlockMemoryAllocator > Diligent::DeviceObjectBase< IShaderGL, ShaderDesc, FixedBlockMemoryAllocator > Diligent::ShaderBase< IShaderD3D11, IRenderDeviceD3D11, FixedBlockMemoryAllocator > Diligent::ShaderBase< IShaderD3D12, IRenderDeviceD3D12, FixedBlockMemoryAllocator > Diligent::ShaderBase< IShaderGL, IGLDeviceBaseInterface, FixedBlockMemoryAllocator > 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::IObject
virtual Atomics::Long AddRef ()=0
 Increments the number of strong references by 1. More...
 
virtual Atomics::Long Release ()=0
 Decrements the number of strong references by 1 and destroys the object when the counter reaches zero. More...
 
virtual IReferenceCountersGetReferenceCounters () const =0
 Returns the pointer to IReferenceCounters interface of the associated reference counters object. The metod does NOT increment the number of strong references to the returned object.
 

Detailed Description

Shader interface.

Member Function Documentation

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.

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.