TK_Custom_Shader_Texture
-
class
TK_Custom_Shader_Texture Handles the TKE_Custom_Shader_Texture opcode.
TK_Custom_Shader_Textureprovides support for writing/reading the TKE_Custom_Shader_Texture opcode object to/from an HSF file.The HOOPS/3dGS scene-graph supports custom shader texture.
Inherits from:
BBaseOpcodeHandler
Methods
-
TK_Custom_Shader_Texture::TK_Custom_Shader_Texture() constructor
-
TK_Custom_Shader_Texture::~TK_Custom_Shader_Texture()
-
TK_Status
TK_Custom_Shader_Texture::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_Texture::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_Texture::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_Texture::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_Custom_Shader_Texture::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
void
TK_Custom_Shader_Texture::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_Texture::SetName(char const *name) Sets the texture name. Allocates the buffer and copies the texture name string
-
void
TK_Custom_Shader_Texture::SetName(int length) Sets the texture name buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
void
TK_Custom_Shader_Texture::SetWidth(int value) Sets the texture width
-
void
TK_Custom_Shader_Texture::SetHeight(int value) Sets the texture height
-
void
TK_Custom_Shader_Texture::SetDepth(int value) Sets the texture depth
-
void
TK_Custom_Shader_Texture::SetMipmapLevels(int value) Sets the texture mipmap levels
-
void
TK_Custom_Shader_Texture::SetFormat(int format) Sets the texture format.
-
bool
TK_Custom_Shader_Texture::GetFormatEnum(char const *format, TKO_Custom_Shader_Texture_Format &format_enum) Gets the format enum
-
bool
TK_Custom_Shader_Texture::GetFormatString(TKO_Custom_Shader_Texture_Format format_enum, char *format) Gets the format string
-
void
TK_Custom_Shader_Texture::SetData(unsigned char const *data, int length) Sets the texture data
-
void
TK_Custom_Shader_Texture::SetData(int length) Sets the texture data length
-
void
TK_Custom_Shader_Texture::SetOptions(char const *options) Sets the texture options. Allocates the buffer and copies the texture options string
-
void
TK_Custom_Shader_Texture::SetOptions(int length) Sets the texture options buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
Variables
-
long long
TK_Custom_Shader_Texture::m_key protected
long longinternal use; Custom shader texture key
-
char *
TK_Custom_Shader_Texture::m_name protected
charinternal use; Custom shader texture name
-
int
TK_Custom_Shader_Texture::m_name_length protected
intinternal use; current name length
-
int
TK_Custom_Shader_Texture::m_width protected
intinternal use; current width
-
int
TK_Custom_Shader_Texture::m_height protected
intinternal use; current height
-
int
TK_Custom_Shader_Texture::m_depth protected
intinternal use; current depth
-
int
TK_Custom_Shader_Texture::m_mipmap_levels protected
intinternal use; current mipmap levels
-
int
TK_Custom_Shader_Texture::m_format protected
intinternal use; Custom shader texture format
-
unsigned char *
TK_Custom_Shader_Texture::m_data protected
unsigned charinternal use; Custom shader texture data
-
int
TK_Custom_Shader_Texture::m_data_length protected
intinternal use; Custom shader texture data length
-
int
TK_Custom_Shader_Texture::m_flags protected
intinternal use; Flags indicating presence of optional values
-
char *
TK_Custom_Shader_Texture::m_options protected
charinternal use; Custom shader texture options
-
int
TK_Custom_Shader_Texture::m_options_length protected
intinternal use; current options length