PixelShaderKey

class HPS::PixelShaderKey : public HPS::ShaderKey

The PixelShaderKey class contains objects for importing pixel shader source files and enumerations for shaders in Visualize.

Public Functions

inline virtual HPS::Type ObjectType() const

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns

The declared type of the object in question, which may differ from the true, underlying type.

PixelShaderKey &operator=(PixelShaderKey &&in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this PixelShaderKey thereby avoiding a copy.

Parameters

in_that – An rvalue reference to a PixelShaderKey to take the impl from.

Returns

A reference to this PixelShaderKey.

PixelShaderKey &operator=(PixelShaderKey const &in_that)

Associate this PixelShaderKey with the same underlying impl as the source PixelShaderKey.

Parameters

in_that – The source PixelShaderKey for the assignment.

Returns

A reference to this PixelShaderKey.

PixelShaderKey()

The default constructor creates an uninitialized PixelShaderKey object. The Type() function will return Type::None.

PixelShaderKey(Key const &in_that)

This constructor creates a PixelShaderKey object that shares the underlying smart-pointer of the source Key. The copy will only be successful if the source key is really a type of pixel shader definition. Otherwise the copy will fail and the resulting PixelShaderKey will be invalid.

Parameters

in_that – The source Key to copy.

PixelShaderKey(PixelShaderKey &&in_that)

The move constructor creates a PixelShaderKey by transferring the underlying impl of the rvalue reference to this PixelShaderKey thereby avoiding a copy and allocation.

Parameters

in_that – An rvalue reference to a PixelShaderKey to take the impl from.

PixelShaderKey(PixelShaderKey const &in_that)

The copy constructor creates a PixelShaderKey object that shares the underlying smart-pointer of the source PixelShaderKey.

Parameters

in_that – The source PixelShaderKey to copy.

void Set(PixelShaderKit const &in_kit)

Redefine the shader for this PixelShaderKey.

Parameters

in_kit – The new shader for this PixelShaderKey.

PixelShaderKey &SetShaderTextures(ShaderTextureKeyArray const &in_shader_texture, ShaderSamplerKeyArray const &in_shader_sampler)

Sets the textures and samplers required by the shader at runtime. Only valid for modern custom shaders.

void Show(PixelShaderKit &out_kit) const

Shows the shader for this PixelShaderKey.

Parameters

out_kit – The shader for this PixelShaderKey.

bool ShowShaderTextures(ShaderTextureKeyArray &out_shader_texture, ShaderSamplerKeyArray &out_shader_sampler) const

Shows the textures and samplers associated with the shader if present. Only valid for modern custom shaders. Returns false if no texture for the target exists on this segment.

PixelShaderKey &UnsetShaderTextures()

Removes the textures and samplers from the shader. Only valid for modern custom shaders.

~PixelShaderKey()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::PixelShaderKey