Shader interface. More...
#include <Shader.h>
Public Member Functions | |
virtual const ShaderDesc &DILIGENT_CALL_TYPE | GetDesc () const override=0 |
Returns the shader description. | |
virtual Uint32 DILIGENT_CALL_TYPE | GetResourceCount () const =0 |
Returns the total number of shader resources. | |
virtual void DILIGENT_CALL_TYPE | GetResourceDesc (Uint32 Index, ShaderResourceDesc &ResourceDesc) const =0 |
Returns the pointer to the array of shader resources. | |
virtual const ShaderCodeBufferDesc *DILIGENT_CALL_TYPE | GetConstantBufferDesc (Uint32 Index) const =0 |
For a constant buffer resource, returns the buffer description. See Diligent::ShaderCodeBufferDesc. | |
virtual void DILIGENT_CALL_TYPE | GetBytecode (const void **ppBytecode, Uint64 &Size) const =0 |
Returns the shader bytecode. | |
virtual SHADER_STATUS DILIGENT_CALL_TYPE | GetStatus (bool WaitForCompletion=false)=0 |
Returns the shader status, see Diligent::SHADER_STATUS. | |
![]() | |
virtual Int32 DILIGENT_CALL_TYPE | GetUniqueID () const =0 |
Returns unique identifier assigned to an object. | |
virtual void DILIGENT_CALL_TYPE | SetUserData (IObject *pUserData)=0 |
Stores a pointer to the user-provided data object. | |
virtual IObject *DILIGENT_CALL_TYPE | GetUserData () const =0 |
Returns a pointer to the user data object previously set with SetUserData() method. | |
![]() | |
virtual void DILIGENT_CALL_TYPE | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0 |
Queries the specific interface. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | AddRef ()=0 |
Increments the number of strong references by 1. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | Release ()=0 |
virtual IReferenceCounters *DILIGENT_CALL_TYPE | GetReferenceCounters () const =0 |
Shader interface.
|
pure virtual |
Returns the shader bytecode.
[out] | ppBytecode | - A pointer to the memory location where a pointer to the byte code will be written. |
[out] | Size | - The size of the byte code. |
For OpenGL, this method returns the full GLSL source.
The pointer returned by the method remains valid while the shader object is alive. An application must NOT free the memory.
|
pure virtual |
For a constant buffer resource, returns the buffer description. See Diligent::ShaderCodeBufferDesc.
[in] | Index | - Resource index, same as used by GetResourceDesc. |
This method requires that the LoadConstantBufferReflection
flag was set to true
when the shader was created.
|
pure virtual |
Returns the shader status, see Diligent::SHADER_STATUS.
[in] | WaitForCompletion | - If true, the method will wait until the shader is compiled. If false, the method will return the shader status without waiting. This parameter is ignored if the shader was compiled synchronously. |