The IShader resource object interface. More...

#include "murl_resource_i_shader.h"

Inheritance diagram for Murl::Resource::IShader:

Classes

struct  Iff
 IFF file specific structs. More...
 

Public Member Functions

virtual IObjectGetObjectInterface ()=0
 Get the mutable Resource::IObject interface. More...
 
virtual const IObjectGetObjectInterface () const =0
 Get the constant Resource::IObject interface. More...
 
virtual UInt32 GetNumberOfSubShaders () const =0
 Get the number of individual shader chunks. More...
 
virtual IShaderGetSubShader (UInt32 shaderIndex)=0
 Get the sub-shader at a given index. More...
 
virtual const IShaderGetSubShader (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 ConstDataGetRawData () const =0
 Get the raw shader code data. More...
 
virtual const StringGetUnoptimizedSource () const =0
 Get the unoptimized shader source code, if present. More...
 
virtual const StringGetUnoptimizedLog () const =0
 Get the compiler log output of the unoptimized shader source code, if present. More...
 
virtual const StringGetUnoptimizedDefinitions () const =0
 Get the variable definitions of the unoptimized shader source code, if present. More...
 
virtual const StringArrayGetUnoptimizedPrefix () const =0
 Get the prefix(es) of the unoptimized shader source code, if present. More...
 
virtual const StringArrayGetUnoptimizedCode () const =0
 Get the code section(s) of the unoptimized shader source code, if present. More...
 
virtual const StringGetOptimizedSource () const =0
 Get the optimized shader source code, if present. More...
 
virtual const StringGetOptimizedLog () const =0
 Get the compiler log output of the optimized shader source code, if present. More...
 
virtual const StringGetOptimizedDefinitions () const =0
 Get the variable definitions of the optimized shader source code, if present. More...
 
virtual const StringArrayGetOptimizedPrefix () const =0
 Get the prefix(es) of the optimized shader source code, if present. More...
 
virtual const StringArrayGetOptimizedCode () 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]

virtual IObject* Murl::Resource::IShader::GetObjectInterface ( )
pure virtual

Get the mutable Resource::IObject interface.

Returns
The IObject interface.

◆ GetObjectInterface() [2/2]

virtual const IObject* Murl::Resource::IShader::GetObjectInterface ( ) const
pure virtual

Get the constant Resource::IObject interface.

Returns
The IObject interface.

◆ GetNumberOfSubShaders()

virtual UInt32 Murl::Resource::IShader::GetNumberOfSubShaders ( ) const
pure virtual

Get the number of individual shader chunks.

Returns
The number of chunks.

◆ GetSubShader() [1/2]

virtual IShader* Murl::Resource::IShader::GetSubShader ( UInt32  shaderIndex)
pure virtual

Get the sub-shader at a given index.

Parameters
shaderIndexThe index of the shader, from 0 to GetNumberOfShaders()-1.
Returns
The sub-shader, or null if index is out of range.

◆ GetSubShader() [2/2]

virtual const IShader* Murl::Resource::IShader::GetSubShader ( UInt32  shaderIndex) const
pure virtual

Get the sub-shader at a given index.

Parameters
shaderIndexThe index of the shader, from 0 to GetNumberOfShaders()-1.
Returns
The sub-shader, or null if index is out of range.

◆ GetSubShaderIndex()

virtual SInt32 Murl::Resource::IShader::GetSubShaderIndex ( IEnums::ShaderType  type,
IEnums::ShaderLanguage  language 
) const
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
typeThe shader type to query.
languageThe shader language to query.
Returns
The number of chunks.

◆ GetType()

virtual IEnums::ShaderType Murl::Resource::IShader::GetType ( ) const
pure virtual

Get the shader type.

Returns
The shader type.

◆ GetOutputLanguage()

virtual IEnums::ShaderLanguage Murl::Resource::IShader::GetOutputLanguage ( ) const
pure virtual

Get the actual output shader language.

Returns
The output shader language.

◆ GetInputLanguage()

virtual IEnums::ShaderLanguage Murl::Resource::IShader::GetInputLanguage ( ) const
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()

virtual const ConstData& Murl::Resource::IShader::GetRawData ( ) const
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()

virtual const String& Murl::Resource::IShader::GetUnoptimizedSource ( ) const
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()

virtual const String& Murl::Resource::IShader::GetUnoptimizedLog ( ) const
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()

virtual const String& Murl::Resource::IShader::GetUnoptimizedDefinitions ( ) const
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()

virtual const StringArray& Murl::Resource::IShader::GetUnoptimizedPrefix ( ) const
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()

