Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deShader Class Reference

`#include <deShader_priv.hpp>`

Inheritance diagram for deShader:

[legend]
Collaboration diagram for deShader:

[legend]
List of all members.

## Public Member Functions
| deShader ()
deBoolean | Assemble (char *Code, void(*ErrorCallback)(long LineNumber, char *Error))
deBoolean | Disassemble (deString *Code)
ShaderType | GetShaderType () const
| Returns the shader's type.
long | GetInstructionCount () const
| Returns the number of instructions the shader contains.
const deTArray< deShaderInstruction > * | GetInstructions () const
| Return the shader's instruction array.
long | GetConstantCount () const
| Return the number of constants the shader contains.
const deTArray< deShaderConstant > * | GetConstants () const
| Return the shader's constant array.
deBoolean | Write (IdeFile *File) const
deBoolean | Read (IdeFile *File)
deBoolean | SetDriverShader (void *Shader)
void * | GetDriverShader () const
| Called by the driver. Returns the driver's private data.
## Protected Member Functions
| ~deShader ()
## Private Member Functions
void | GetNextWord (char **String, char *Word)
deBoolean | GetArgument (char **String, deString *Argument)
deBoolean | GetLastArgument (char **String, deString *Argument)
long | GetArrayArgumentIndex (void(*ErrorCallback)(long LineNumber, char *Error), deString *Argument)
long | GetArgumentOffset (long ArgumentNumber, deString *Argument, deString *OutArgument)
void | GotoNextLine (char **String)
void | Error (void(*ErrorCallback)(long LineNumber, char *Error), char *Error)
deBoolean | ParseInstruction (void(*ErrorCallback)(long LineNumber, char *Error), char **Code, char *InstructionName)
deBoolean | ParseConstantDeclaration (void(*ErrorCallback)(long LineNumber, char *Error), char **Code, deShaderInstructionType Instruction)
void | DisassembleIndexAndOffset (long ArgumentNumber, DWORD IndexBase, DWORD Argument, deString *Code)
deBoolean | DisassembleArgument (long ArgumentNumber, DWORD Argument, deString *Code)
deBoolean | DisassembleInstruction (IdeShader::deShaderInstruction *Instruction, deString *Code)
deBoolean | DisassembleConstant (IdeShader::deShaderConstant *Constant, deString *Code)
deBoolean | SetShaderType ()
## Private Attributes
deTArray< deShaderInstruction > | m_Instructions
deTArray< deShaderConstant > | m_Constants
ShaderType | m_ShaderType
long | m_CurrentLine
long | m_InstructionCount
long | m_ConstantCount
void * | m_DriverShader

## Constructor & Destructor Documentation

deShader::~deShader | ( |  | ) | `[protected]`

deShader::deShader | ( |  | ) |

## Member Function Documentation

deBoolean deShader::Assemble | ( | char * | Code,
|  | void(* | ErrorCallback)(long LineNumber, char *Error)
| ) | `[virtual]`

  | Assembles a shader. Parameters:
  Code | [in] Shader code to assemble.
  ErrorCallback | [in] Callback function that is called when parsing errors occur.
Implements IdeShader.

deBoolean deShader::Disassemble | ( | deString * | Code | ) | `[virtual]`

  | Disassembles the shader. Parameters:
  Code | [out] A pointer to a valid deString to put the shader code in.
Implements IdeShader.

deBoolean deShader::DisassembleArgument | ( | long | ArgumentNumber,
|  | DWORD | Argument,
|  | deString * | Code
| ) | `[private]`

deBoolean deShader::DisassembleConstant | ( | IdeShader::deShaderConstant * | Constant,
|  | deString * | Code
| ) | `[private]`

void deShader::DisassembleIndexAndOffset | ( | long | ArgumentNumber,
|  | DWORD | IndexBase,
|  | DWORD | Argument,
|  | deString * | Code
| ) | `[private]`

deBoolean deShader::DisassembleInstruction | ( | IdeShader::deShaderInstruction * | Instruction,
|  | deString * | Code
| ) | `[private]`

void deShader::Error | ( | void(* | ErrorCallback)(long LineNumber, char *Error),
|  | char * | Error
| ) | `[private]`

deBoolean deShader::GetArgument | ( | char ** | String,
|  | deString * | Argument
| ) | `[private]`

long deShader::GetArgumentOffset | ( | long | ArgumentNumber,
|  | deString * | Argument,
|  | deString * | OutArgument
| ) | `[private]`

long deShader::GetArrayArgumentIndex | ( | void(* | ErrorCallback)(long LineNumber, char *Error),
|  | deString * | Argument
| ) | `[private]`

long deShader::GetConstantCount | ( |  | ) | const`[virtual]`

| Return the number of constants the shader contains. Implements IdeShader.

const deTArray< IdeShader::deShaderConstant > * deShader::GetConstants | ( |  | ) | const`[virtual]`

| Return the shader's constant array. Implements IdeShader.

void * deShader::GetDriverShader | ( |  | ) | const`[virtual]`

| Called by the driver. Returns the driver's private data. Implements IdeShader.

long deShader::GetInstructionCount | ( |  | ) | const`[virtual]`

| Returns the number of instructions the shader contains. Implements IdeShader.

const deTArray< IdeShader::deShaderInstruction > * deShader::GetInstructions | ( |  | ) | const`[virtual]`

| Return the shader's instruction array. Implements IdeShader.

deBoolean deShader::GetLastArgument | ( | char ** | String,
|  | deString * | Argument
| ) | `[private]`

void deShader::GetNextWord | ( | char ** | String,
|  | char * | Word
| ) | `[private]`

deShader::ShaderType deShader::GetShaderType | ( |  | ) | const`[virtual]`

| Returns the shader's type. Implements IdeShader.

void deShader::GotoNextLine | ( | char ** | String | ) | `[private]`

deBoolean deShader::ParseConstantDeclaration | ( | void(* | ErrorCallback)(long LineNumber, char *Error),
|  | char ** | Code,
|  | deShaderInstructionType | Instruction
| ) | `[private]`

deBoolean deShader::ParseInstruction | ( | void(* | ErrorCallback)(long LineNumber, char *Error),
|  | char ** | Code,
|  | char * | InstructionName
| ) | `[private]`

deBoolean deShader::Read | ( | IdeFile * | File | ) | `[virtual]`

  | Reads an assembled shader from a file Parameters:
  FileSystem | [in] A pointer to a valid IdeFileSystem to read a shader from
Implements IdeShader.

deBoolean deShader::SetDriverShader | ( | void * | Shader | ) | `[virtual]`

  | Called by the driver to set driver specific shader data Parameters:
  Shader | [in] A pointer to the driver's private data
Implements IdeShader.

deBoolean deShader::SetShaderType | ( |  | ) | `[private]`

deBoolean deShader::Write | ( | IdeFile * | File | ) | const`[virtual]`

  | Writes the assembled shader to a file Parameters:
  FileSystem | [in] A pointer to a valid IdeFileSystem to write to
Implements IdeShader.

## Member Data Documentation

long deShader::m_ConstantCount`[private]`

deTArray<deShaderConstant> deShader::m_Constants`[private]`

long deShader::m_CurrentLine`[private]`

void* deShader::m_DriverShader`[private]`

long deShader::m_InstructionCount`[private]`

deTArray<deShaderInstruction> deShader::m_Instructions`[private]`

ShaderType deShader::m_ShaderType`[private]`

The documentation for this class was generated from the following files:

- deShader_priv.hpp
- Shader.cpp