The IShader resource object interface. More...
#include "murl_resource_i_shader.h"
Classes | |
struct | Iff |
IFF file specific structs. More... | |
Public Member Functions | |
virtual IObject * | GetObjectInterface ()=0 |
Get the mutable Resource::IObject interface. More... | |
virtual const IObject * | GetObjectInterface () const =0 |
Get the constant Resource::IObject interface. More... | |
virtual UInt32 | GetNumberOfSubShaders () const =0 |
Get the number of individual shader chunks. More... | |
virtual IShader * | GetSubShader (UInt32 shaderIndex)=0 |
Get the sub-shader at a given index. More... | |
virtual const IShader * | GetSubShader (UInt32 shaderIndex) const =0 |
Get the sub-shader at a given index. More... | |
virtual SInt32 | GetSubShaderIndex (IEnums::ShaderType type, IEnums::ShaderLanguage language) const =0 |
Get the index of a sub-shader via a given type and language. More... | |
virtual IEnums::ShaderType | GetType () const =0 |
Get the shader type. More... | |
virtual IEnums::ShaderLanguage | GetOutputLanguage () const =0 |
Get the actual output shader language. More... | |
virtual IEnums::ShaderLanguage | GetInputLanguage () const =0 |
Get the input shader language this shader was translated from. More... | |
virtual const ConstData & | GetRawData () const =0 |
Get the raw shader code data. More... | |
virtual const String & | GetUnoptimizedSource () const =0 |
Get the unoptimized shader source code, if present. More... | |
virtual const String & | GetUnoptimizedLog () const =0 |
Get the compiler log output of the unoptimized shader source code, if present. More... | |
virtual const String & | GetUnoptimizedDefinitions () const =0 |
Get the variable definitions of the unoptimized shader source code, if present. More... | |
virtual const StringArray & | GetUnoptimizedPrefix () const =0 |
Get the prefix(es) of the unoptimized shader source code, if present. More... | |
virtual const StringArray & | GetUnoptimizedCode () const =0 |
Get the code section(s) of the unoptimized shader source code, if present. More... | |
virtual const String & | GetOptimizedSource () const =0 |
Get the optimized shader source code, if present. More... | |
virtual const String & | GetOptimizedLog () const =0 |
Get the compiler log output of the optimized shader source code, if present. More... | |
virtual const String & | GetOptimizedDefinitions () const =0 |
Get the variable definitions of the optimized shader source code, if present. More... | |
virtual const StringArray & | GetOptimizedPrefix () const =0 |
Get the prefix(es) of the optimized shader source code, if present. More... | |
virtual const StringArray & | GetOptimizedCode () const =0 |
Get the code section(s) of the optimized shader source code, if present. More... | |
virtual UInt32 | GetNumberOfConstants () const =0 |
Get the number of constants used by the shader. More... | |
virtual SInt32 | GetConstantIndex (const String &name) const =0 |
Get the index of a constant with a given name. More... | |
virtual IEnums::ConstantType | GetConstantType (UInt32 constantIndex) const =0 |
Get the data type of a given constant. More... | |
virtual IEnums::ShaderVariablePrecision | GetConstantPrecision (UInt32 constantIndex) const =0 |
Get the precision of a given constant. More... | |
virtual String | GetConstantDefaultValue (UInt32 constantIndex) const =0 |
Get the default value of a given constant as a string. More... | |
virtual String | GetConstantName (UInt32 constantIndex) const =0 |
Get the name of a given constant. More... | |
virtual UInt32 | GetNumberOfConstantBuffers () const =0 |
Get the number of constant buffers used by the shader. More... | |
virtual SInt32 | GetConstantBufferIndex (const String &name) const =0 |
Get the index of a constant buffer with a given name. More... | |
virtual SInt32 | GetConstantBufferLocation (UInt32 constantBufferIndex) const =0 |
Get the location or register number of a given constant buffer. More... | |
virtual IEnums::ConstantBufferItem | GetConstantBufferItem (UInt32 constantBufferIndex) const =0 |
Get the predefined item of a given constant buffer. More... | |
virtual String | GetConstantBufferName (UInt32 constantBufferIndex) const =0 |
Get the primary variable name of a given constant buffer. More... | |
virtual UInt32 | GetNumberOfConstantBufferAlternativeNames (UInt32 constantBufferIndex) const =0 |
Get the number of alternative variable names of a given constant buffer. More... | |
virtual String | GetConstantBufferAlternativeName (UInt32 constantBufferIndex, UInt32 alternativeNameIndex) const =0 |
Get an alternative variable name of a given constant buffer. More... | |
virtual UInt32 | GetNumberOfConstantBufferUniforms (UInt32 constantBufferIndex) const =0 |
Get the number of uniform variables present in a given constant buffer. More... | |
virtual SInt32 | GetConstantBufferUniformIndex (UInt32 constantBufferIndex, UInt32 uniformIndex) const =0 |
Get the global index of a uniform in a given constant buffer at a given index. More... | |
virtual UInt32 | GetNumberOfUniforms () const =0 |
Get the number of uniform variables used by the shader. More... | |
virtual SInt32 | GetUniformIndex (const String &name) const =0 |
Get the index of a uniform with a given name. More... | |
virtual SInt32 | GetUniformLocation (UInt32 uniformIndex) const =0 |
Get the location, register number or constant buffer offset of a given uniform. More... | |
virtual SInt32 | GetUniformConstantBufferIndex (UInt32 uniformIndex) const =0 |
Get the index of the constant buffer the uniform belongs to. More... | |
virtual IEnums::UniformItem | GetUniformItem (UInt32 uniformIndex) const =0 |
Get the predefined item of a given uniform. More... | |
virtual IEnums::UniformType | GetUniformType (UInt32 uniformIndex) const =0 |
Get the data type of a given uniform. More... | |
virtual IEnums::ShaderVariablePrecision | GetUniformPrecision (UInt32 uniformIndex) const =0 |
Get the variable precision of a given uniform. More... | |
virtual UInt32 | GetUniformArraySize (UInt32 uniformIndex) const =0 |
Get the array size of a given uniform. More... | |
virtual String | GetUniformDefaultValue (UInt32 uniformIndex) const =0 |
Get the default value of a given uniform as a string. More... | |
virtual String | GetUniformName (UInt32 uniformIndex) const =0 |
Get the primary variable name of a given uniform. More... | |
virtual UInt32 | GetNumberOfUniformAlternativeNames (UInt32 uniformIndex) const =0 |
Get the number of alternative variable names of a given uniform. More... | |
virtual String | GetUniformAlternativeName (UInt32 uniformIndex, UInt32 alternativeNameIndex) const =0 |
Get an alternative variable name of a given uniform. More... | |
virtual UInt32 | GetNumberOfAttributes () const =0 |
Get the number of attribute variables used by the shader. More... | |
virtual SInt32 | GetAttributeIndex (const String &name) const =0 |
Get the index of an attribute with a given name. More... | |
virtual SInt32 | GetAttributeLocation (UInt32 attributeIndex) const =0 |
Get the location or register number of a given attribute. More... | |
virtual IEnums::AttributeItem | GetAttributeItem (UInt32 attributeIndex) const =0 |
Get the predefined item of a given attribute. More... | |
virtual IEnums::AttributeType | GetAttributeType (UInt32 attributeIndex) const =0 |
Get the data type of a given attribute. More... | |
virtual IEnums::ShaderVariablePrecision | GetAttributePrecision (UInt32 attributeIndex) const =0 |
Get the variable precision of a given attribute. More... | |
virtual String | GetAttributeName (UInt32 attributeIndex) const =0 |
Get the primary variable name of a given attribute. More... | |
virtual UInt32 | GetNumberOfAttributeAlternativeNames (UInt32 attributeIndex) const =0 |
Get the number of alternative variable names of a given attribute. More... | |
virtual String | GetAttributeAlternativeName (UInt32 attributeIndex, UInt32 alternativeNameIndex) const =0 |
Get an alternative variable name of a given attribute. More... | |
virtual UInt32 | GetNumberOfVaryings () const =0 |
Get the number of varying variables used by the shader. More... | |
virtual SInt32 | GetVaryingIndex (const String &name) const =0 |
Get the index of a varying with a given name. More... | |
virtual SInt32 | GetVaryingLocation (UInt32 varyingIndex) const =0 |
Get the location or register number of a given varying variable. More... | |
virtual IEnums::VaryingType | GetVaryingType (UInt32 varyingIndex) const =0 |
Get the data type of a given varying variable. More... | |
virtual IEnums::ShaderVariablePrecision | GetVaryingPrecision (UInt32 varyingIndex) const =0 |
Get the variable precision of a given varying variable. More... | |
virtual String | GetVaryingName (UInt32 varyingIndex) const =0 |
Get the name of a given varying variable. More... | |
virtual UInt32 | GetNumberOfTextures () const =0 |
Get the number of texture (sampler) variables used by the shader. More... | |
virtual SInt32 | GetTextureIndex (const String &name) const =0 |
Get the index of a texture with a given name. More... | |
virtual SInt32 | GetTextureLocation (UInt32 textureIndex) const =0 |
Get the location or register number of a given texture sampler. More... | |
virtual IEnums::TextureType | GetTextureType (UInt32 textureIndex) const =0 |
Get the data type of a given texture sampler. More... | |
virtual IEnums::TextureFlagMask | GetTextureFlags (UInt32 textureIndex) const =0 |
Get additional flags of a given texture sampler. More... | |
virtual IEnums::ShaderVariablePrecision | GetTexturePrecision (UInt32 textureIndex) const =0 |
Get the variable precision of a given texture sampler. More... | |
virtual IEnums::TextureSemantic | GetTextureSemantic (UInt32 textureIndex, IEnums::ColorComponent colorComponent) const =0 |
Get the semantic of a given texture sampler for a given color channel. More... | |
virtual UInt32 | GetTextureSemanticIndex (UInt32 textureIndex, IEnums::ColorComponent colorComponent) const =0 |
Get the semantic index of a given texture sampler for a given color channel. More... | |
virtual Float | GetTextureDefaultValue (UInt32 textureIndex, IEnums::ColorComponent colorComponent) const =0 |
Get the default value of a given texture sampler for a given color channel. More... | |
virtual String | GetTextureName (UInt32 textureIndex) const =0 |
Get the primary variable name of a given texture sampler. More... | |
virtual UInt32 | GetNumberOfTextureAlternativeNames (UInt32 textureIndex) const =0 |
Get the number of alternative variable names of a given texture sampler. More... | |
virtual String | GetTextureAlternativeName (UInt32 textureIndex, UInt32 alternativeNameIndex) const =0 |
Get an alternative variable name of a given texture sampler. More... | |
Detailed Description
The IShader resource object interface.
A shader resource contains GPU shader program code in a number of possible formats, both source and binary forms are defined. The resource object can also contain meta information for the shader (such as information about attributes, texture semantics etc.), for shaders that cannot be queried for this information at run-time (e.g. DirectX 10+ HLSL binary blobs).
Member Function Documentation
◆ GetObjectInterface() [1/2]
|
pure virtual |
Get the mutable Resource::IObject interface.
- Returns
- The IObject interface.
◆ GetObjectInterface() [2/2]
|
pure virtual |
Get the constant Resource::IObject interface.
- Returns
- The IObject interface.
◆ GetNumberOfSubShaders()
|
pure virtual |
Get the number of individual shader chunks.
- Returns
- The number of chunks.
◆ GetSubShader() [1/2]
Get the sub-shader at a given index.
- Parameters
-
shaderIndex The index of the shader, from 0 to GetNumberOfShaders()-1.
- Returns
- The sub-shader, or null if index is out of range.
◆ GetSubShader() [2/2]
|
pure virtual |
Get the sub-shader at a given index.
- Parameters
-
shaderIndex The index of the shader, from 0 to GetNumberOfShaders()-1.
- Returns
- The sub-shader, or null if index is out of range.
◆ GetSubShaderIndex()
|
pure virtual |
Get the index of a sub-shader via a given type and language.
If the resource does not contain a shader matching the given type and language, -1 is returned.
- Parameters
-
type The shader type to query. language The shader language to query.
- Returns
- The number of chunks.
◆ GetType()
|
pure virtual |
Get the shader type.
- Returns
- The shader type.
◆ GetOutputLanguage()
|
pure virtual |
Get the actual output shader language.
- Returns
- The output shader language.
◆ GetInputLanguage()
|
pure virtual |
Get the input shader language this shader was translated from.
- Returns
- The input shader language, or IEnums::SHADER_LANGUAGE_UNDEFINED if the shader is compiled from its own source, i.e. not translated.
◆ GetRawData()
|
pure virtual |
Get the raw shader code data.
This method returns the actual shader data that are passed to the video API. In case of OpenGL(ES), this represents a (possibly optimized) piece of GLSL source code. For DirectX, the data are present in binary form.
- Returns
- A reference to a ConstData object holding the shader data.
◆ GetUnoptimizedSource()
|
pure virtual |
Get the unoptimized shader source code, if present.
This method returns a string containing the whole source code of the shader including prefix, definitions and actual code, before it is optimized and compiled. An empty string is a valid return value, which indicates that the original source code is not available.
- Returns
- A string holding the source code, or an empty one if not available.
◆ GetUnoptimizedLog()
|
pure virtual |
Get the compiler log output of the unoptimized shader source code, if present.
- Returns
- A string holding the log, or an empty one if not available.
◆ GetUnoptimizedDefinitions()
|
pure virtual |
Get the variable definitions of the unoptimized shader source code, if present.
This method returns only the variable definition section of the unoptimized code. Use GetUnoptimizedSource() to get the full source.
- Returns
- A string holding the variables, or an empty one if not available.
◆ GetUnoptimizedPrefix()
|
pure virtual |
Get the prefix(es) of the unoptimized shader source code, if present.
This method returns only the prefix of the unoptimized code. Use GetUnoptimizedSource() to get the full source.
- Returns
- A string array holding the prefixes, or an empty one if not available.
◆ GetUnoptimizedCode()
|
pure virtual |
Get the code section(s) of the unoptimized shader source code, if present.
This method returns only the actual code section of the unoptimized code. Use GetUnoptimizedSource() to get the full source.
- Returns
- A string array holding the code, or an empty one if not available.
◆ GetOptimizedSource()
|
pure virtual |
Get the optimized shader source code, if present.
This method returns a string containing the optimized source code of the including prefix, definitions and actual code. An empty string is a valid return value, which indicates that the original source is not available.
- Returns
- A string holding the source code, or an empty one if not available.
◆ GetOptimizedLog()
|
pure virtual |
Get the compiler log output of the optimized shader source code, if present.
- Returns
- A string holding the log, or an empty one if not available.
◆ GetOptimizedDefinitions()
|
pure virtual |
Get the variable definitions of the optimized shader source code, if present.
This method returns only the variable definition section of the optimized code. Use GetOptimizedSource() to get the full source.
- Returns
- A string holding the variables, or an empty one if not available.
◆ GetOptimizedPrefix()
|
pure virtual |
Get the prefix(es) of the optimized shader source code, if present.
This method returns only the prefix of the optimized code. Use GetOptimizedSource() to get the full source.
- Returns
- A string array holding the prefixes, or an empty one if not available.
◆ GetOptimizedCode()
|
pure virtual |
Get the code section(s) of the optimized shader source code, if present.
This method returns only the actual code section of the optimized code. Use GetOptimizedSource() to get the full source.
- Returns
- A string array holding the code, or an empty one if not available.
◆ GetNumberOfConstants()
|
pure virtual |
Get the number of constants used by the shader.
- Returns
- The number of constants.
◆ GetConstantIndex()
Get the index of a constant with a given name.
- Parameters
-
name The name to query.
- Returns
- The zero-bases index, or -1 if not found.
◆ GetConstantType()
|
pure virtual |
Get the data type of a given constant.
- Parameters
-
constantIndex The constant index, from 0 to GetNumberOfConstants()-1.
- Returns
- The data type, or IEnums::CONSTANT_TYPE_UNDEFINED if the index is out of range.
◆ GetConstantPrecision()
|
pure virtual |
Get the precision of a given constant.
- Parameters
-
constantIndex The constant index, from 0 to GetNumberOfConstants()-1.
- Returns
- The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.
◆ GetConstantDefaultValue()
|
pure virtual |
Get the default value of a given constant as a string.
- Parameters
-
constantIndex The constant index, from 0 to GetNumberOfConstants()-1.
- Returns
- The default value, or an empty string if the index is out of range.
◆ GetConstantName()
Get the name of a given constant.
- Parameters
-
constantIndex The constant index, from 0 to GetNumberOfConstants()-1.
- Returns
- The constant name, or an empty string if the index is out of range.
◆ GetNumberOfConstantBuffers()
|
pure virtual |
Get the number of constant buffers used by the shader.
- Returns
- The number of constant buffers.
◆ GetConstantBufferIndex()
|
pure virtual |
Get the index of a constant buffer with a given name.
- Parameters
-
name The name to query.
- Returns
- The zero-bases index, or -1 if not found.
◆ GetConstantBufferLocation()
|
pure virtual |
Get the location or register number of a given constant buffer.
- Parameters
-
constantBufferIndex The buffer index, from 0 to GetNumberOfConstantBuffers()-1.
- Returns
- The location, or -1 if the index is out of range.
◆ GetConstantBufferItem()
|
pure virtual |
Get the predefined item of a given constant buffer.
- Parameters
-
constantBufferIndex The buffer index, from 0 to GetNumberOfConstantBuffers()-1.
- Returns
- The item, or IEnums::CONSTANT_BUFFER_ITEM_CUSTOM if the index is out of range.
◆ GetConstantBufferName()
|
pure virtual |
Get the primary variable name of a given constant buffer.
- Parameters
-
constantBufferIndex The buffer index, from 0 to GetNumberOfConstantBuffers()-1.
- Returns
- The variable name, or an empty string if the index is out of range.
◆ GetNumberOfConstantBufferAlternativeNames()
|
pure virtual |
Get the number of alternative variable names of a given constant buffer.
- Parameters
-
constantBufferIndex The buffer index, from 0 to GetNumberOfConstantBuffers()-1.
- Returns
- The number of alternative names, or 0 if the index is out of range.
◆ GetConstantBufferAlternativeName()
|
pure virtual |
Get an alternative variable name of a given constant buffer.
- Parameters
-
constantBufferIndex The buffer index, from 0 to GetNumberOfConstantBuffers()-1. alternativeNameIndex The name index, from 0 to GetNumberOfConstantBufferAlternativeNames()-1.
- Returns
- The alternative variable name, or an empty string if an index is out of range.
◆ GetNumberOfConstantBufferUniforms()
|
pure virtual |
Get the number of uniform variables present in a given constant buffer.
- Parameters
-
constantBufferIndex The buffer index, from 0 to GetNumberOfConstantBuffers()-1.
- Returns
- The number of uniforms present in the constant buffer at the given index.
◆ GetConstantBufferUniformIndex()
|
pure virtual |
Get the global index of a uniform in a given constant buffer at a given index.
- Parameters
-
constantBufferIndex The constant buffer index, from 0 to GetNumberOfConstantBuffers()-1. uniformIndex The local uniform index, from 0 to GetNumberOfConstantBufferUniforms(constantBufferIndex)-1.
- Returns
- The zero-based global uniform index to be used in any of the GetUniform*() calls, or -1 if not found.
◆ GetNumberOfUniforms()
|
pure virtual |
Get the number of uniform variables used by the shader.
- Returns
- The number of uniform variables.
◆ GetUniformIndex()
Get the index of a uniform with a given name.
- Parameters
-
name The name to query.
- Returns
- The zero-bases index, or -1 if not found.
◆ GetUniformLocation()
|
pure virtual |
Get the location, register number or constant buffer offset of a given uniform.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The location, or -1 if the index is out of range.
◆ GetUniformConstantBufferIndex()
|
pure virtual |
Get the index of the constant buffer the uniform belongs to.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The constant buffer index, or -1 if the index is out of range or the uniform does not belong to a constant buffer.
◆ GetUniformItem()
|
pure virtual |
Get the predefined item of a given uniform.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The item, or IEnums::UNIFORM_ITEM_CUSTOM if the index is out of range.
◆ GetUniformType()
|
pure virtual |
Get the data type of a given uniform.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The data type, or IEnums::UNIFORM_TYPE_UNDEFINED if the index is out of range.
◆ GetUniformPrecision()
|
pure virtual |
Get the variable precision of a given uniform.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.
◆ GetUniformArraySize()
|
pure virtual |
Get the array size of a given uniform.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The array size, or 0 for a scalar uniform.
◆ GetUniformDefaultValue()
|
pure virtual |
Get the default value of a given uniform as a string.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The default value, or an empty string if the index is out of range.
◆ GetUniformName()
Get the primary variable name of a given uniform.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The variable name, or an empty string if the index is out of range.
◆ GetNumberOfUniformAlternativeNames()
|
pure virtual |
Get the number of alternative variable names of a given uniform.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1.
- Returns
- The number of alternative names, or 0 if the index is out of range.
◆ GetUniformAlternativeName()
|
pure virtual |
Get an alternative variable name of a given uniform.
- Parameters
-
uniformIndex The uniform index, from 0 to GetNumberOfUniforms()-1. alternativeNameIndex The name index, from 0 to GetNumberOfUniformAlternativeNames()-1.
- Returns
- The alternative variable name, or an empty string if an index is out of range.
◆ GetNumberOfAttributes()
|
pure virtual |
Get the number of attribute variables used by the shader.
- Returns
- The number of attribute variables.
◆ GetAttributeIndex()
Get the index of an attribute with a given name.
- Parameters
-
name The name to query.
- Returns
- The zero-bases index, or -1 if not found.
◆ GetAttributeLocation()
|
pure virtual |
Get the location or register number of a given attribute.
- Parameters
-
attributeIndex The attribute index, from 0 to GetNumberOfAttributes()-1.
- Returns
- The location, or -1 if the index is out of range.
◆ GetAttributeItem()
|
pure virtual |
Get the predefined item of a given attribute.
- Parameters
-
attributeIndex The attribute index, from 0 to GetNumberOfAttributes()-1.
- Returns
- The item, or IEnums::ATTRIBUTE_ITEM_CUSTOM if the index is out of range.
◆ GetAttributeType()
|
pure virtual |
Get the data type of a given attribute.
- Parameters
-
attributeIndex The attribute index, from 0 to GetNumberOfAttributes()-1.
- Returns
- The data type, or IEnums::ATTRIBUTE_TYPE_UNDEFINED if the index is out of range.
◆ GetAttributePrecision()
|
pure virtual |
Get the variable precision of a given attribute.
- Parameters
-
attributeIndex The attribute index, from 0 to GetNumberOfAttributes()-1.
- Returns
- The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.
◆ GetAttributeName()
|
pure virtual |
Get the primary variable name of a given attribute.
- Parameters
-
attributeIndex The attribute index, from 0 to GetNumberOfAttributes()-1.
- Returns
- The variable name, or an empty string if the index is out of range.
◆ GetNumberOfAttributeAlternativeNames()
|
pure virtual |
Get the number of alternative variable names of a given attribute.
- Parameters
-
attributeIndex The attribute index, from 0 to GetNumberOfAttributes()-1.
- Returns
- The number of alternative names, or 0 if the index is out of range.
◆ GetAttributeAlternativeName()
|
pure virtual |
Get an alternative variable name of a given attribute.
- Parameters
-
attributeIndex The attribute index, from 0 to GetNumberOfAttributes()-1. alternativeNameIndex The name index, from 0 to GetNumberOfAttributeAlternativeNames()-1.
- Returns
- The alternative variable name, or an empty string if an index is out of range.
◆ GetNumberOfVaryings()
|
pure virtual |
Get the number of varying variables used by the shader.
- Returns
- The number of varying variables.
◆ GetVaryingIndex()
Get the index of a varying with a given name.
- Parameters
-
name The name to query.
- Returns
- The zero-bases index, or -1 if not found.
◆ GetVaryingLocation()
|
pure virtual |
Get the location or register number of a given varying variable.
- Parameters
-
varyingIndex The varying variable index, from 0 to GetNumberOfVaryings()-1.
- Returns
- The location, or -1 if the index is out of range.
◆ GetVaryingType()
|
pure virtual |
Get the data type of a given varying variable.
- Parameters
-
varyingIndex The varying variable index, from 0 to GetNumberOfVaryings()-1.
- Returns
- The data type, or IEnums::VARYING_TYPE_UNDEFINED if the index is out of range.
◆ GetVaryingPrecision()
|
pure virtual |
Get the variable precision of a given varying variable.
- Parameters
-
varyingIndex The varying variable index, from 0 to GetNumberOfVaryings()-1.
- Returns
- The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.
◆ GetVaryingName()
Get the name of a given varying variable.
- Parameters
-
varyingIndex The varying variable index, from 0 to GetNumberOfVaryings()-1.
- Returns
- The variable name, or an empty string if the index is out of range.
◆ GetNumberOfTextures()
|
pure virtual |
Get the number of texture (sampler) variables used by the shader.
- Returns
- The number of sampler variables.
◆ GetTextureIndex()
Get the index of a texture with a given name.
- Parameters
-
name The name to query.
- Returns
- The zero-bases index, or -1 if not found.
◆ GetTextureLocation()
|
pure virtual |
Get the location or register number of a given texture sampler.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1.
- Returns
- The location, or -1 if the index is out of range.
◆ GetTextureType()
|
pure virtual |
Get the data type of a given texture sampler.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1.
- Returns
- The type, or IEnums::TEXTURE_TYPE_DEFAULT if the index is out of range.
◆ GetTextureFlags()
|
pure virtual |
Get additional flags of a given texture sampler.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1.
- Returns
- The flag bit mask, or IEnums::TEXTURE_FLAG_MASK_NONE if the index is out of range.
◆ GetTexturePrecision()
|
pure virtual |
Get the variable precision of a given texture sampler.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1.
- Returns
- The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.
◆ GetTextureSemantic()
|
pure virtual |
Get the semantic of a given texture sampler for a given color channel.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1. colorComponent The color component to query.
- Returns
- The semantic, or IEnums::TEXTURE_SEMANTIC_UNDEFINED if the index is out of range.
◆ GetTextureSemanticIndex()
|
pure virtual |
Get the semantic index of a given texture sampler for a given color channel.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1. colorComponent The color component to query.
- Returns
- The index, or 0 if the index is out of range.
◆ GetTextureDefaultValue()
|
pure virtual |
Get the default value of a given texture sampler for a given color channel.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1. colorComponent The color component to query.
- Returns
- The default value, or 0.0 if the index is out of range.
◆ GetTextureName()
Get the primary variable name of a given texture sampler.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1.
- Returns
- The variable name, or an empty string if the index is out of range.
◆ GetNumberOfTextureAlternativeNames()
|
pure virtual |
Get the number of alternative variable names of a given texture sampler.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1.
- Returns
- The number of alternative names, or 0 if the index is out of range.
◆ GetTextureAlternativeName()
|
pure virtual |
Get an alternative variable name of a given texture sampler.
- Parameters
-
textureIndex The sampler index, from 0 to GetNumberOfTextures()-1. alternativeNameIndex The name index, from 0 to GetNumberOfTextureAlternativeNames()-1.
- Returns
- The alternative variable name, or an empty string if an index is out of range.
The documentation for this interface was generated from the following file:
- murl_resource_i_shader.h