TK_Custom_Shader_Definition
-
class
TK_Custom_Shader_Definition Handles the TKE_Custom_Shader_Definition opcode.
TK_Custom_Shader_Definitionprovides support for writing/reading the TKE_Custom_Shader_Definition opcode object to/from an HSF file.The HOOPS/3dGS scene-graph supports custom shader.
Inherits from:
BBaseOpcodeHandlerIndex
Methods
Clone()GetStageEnum()GetStageString()Read()ReadAscii()Reset()SetInputs()SetName()SetName()SetShaderStage()SetSource()SetSource()SetTextures()SetUniforms()SetUniforms()SetVertexOutputs()SetVertexOutputs()TK_Custom_Shader_Definition()Write()WriteAscii()~TK_Custom_Shader_Definition()
Variables
Methods
-
TK_Custom_Shader_Definition::TK_Custom_Shader_Definition() constructor
-
TK_Custom_Shader_Definition::~TK_Custom_Shader_Definition()
-
TK_Status
TK_Custom_Shader_Definition::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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_Custom_Shader_Definition::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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_Custom_Shader_Definition::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const const virtual
Copies the opcode handler
Parameters
tk: A reference to the
BStreamFileToolkitobject.handler: A pointer to the opcode handler object. Passed by reference.
Returns
The result of the function call.
-
TK_Status
TK_Custom_Shader_Definition::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_Custom_Shader_Definition::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
void
TK_Custom_Shader_Definition::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_Definition::SetName(char const *name) Sets the shader name. Allocates the buffer and copies the shader name string
-
void
TK_Custom_Shader_Definition::SetName(int length) Sets the shader name buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
void
TK_Custom_Shader_Definition::SetShaderStage(int stage) Sets the shader stage
-
bool
TK_Custom_Shader_Definition::GetStageEnum(char const *stage, TKO_Custom_Shader_Def_Stage &stage_enum) Gets the primitive enum
-
bool
TK_Custom_Shader_Definition::GetStageString(TKO_Custom_Shader_Def_Stage stage_enum, char *stage) Gets the primitive string
-
void
TK_Custom_Shader_Definition::SetSource(char const *source) Sets the shader source. Allocates the buffer and copies the shader source string
-
void
TK_Custom_Shader_Definition::SetSource(int length) Sets the shader source buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
void
TK_Custom_Shader_Definition::SetVertexOutputs(char const *vertex_outputs) Sets the shader vertex outputs. Allocates the buffer and copies the shader vertex outputs string
-
void
TK_Custom_Shader_Definition::SetVertexOutputs(int length) Sets the shader vertex outputs buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
void
TK_Custom_Shader_Definition::SetInputs(int inputs) Sets the shader inputs
-
void
TK_Custom_Shader_Definition::SetUniforms(char const *uniforms) Sets the shader uniforms. Allocates the buffer and copies the shader uniforms string
-
void
TK_Custom_Shader_Definition::SetUniforms(int length) Sets the shader uniforms buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
void
TK_Custom_Shader_Definition::SetTextures(int length) Sets the shader textures array size. Allocates an array large enough to hold an array of ‘length’ integer
Variables
-
long long
TK_Custom_Shader_Definition::m_key protected
long longinternal use; Custom shader definition key
-
char *
TK_Custom_Shader_Definition::m_name protected
charinternal use; Custom shader definition name
-
int
TK_Custom_Shader_Definition::m_shader_stage protected
intinternal use; Custom shader stage
-
char *
TK_Custom_Shader_Definition::m_source protected
charinternal use; Custom shader source code
-
int
TK_Custom_Shader_Definition::m_name_length protected
intinternal use; current name length
-
int
TK_Custom_Shader_Definition::m_shader_stage_length protected
intinternal use; current stage length
-
int
TK_Custom_Shader_Definition::m_source_length protected
intinternal use; current source length
-
int
TK_Custom_Shader_Definition::m_flags protected
intinternal use; Flags indicating presence of optional values
-
char *
TK_Custom_Shader_Definition::m_vertex_outputs protected
charinternal use; Custom shader vertex outputs
-
int
TK_Custom_Shader_Definition::m_inputs protected
intinternal use; Custom shader inputs
-
char *
TK_Custom_Shader_Definition::m_uniforms protected
charinternal use; Custom shader uniforms
-
int
TK_Custom_Shader_Definition::m_vertex_outputs_length protected
intinternal use; current vertex outputs length
-
int
TK_Custom_Shader_Definition::m_uniforms_length protected
intinternal use; current uniforms length
-
int *
TK_Custom_Shader_Definition::m_textures protected
intinternal use; Custom shader textures
-
int *
TK_Custom_Shader_Definition::m_samplers protected
intinternal use; Custom shader samplers
-
int
TK_Custom_Shader_Definition::m_textures_length protected
intinternal use; current textures/samplers length
-
ID_Key *
TK_Custom_Shader_Definition::m_texture_keys protected
-
ID_Key *
TK_Custom_Shader_Definition::m_sampler_keys protected