Home -> IShaderProgram
Declaration
class IShaderProgram;Description
The IShaderProgram interface represents a set of shader programs for graphics rendering. Code for individual shader stages are loaded into this object and compiled. Once this process is complete, the shader program is able to be attached to an IProgramNode in the render tree. After compilation, it is also possible to retrieve IDs for the various external elements that can be provided to the shader programs, such as vertex attributes and constant buffers.
Enumerations
| Name | Description | |
|---|---|---|
| ShaderStage |
Identifies an individual shader state. This is used to specify the target shader stage when calling the LoadShaderStage method.
|
|
| CodeFormat |
Identifies the type of a shader code blob. This is used when calling the LoadShaderStage method.
|
Structures
| Name | Description | |
|---|---|---|
| ShaderSourceInfoBase |
Base structure for shader source and bytecode descriptions passed to LoadShaderStage.
|
|
| ShaderTargetInfoBase |
Base structure for optional shader target configuration passed to ConfigureShaderTarget.
|
Members
Initialization methods
| Name | Description | |
|---|---|---|
| Delete |
Schedules the object for deletion. After calling this method, the object will be destroyed after the current
frame completes drawing.
|
Code format methods
| Name | Description | |
|---|---|---|
| IsCodeFormatSupported |
Reports whether the specified code format is supported by the target renderer
|
|
| PreferredCodeFormat |
Returns the preferred code format for the target renderer
|
Compilation methods
| Name | Description | |
|---|---|---|
| ConfigureShaderTarget |
Sets optional configuration settings for the renderer to use when loading and compiling shader code.
|
|
| LoadShaderStage |
Loads in code for the specified shader stage. The code is not compiled or validated until CompileProgram is called.
|
|
| CompileProgram |
Attempts to compile the code supplied by the LoadShaderStage method. Prior to calling this
method, the shader program cannot be bound to an IProgramNode, and no information about the
shader program can be queried.
|
Shader input methods
| Name | Description | |
|---|---|---|
| VertexAttributeExists |
Returns true if the specified vertex attribute exists
|
|
| StateValueExists |
Returns true if the specified global state value exists
|
|
| TextureExists |
Returns true if the specified texture resource exists
|
|
| SamplerExists |
Returns true if the specified separate texture sampler
|
|
| StateBufferExists |
Returns true if the specified state buffer exists
|
|
| ResourceArrayExists |
Returns true if the specified resource array exists
|
|
| GetVertexAttributeId |
Retrieves the ID of the specified vertex attribute, or VertexAttributeId::Null if the attribute could not be found.
|
|
| GetStateValueId |
Retrieves the ID of the specified shader state variable, or StateValueId::Null if the variable could not be found.
|
|
| GetTextureId |
Retrieves the ID of the specified texture input, or TextureId::Null if the texture input could not be found.
|
|
| GetSamplerId |
Retrieves the ID of the specified separate texture sampler, or SamplerId::Null if the sampler could not be found.
|
|
| GetStateBufferId |
Retrieves the ID of the specified state buffer, or StateBufferId::Null if the buffer could not be found.
|
|
| GetResourceArrayId |
Retrieves the ID of the specified resource array (ITexelArray or IDataArray),
or ResourceArrayId::Null if the resource could not be found.
|
State buffer methods
| Name | Description | |
|---|---|---|
| LoadStateBufferLayoutFromShader |
Attempts to load the layout of the specified state buffer into an IStateBufferLayout
|