Skip to content

class ShaderParameterTexture

ShaderParameterTexture defines a texture which is used by the evaluation shader to fetch data from a bound texture.

Properties

PropertyDescription
NameThe name of the ShaderParameterTexture object. (Inherited from Object)
TextureFormatThe format of the texture object type, as exposed to the shader. Note that this will not modify the contents of the texture, only modify the type which is exposed in the shader. Only a subset of the types are allowed, and is shader language specific, and is exposed differently in HLSL vs GLSL. In general, 4-vector components of signed and unsigned ints, as well as floats are always allowed.
TextureNameThe name of the texture in the texture table which is bound to the texture variable.

Methods

MethodDescription
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
GetClassGet the name of the ShaderParameterTexture class. (Inherited from Object)
IsAReturns true if ShaderParameterTexture is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the ShaderParameterTexture object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the ShaderParameterTexture object is valid. (Inherited from Object)
NonNullReturns true if the ShaderParameterTexture object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the ShaderParameterTexture object to the log. (Inherited from Object)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)

Static methods

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast makes sure the input object is of a class that can be cast into spShaderParameterTexture, and if this is the case, returns the object cast into spShaderParameterTexture. (Inherited from Object)

Properties details

Name

The name of the ShaderParameterTexture object. (Inherited from Object)

Syntax

cpp
// Setter
void SetName( const char * name ) const;

// Getter
spString GetName() const;

SetName parameters

TypeNameMinMaxDescription
const char *nameNew name of the object.

GetName return value

Type: spString

TextureFormat

The format of the texture object type, as exposed to the shader. Note that this will not modify the contents of the texture, only modify the type which is exposed in the shader. Only a subset of the types are allowed, and is shader language specific, and is exposed differently in HLSL vs GLSL. In general, 4-vector components of signed and unsigned ints, as well as floats are always allowed.

Syntax

cpp
// Setter
void SetTextureFormat( Simplygon::EAttributeFormat value ) const;

// Getter
Simplygon::EAttributeFormat GetTextureFormat() const;

SetTextureFormat parameters

TypeNameMinMaxDescription
EAttributeFormatvalueThe format.

GetTextureFormat return value

Type: EAttributeFormat

Default: F32vec4

KeyValueComment
U840971 unsigned 8-bit value.
S843531 signed 8-bit value.
U8vec281932 unsigned 8-bit values.
S8vec284492 signed 8-bit values.
U8vec3122893 unsigned 8-bit values.
S8vec3125453 signed 8-bit values.
U8vec4163854 unsigned 8-bit values.
S8vec4166414 signed 8-bit values.
U1640981 unsigned 16-bit value.
S1643541 signed 16-bit value.
U16vec281942 unsigned 16-bit values.
S16vec284502 signed 16-bit values.
U16vec3122903 unsigned 16-bit values.
S16vec3125463 signed 16-bit values.
U16vec4163864 unsigned 16-bit values.
S16vec4166424 signed 16-bit values.
U3241001 unsigned 32-bit value.
S3243561 signed 32-bit value.
F3246121 floating-point 32-bit value.
U32vec281962 unsigned 32-bit values.
S32vec284522 signed 32-bit values.
F32vec287082 floating-point 32-bit values.
U32vec3122923 unsigned 32-bit values.
S32vec3125483 signed 32-bit values.
F32vec3128043 floating-point 32-bit values.
U32vec4163884 unsigned 32-bit values.
S32vec4166444 signed 32-bit values.
F32vec4169004 floating-point 32-bit values.
U6441041 unsigned 64-bit value.
S6443601 signed 64-bit value.
F6446161 floating-point 64-bit value.
F64vec287122 floating-point 64-bit values.
F64vec3128083 floating-point 64-bit values.
F64vec4169044 floating-point 64-bit values.

TextureName

The name of the texture in the texture table which is bound to the texture variable.

Syntax

cpp
// Setter
void SetTextureName( const char * value ) const;

// Getter
spString GetTextureName() const;

SetTextureName parameters

TypeNameMinMaxDescription
const char *valueThe desired texture to bind to.

GetTextureName return value

Type: spString

Methods details

AddObserver

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

Syntax

cpp
rid AddObserver( const spObserver & observer ) const;

Parameters

TypeNameMinMaxDescription
ObserverobserverObserver is the object that will receive events.

Return value

Type: rid

GetClass

Get the name of the ShaderParameterTexture class. (Inherited from Object)

Syntax

cpp
spString GetClass() const;

Parameters

GetClass takes no parameters.

Return value

Type: spString

IsA

Returns true if ShaderParameterTexture is a or is a descendant of the class named as the type parameter. (Inherited from Object)

Syntax

cpp
bool IsA( const char * type ) const;

Parameters

TypeNameMinMaxDescription
const char *typeName of the class to check if ShaderParameterTexture is, or is a descendant of.

Return value

Type: bool

IsNull

Returns true if the ShaderParameterTexture object is invalid. (Inherited from Object)

Syntax

cpp
bool IsNull() const;

Parameters

IsNull takes no parameters.

Return value

Type: bool

IsSameObjectAs

Returns true if the ShaderParameterTexture object is valid. (Inherited from Object)

Syntax

cpp
bool IsSameObjectAs( const spObject & object ) const;

Parameters

TypeNameMinMaxDescription
ObjectobjectObject to compare with.

Return value

Type: bool

NonNull

Returns true if the ShaderParameterTexture object is valid. (Inherited from Object)

Syntax

cpp
bool NonNull() const;

Parameters

NonNull takes no parameters.

Return value

Type: bool

PrintInfo

Prints the content/info of the ShaderParameterTexture object to the log. (Inherited from Object)

Syntax

cpp
void PrintInfo() const;

Parameters

PrintInfo takes no parameters.

RemoveObserver

Removes a previously added observer object. (Inherited from Object)

Syntax

cpp
void RemoveObserver( rid observerId ) const;

Parameters

TypeNameMinMaxDescription
ridobserverIdObserverId is the id returned by AddObserver when the observer was added.

Static methods details

IsClassA

Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)

Syntax

cpp
static bool IsClassA( const char * type ) const;

Parameters

TypeNameMinMaxDescription
const char *typeName of the class to check if the class is, or is a descendant of.

Return value

Type: bool

SafeCast

SafeCast makes sure the input object is of a class that can be cast into spShaderParameterTexture, and if this is the case, returns the object cast into spShaderParameterTexture. (Inherited from Object)

Syntax

cpp
static spShaderParameterTexture SafeCast( const spObject & object ) const;

Parameters

TypeNameMinMaxDescription
ObjectobjectObject to cast.

Return value

Type: ShaderParameterTexture