virtual const StringArray& Murl::Resource::IShader::GetUnoptimizedCode ( ) const
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()

virtual const String& Murl::Resource::IShader::GetOptimizedSource ( ) const
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()

virtual const String& Murl::Resource::IShader::GetOptimizedLog ( ) const
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()

virtual const String& Murl::Resource::IShader::GetOptimizedDefinitions ( ) const
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()

virtual const StringArray& Murl::Resource::IShader::GetOptimizedPrefix ( ) const
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()

virtual const StringArray& Murl::Resource::IShader::GetOptimizedCode ( ) const
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()

virtual UInt32 Murl::Resource::IShader::GetNumberOfConstants ( ) const
pure virtual

Get the number of constants used by the shader.

Returns
The number of constants.

◆ GetConstantIndex()

virtual SInt32 Murl::Resource::IShader::GetConstantIndex ( const String name) const
pure virtual

Get the index of a constant with a given name.

Parameters
nameThe name to query.
Returns
The zero-bases index, or -1 if not found.

◆ GetConstantType()

virtual IEnums::ConstantType Murl::Resource::IShader::GetConstantType ( UInt32  constantIndex) const
pure virtual

Get the data type of a given constant.

Parameters
constantIndexThe constant index, from 0 to GetNumberOfConstants()-1.
Returns
The data type, or IEnums::CONSTANT_TYPE_UNDEFINED if the index is out of range.

◆ GetConstantPrecision()

virtual IEnums::ShaderVariablePrecision Murl::Resource::IShader::GetConstantPrecision ( UInt32  constantIndex) const
pure virtual

Get the precision of a given constant.

Parameters
constantIndexThe constant index, from 0 to GetNumberOfConstants()-1.
Returns
The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.

◆ GetConstantDefaultValue()

virtual String Murl::Resource::IShader::GetConstantDefaultValue ( UInt32  constantIndex) const
pure virtual

Get the default value of a given constant as a string.

Parameters
constantIndexThe constant index, from 0 to GetNumberOfConstants()-1.
Returns
The default value, or an empty string if the index is out of range.

◆ GetConstantName()

virtual String Murl::Resource::IShader::GetConstantName ( UInt32  constantIndex) const
pure virtual

Get the name of a given constant.

Parameters
constantIndexThe constant index, from 0 to GetNumberOfConstants()-1.
Returns
The constant name, or an empty string if the index is out of range.

◆ GetNumberOfConstantBuffers()

virtual UInt32 Murl::Resource::IShader::GetNumberOfConstantBuffers ( ) const
pure virtual

Get the number of constant buffers used by the shader.

Returns
The number of constant buffers.

◆ GetConstantBufferIndex()

virtual SInt32 Murl::Resource::IShader::GetConstantBufferIndex ( const String name) const
pure virtual

Get the index of a constant buffer with a given name.

Parameters
nameThe name to query.
Returns
The zero-bases index, or -1 if not found.

◆ GetConstantBufferLocation()

virtual SInt32 Murl::Resource::IShader::GetConstantBufferLocation ( UInt32  constantBufferIndex) const
pure virtual

Get the location or register number of a given constant buffer.

Parameters
constantBufferIndexThe buffer index, from 0 to GetNumberOfConstantBuffers()-1.
Returns
The location, or -1 if the index is out of range.

◆ GetConstantBufferItem()

virtual IEnums::ConstantBufferItem Murl::Resource::IShader::GetConstantBufferItem ( UInt32  constantBufferIndex) const
pure virtual

Get the predefined item of a given constant buffer.

Parameters
constantBufferIndexThe buffer index, from 0 to GetNumberOfConstantBuffers()-1.
Returns
The item, or IEnums::CONSTANT_BUFFER_ITEM_CUSTOM if the index is out of range.

◆ GetConstantBufferName()

virtual String Murl::Resource::IShader::GetConstantBufferName ( UInt32  constantBufferIndex) const
pure virtual

Get the primary variable name of a given constant buffer.

Parameters
constantBufferIndexThe buffer index, from 0 to GetNumberOfConstantBuffers()-1.
Returns
The variable name, or an empty string if the index is out of range.

◆ GetNumberOfConstantBufferAlternativeNames()

virtual UInt32 Murl::Resource::IShader::GetNumberOfConstantBufferAlternativeNames ( UInt32  constantBufferIndex) const
pure virtual

Get the number of alternative variable names of a given constant buffer.

Parameters
constantBufferIndexThe buffer index, from 0 to GetNumberOfConstantBuffers()-1.
Returns
The number of alternative names, or 0 if the index is out of range.

