TK_Custom_Shader_Sampler

class TK_Custom_Shader_Sampler

Handles the TKE_Custom_Shader_Sampler opcode.

TK_Custom_Shader_Sampler provides support for writing/reading the TKE_Custom_Shader_Sampler opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph supports custom shader sampler.

Inherits from: BBaseOpcodeHandler

Methods

TK_Custom_Shader_Sampler::TK_Custom_Shader_Sampler()

constructor

TK_Custom_Shader_Sampler::~TK_Custom_Shader_Sampler()
TK_Status TK_Custom_Shader_Sampler::Read(BStreamFileToolkit &tk)

virtual

Reads data from the toolkit buffer, decodes/decompresses it, and maps it to the opcode handlers data members. User-defined classes which need to write out custom data should utilize one of the available GetData() methods.

Parameters

tk: A reference to the BStreamFileToolkit object.

Returns

The result of the function call.
TK_Status TK_Custom_Shader_Sampler::Write(BStreamFileToolkit &tk)

virtual

Encodes/compresses data and writes data to the toolkit buffer. User-defined classes which need to write out custom data should utilize one of the available PutData() methods, and first write out the opcode associated with the group of binary data followed by the data itself.

Parameters

tk: A reference to the BStreamFileToolkit object.

Returns

The result of the function call.
TK_Status TK_Custom_Shader_Sampler::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

const virtual

Copies the opcode handler

Parameters

tk: A reference to the BStreamFileToolkit object.

handler: A pointer to the opcode handler object. Passed by reference.

Returns

The result of the function call.
TK_Status TK_Custom_Shader_Sampler::ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status TK_Custom_Shader_Sampler::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

void TK_Custom_Shader_Sampler::Reset()

virtual

Resets the current opcode handler. This is called by the toolkit when it is done processing an opcode. This method reinitializes any opcode handler variables and frees up temporary data.

void TK_Custom_Shader_Sampler::SetName(char const *name)

Sets the shader sampler name. Allocates the buffer and copies the shader sampler name string

void TK_Custom_Shader_Sampler::SetName(int length)

Sets the shader sampler name buffer. Allocates a buffer large enough to hold a string of ‘length’ characters

void TK_Custom_Shader_Sampler::SetFilter(TKO_Custom_Shader_Sampler_Option_Bits filter, TKO_Custom_Shader_Sampler_Filter value)

Sets the sampler filter

void TK_Custom_Shader_Sampler::SetMaxAnisotropy(int value)

Sets the sampler max anisotropy

void TK_Custom_Shader_Sampler::SetLOD(TKO_Custom_Shader_Sampler_Option_Bits lod, float value)

Sets the sampler lod

void TK_Custom_Shader_Sampler::SetAddress(TKO_Custom_Shader_Sampler_Option_Bits address, int value)

Sets the sampler address

void TK_Custom_Shader_Sampler::SetBorderColor(int value)

Sets the sampler border color

bool TK_Custom_Shader_Sampler::GetFilterString(TKO_Custom_Shader_Sampler_Filter filter_enum, char *filter)

Gets the filter string

bool TK_Custom_Shader_Sampler::GetAddressString(TKO_Custom_Shader_Sampler_Address address_enum, char *address)

Gets the address string

bool TK_Custom_Shader_Sampler::GetBorderColorString(TKO_Custom_Shader_Sampler_Border_Color_Value border_color_enum, char *border_color)

Gets the border color string

Variables

long long TK_Custom_Shader_Sampler::m_key

protected

long long

internal use; Custom shader sampler key

char *TK_Custom_Shader_Sampler::m_name

protected

char

internal use; Custom shader sampler name

int TK_Custom_Shader_Sampler::m_name_length

protected

int

internal use; current name length

int TK_Custom_Shader_Sampler::m_flags

protected

int

internal use; Flags indicating presence of optional values

int TK_Custom_Shader_Sampler::m_min_filter

protected

int

internal use; Custom shader sampler filter

int TK_Custom_Shader_Sampler::m_mag_filter

protected

int

internal use; Custom shader sampler filter

int TK_Custom_Shader_Sampler::m_mip_filter

protected

int

internal use; Custom shader sampler filter

int TK_Custom_Shader_Sampler::m_max_anisotropy

protected

int

internal use; Custom shader sampler max anisotropy

float TK_Custom_Shader_Sampler::m_min_lod

protected

float

internal use; Custom shader sampler min lod

float TK_Custom_Shader_Sampler::m_max_lod

protected

float

internal use; Custom shader sampler max lod

int TK_Custom_Shader_Sampler::m_width_address

protected

int

internal use; Custom shader sampler width address

int TK_Custom_Shader_Sampler::m_height_address

protected

int

internal use; Custom shader sampler height address

int TK_Custom_Shader_Sampler::m_border_color

protected

int

internal use; Custom shader sampler border color