◆ GetConstantBufferAlternativeName()

virtual String Murl::Resource::IShader::GetConstantBufferAlternativeName ( UInt32  constantBufferIndex,
UInt32  alternativeNameIndex 
) const
pure virtual

Get an alternative variable name of a given constant buffer.

Parameters
constantBufferIndexThe buffer index, from 0 to GetNumberOfConstantBuffers()-1.
alternativeNameIndexThe name index, from 0 to GetNumberOfConstantBufferAlternativeNames()-1.
Returns
The alternative variable name, or an empty string if an index is out of range.

◆ GetNumberOfConstantBufferUniforms()

virtual UInt32 Murl::Resource::IShader::GetNumberOfConstantBufferUniforms ( UInt32  constantBufferIndex) const
pure virtual

Get the number of uniform variables present in a given constant buffer.

Parameters
constantBufferIndexThe buffer index, from 0 to GetNumberOfConstantBuffers()-1.
Returns
The number of uniforms present in the constant buffer at the given index.

◆ GetConstantBufferUniformIndex()

virtual SInt32 Murl::Resource::IShader::GetConstantBufferUniformIndex ( UInt32  constantBufferIndex,
UInt32  uniformIndex 
) const
pure virtual

Get the global index of a uniform in a given constant buffer at a given index.

Parameters
constantBufferIndexThe constant buffer index, from 0 to GetNumberOfConstantBuffers()-1.
uniformIndexThe 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()

virtual UInt32 Murl::Resource::IShader::GetNumberOfUniforms ( ) const
pure virtual

Get the number of uniform variables used by the shader.

Returns
The number of uniform variables.

◆ GetUniformIndex()

virtual SInt32 Murl::Resource::IShader::GetUniformIndex ( const String name) const
pure virtual

Get the index of a uniform with a given name.

Parameters
nameThe name to query.
Returns
The zero-bases index, or -1 if not found.

◆ GetUniformLocation()

virtual SInt32 Murl::Resource::IShader::GetUniformLocation ( UInt32  uniformIndex) const
pure virtual

Get the location, register number or constant buffer offset of a given uniform.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
Returns
The location, or -1 if the index is out of range.

◆ GetUniformConstantBufferIndex()

virtual SInt32 Murl::Resource::IShader::GetUniformConstantBufferIndex ( UInt32  uniformIndex) const
pure virtual

Get the index of the constant buffer the uniform belongs to.

Parameters
uniformIndexThe 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()

virtual IEnums::UniformItem Murl::Resource::IShader::GetUniformItem ( UInt32  uniformIndex) const
pure virtual

Get the predefined item of a given uniform.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
Returns
The item, or IEnums::UNIFORM_ITEM_CUSTOM if the index is out of range.

◆ GetUniformType()

virtual IEnums::UniformType Murl::Resource::IShader::GetUniformType ( UInt32  uniformIndex) const
pure virtual

Get the data type of a given uniform.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
Returns
The data type, or IEnums::UNIFORM_TYPE_UNDEFINED if the index is out of range.

◆ GetUniformPrecision()

virtual IEnums::ShaderVariablePrecision Murl::Resource::IShader::GetUniformPrecision ( UInt32  uniformIndex) const
pure virtual

Get the variable precision of a given uniform.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
Returns
The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.

◆ GetUniformArraySize()

virtual UInt32 Murl::Resource::IShader::GetUniformArraySize ( UInt32  uniformIndex) const
pure virtual

Get the array size of a given uniform.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
Returns
The array size, or 0 for a scalar uniform.

◆ GetUniformDefaultValue()

virtual String Murl::Resource::IShader::GetUniformDefaultValue ( UInt32  uniformIndex) const
pure virtual

Get the default value of a given uniform as a string.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
Returns
The default value, or an empty string if the index is out of range.

◆ GetUniformName()

virtual String Murl::Resource::IShader::GetUniformName ( UInt32  uniformIndex) const
pure virtual

Get the primary variable name of a given uniform.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
Returns
The variable name, or an empty string if the index is out of range.

◆ GetNumberOfUniformAlternativeNames()

virtual UInt32 Murl::Resource::IShader::GetNumberOfUniformAlternativeNames ( UInt32  uniformIndex) const
pure virtual

Get the number of alternative variable names of a given uniform.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
Returns
The number of alternative names, or 0 if the index is out of range.

◆ GetUniformAlternativeName()

virtual String Murl::Resource::IShader::GetUniformAlternativeName ( UInt32  uniformIndex,
UInt32  alternativeNameIndex 
) const
pure virtual

Get an alternative variable name of a given uniform.

Parameters
uniformIndexThe uniform index, from 0 to GetNumberOfUniforms()-1.
alternativeNameIndexThe name index, from 0 to GetNumberOfUniformAlternativeNames()-1.
Returns
The alternative variable name, or an empty string if an index is out of range.

◆ GetNumberOfAttributes()

virtual UInt32 Murl::Resource::IShader::GetNumberOfAttributes ( ) const
pure virtual

Get the number of attribute variables used by the shader.

Returns
The number of attribute variables.

◆ GetAttributeIndex()

virtual SInt32 Murl::Resource::IShader::GetAttributeIndex ( const String name) const
pure virtual

Get the index of an attribute with a given name.

Parameters
nameThe name to query.
Returns
The zero-bases index, or -1 if not found.

◆ GetAttributeLocation()

virtual SInt32 Murl::Resource::IShader::GetAttributeLocation ( UInt32  attributeIndex) const
pure virtual

Get the location or register number of a given attribute.

Parameters
attributeIndexThe attribute index, from 0 to GetNumberOfAttributes()-1.
Returns
The location, or -1 if the index is out of range.

◆ GetAttributeItem()

virtual IEnums::AttributeItem Murl::Resource::IShader::GetAttributeItem ( UInt32  attributeIndex) const
pure virtual

Get the predefined item of a given attribute.

Parameters
attributeIndexThe attribute index, from 0 to GetNumberOfAttributes()-1.
Returns
The item, or IEnums::ATTRIBUTE_ITEM_CUSTOM if the index is out of range.

◆ GetAttributeType()

virtual IEnums::AttributeType Murl::Resource::IShader::GetAttributeType ( UInt32  attributeIndex) const
pure virtual

Get the data type of a given attribute.

Parameters
attributeIndexThe attribute index, from 0 to GetNumberOfAttributes()-1.
Returns
The data type, or IEnums::ATTRIBUTE_TYPE_UNDEFINED if the index is out of range.

◆ GetAttributePrecision()

virtual IEnums::ShaderVariablePrecision Murl::Resource::IShader::GetAttributePrecision ( UInt32  attributeIndex) const
pure virtual

Get the variable precision of a given attribute.

Parameters
attributeIndexThe attribute index, from 0 to GetNumberOfAttributes()-1.
Returns
The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.

◆ GetAttributeName()

virtual String Murl::Resource::IShader::GetAttributeName ( UInt32  attributeIndex) const
pure virtual

Get the primary variable name of a given attribute.

Parameters
attributeIndexThe attribute index, from 0 to GetNumberOfAttributes()-1.
Returns
The variable name, or an empty string if the index is out of range.

◆ GetNumberOfAttributeAlternativeNames()

virtual UInt32 Murl::Resource::IShader::GetNumberOfAttributeAlternativeNames ( UInt32  attributeIndex) const
pure virtual

Get the number of alternative variable names of a given attribute.

Parameters
attributeIndexThe attribute index, from 0 to GetNumberOfAttributes()-1.
Returns
The number of alternative names, or 0 if the index is out of range.

◆ GetAttributeAlternativeName()

virtual String Murl::Resource::IShader::GetAttributeAlternativeName ( UInt32  attributeIndex,
UInt32  alternativeNameIndex 
) const
pure virtual

Get an alternative variable name of a given attribute.

Parameters
attributeIndexThe attribute index, from 0 to GetNumberOfAttributes()-1.
alternativeNameIndexThe name index, from 0 to GetNumberOfAttributeAlternativeNames()-1.
Returns
The alternative variable name, or an empty string if an index is out of range.

◆ GetNumberOfVaryings()

virtual UInt32 Murl::Resource::IShader::GetNumberOfVaryings ( ) const
pure virtual

Get the number of varying variables used by the shader.

Returns
The number of varying variables.

◆ GetVaryingIndex()

virtual SInt32 Murl::Resource::IShader::GetVaryingIndex ( const String name) const
pure virtual

Get the index of a varying with a given name.

Parameters
nameThe name to query.
Returns
The zero-bases index, or -1 if not found.

◆ GetVaryingLocation()

virtual SInt32 Murl::Resource::IShader::GetVaryingLocation ( UInt32  varyingIndex) const
pure virtual

Get the location or register number of a given varying variable.

Parameters
varyingIndexThe varying variable index, from 0 to GetNumberOfVaryings()-1.
Returns
The location, or -1 if the index is out of range.

◆ GetVaryingType()

virtual IEnums::VaryingType Murl::Resource::IShader::GetVaryingType ( UInt32  varyingIndex) const
pure virtual

Get the data type of a given varying variable.

Parameters
varyingIndexThe 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()

virtual IEnums::ShaderVariablePrecision Murl::Resource::IShader::GetVaryingPrecision ( UInt32  varyingIndex) const
pure virtual

Get the variable precision of a given varying variable.

Parameters
varyingIndexThe 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()

virtual String Murl::Resource::IShader::GetVaryingName ( UInt32  varyingIndex) const
pure virtual

Get the name of a given varying variable.

Parameters
varyingIndexThe varying variable index, from 0 to GetNumberOfVaryings()-1.
Returns
The variable name, or an empty string if the index is out of range.

◆ GetNumberOfTextures()

virtual UInt32 Murl::Resource::IShader::GetNumberOfTextures ( ) const
pure virtual

Get the number of texture (sampler) variables used by the shader.

Returns
The number of sampler variables.

◆ GetTextureIndex()

virtual SInt32 Murl::Resource::IShader::GetTextureIndex ( const String name) const
pure virtual

Get the index of a texture with a given name.

Parameters
nameThe name to query.
Returns
The zero-bases index, or -1 if not found.

◆ GetTextureLocation()

virtual SInt32 Murl::Resource::IShader::GetTextureLocation ( UInt32  textureIndex) const
pure virtual

Get the location or register number of a given texture sampler.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
Returns
The location, or -1 if the index is out of range.

◆ GetTextureType()

virtual IEnums::TextureType Murl::Resource::IShader::GetTextureType ( UInt32  textureIndex) const
pure virtual

Get the data type of a given texture sampler.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
Returns
The type, or IEnums::TEXTURE_TYPE_DEFAULT if the index is out of range.

◆ GetTextureFlags()

virtual IEnums::TextureFlagMask Murl::Resource::IShader::GetTextureFlags ( UInt32  textureIndex) const
pure virtual

Get additional flags of a given texture sampler.

Parameters
textureIndexThe 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()

virtual IEnums::ShaderVariablePrecision Murl::Resource::IShader::GetTexturePrecision ( UInt32  textureIndex) const
pure virtual

Get the variable precision of a given texture sampler.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
Returns
The precision, or IEnums::SHADER_VARIABLE_PRECISION_DEFAULT if the index is out of range.

◆ GetTextureSemantic()

virtual IEnums::TextureSemantic Murl::Resource::IShader::GetTextureSemantic ( UInt32  textureIndex,
IEnums::ColorComponent  colorComponent 
) const
pure virtual

Get the semantic of a given texture sampler for a given color channel.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
colorComponentThe color component to query.
Returns
The semantic, or IEnums::TEXTURE_SEMANTIC_UNDEFINED if the index is out of range.

◆ GetTextureSemanticIndex()

virtual UInt32 Murl::Resource::IShader::GetTextureSemanticIndex ( UInt32  textureIndex,
IEnums::ColorComponent  colorComponent 
) const
pure virtual

Get the semantic index of a given texture sampler for a given color channel.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
colorComponentThe color component to query.
Returns
The index, or 0 if the index is out of range.

◆ GetTextureDefaultValue()

virtual Float Murl::Resource::IShader::GetTextureDefaultValue ( UInt32  textureIndex,
IEnums::ColorComponent  colorComponent 
) const
pure virtual

Get the default value of a given texture sampler for a given color channel.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
colorComponentThe color component to query.
Returns
The default value, or 0.0 if the index is out of range.

◆ GetTextureName()

virtual String Murl::Resource::IShader::GetTextureName ( UInt32  textureIndex) const
pure virtual

Get the primary variable name of a given texture sampler.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
Returns
The variable name, or an empty string if the index is out of range.

◆ GetNumberOfTextureAlternativeNames()

virtual UInt32 Murl::Resource::IShader::GetNumberOfTextureAlternativeNames ( UInt32  textureIndex) const
pure virtual

Get the number of alternative variable names of a given texture sampler.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
Returns
The number of alternative names, or 0 if the index is out of range.

◆ GetTextureAlternativeName()

virtual String Murl::Resource::IShader::GetTextureAlternativeName ( UInt32  textureIndex,
UInt32  alternativeNameIndex 
) const
pure virtual

Get an alternative variable name of a given texture sampler.

Parameters
textureIndexThe sampler index, from 0 to GetNumberOfTextures()-1.
alternativeNameIndexThe 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


Copyright © 2011-2018 Spraylight GmbH.