#include <RmEffect.h>
Inheritance diagram for RmShader:

Public Member Functions | |
| RmShader () | |
| Default Constructor. | |
| virtual | ~RmShader () |
| Destructor. | |
| virtual void | Update (RmNodeUpdateType nodeUpdateType, RmNode *pRmUpdateRootNode) |
| Update. | |
| virtual bool | LoadXMLData (int hDoc, const RM_TCHAR *strXPath, const RM_TCHAR *strRmXMLVersion) |
| Load node data from XML. | |
| virtual bool | SaveXMLData (int hDoc, const RM_TCHAR *strXPath) |
| Save node data to XML. | |
| virtual const RM_TCHAR * | GetDescription () |
| virtual RmNode * | Clone (bool bIncludeLoadedData) |
| Clone this node. | |
| virtual bool | IsHighLevel () |
| Is high level. | |
| virtual void | DeleteConstant (int nRegister) |
| Delete shader constant. | |
| virtual void | DeleteConstant (const RM_TCHAR *strConstantName) |
| Delete constant. | |
| virtual void | DeleteAllConstants () |
| Delete alll constants. | |
| virtual bool | AddConstant (RmShaderConstant *pConstant) |
| Add constant. | |
| virtual RmShaderConstant * | GetConstant (int nRegister) |
| Get constant. | |
| virtual RmShaderConstant * | GetConstant (const RM_TCHAR *strConstantName) |
| Get constant. | |
| virtual RmShaderConstant * | GetConstantByIndex (int nIndex) |
| Get constant. | |
| virtual int | GetNumConstants () const |
| Get number of constants. | |
| virtual RmShaderConstantListIterator | BeginConstants () |
| Begin iterator. | |
| virtual RmShaderConstantListConstIterator | BeginConstants () const |
| Begin iterator. | |
| virtual RmShaderConstantListIterator | EndConstants () |
| End iterator. | |
| virtual RmShaderConstantListConstIterator | EndConstants () const |
| End iterator. | |
| void | SetCode (const RM_TCHAR *strCode) |
| Set code. | |
| const RmStringT & | GetShaderCode () const |
| Get shader code. | |
| void | GetMaxInstructionInfo (int &nMaxALUInstructions, int &nMaxTexInstructions) |
| Get max instruction info. | |
| void | SetMaxInstructionInfo (int nMaxALUInstructions, int nMaxTexInstructions) |
| Set max instruction info. | |
| RM_TCHAR * | GetFullName () |
| Get full name. | |
| RM_TCHAR * | GetFullNameWithAPI () |
| Get fulll name with API. | |
| int | GetHandle () |
| Get handle. | |
| void | SetHandle (int nHandle) |
| Set Handle. | |
| bool | IsModified () const |
| Is modified. | |
| void | SetModified (bool bModified) |
| Set modify flag. | |
| bool | IsPixelShader () |
| Is pixekl shader. | |
| bool | IsVertexShader () |
| Is vertex shader. | |
| void | SetIsPixelShader (bool bPixelShader) |
| Set is pixel shader. | |
Protected Member Functions | |
| virtual void | CopyNodeData (RmNode *pDestinationNode, bool bIncludeLoadedData) |
| Copy node data. | |
| virtual void | SetType (const RM_TCHAR *strNewType) |
| Set type. | |
| virtual RmNodeTypeChildRuleList * | GetNodeTypeChildRuleList () |
| Parent / Child rule list function. | |
| virtual void | SetNodeTypeChildRuleList (RmNodeTypeChildRuleList *pRmNodeChildRuleList) |
| Sets the node child rule list for the given node. | |
Protected Attributes | |
| RmStringT | m_strCode |
| Shader. | |
| bool | m_bModified |
| Denotes whether this shader has been modified and needs to be compiled before using. | |
| int | m_nHandle |
| Handle to the compiled. | |
| RmShaderConstantList | m_constantList |
| List of shader constants (variables. | |
| bool | m_bPixelShader |
| A flag that denotes whether this shader is a pixel or a vertex shader. | |
| int | m_nMaxALUInstructions |
| Max number of arithmetic shader instructions. | |
| int | m_nMaxTexInstructions |
| Max number of texture shader instructions. | |
RmShader is the base class for representing shaders in the RenderMonkey effect database. However RmShader is n o t an abstract class since assembly shaders can be represented by using this class. High level shaders will be represented by other derived classes specific for their API.
|
|
Default Constructor. Default constructor |
|
|
Destructor. Destructor |
|
|
Add constant. Add new constant to the shader. Note that if the shader already has a constant with the same name or mapped to the same register (unless its register nIndex is set to -1) the old constant node will be deleted and replaced with the newly specified constant.
|
|
|
Begin iterator. Begin Iterator
|
|
|
Begin iterator. Begin Iterator
|
|
|
Clone this node. Creates a clone of this node
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
|
||||||||||||
|
Copy node data. Copies this node's contents (not including children) into the destination node. See RmNode::CopyNodeData for details
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
|
|
Delete alll constants. Delete all constants for this shader
|
|
|
Delete constant. Delete shader constant with a given name
|
|
|
Delete shader constant. Delete shader constant linked to a given register (by nIndex)
|
|
|
End iterator. End Iterator
|
|
|
End iterator. End Iterator
|
|
|
Get constant. Retrieve shader constant given its name. Returns NULL if no matching constant is found
|
|
|
Get constant. Retrieve shader constant that's mapped to the specified register (using register nIndex). Returns NULL if no matching constant is found.
|
|
|
Get constant. Retrieve shader constant by nIndex.
|
|
|
Returns description of the node: used for displaying a tooltip in the workspace tree view for the given node.
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
|
|
Get full name. Retrieve full name of the shader in the form "Effect_Name / Pass_Name / Shader_Name "
|
|
|
Get fulll name with API. Retrieve full name of the shader with the API string for the shader in the form: "API(x) /Effect_Name / Pass_Name / Shader_Name "
|
|
|
Get handle. Retrieve handle to the compiled shader
|
|
||||||||||||
|
Get max instruction info. Returns the maximum instruction counts (set by compiler)
|
|
|
Parent / Child rule list function. Retrieves the rule list for adding child nodes for a given node type
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
|
|
Get number of constants. Returns number of samplers |
|
|
Get shader code. Retrieve shader code string
|
|
|
Is high level. Returns whether this shader is an assembly shader or a high level language shader. True means it is a high level language shader and false means that it's an assembly shader
RmShader itself is always an assembly shader: Reimplemented in RmHLShader. |
|
|
Is modified. Returns whether a shader has been modified
|
|
|
Is pixekl shader. Returns whether this shader node is a pixel shader
|
|
|
Is vertex shader. Returns whether this shader node is a vertex shader
|
|
||||||||||||||||
|
Load node data from XML. Loads versioned XML node data. Note that this method will only load the contents of each node, not the data for all of the children nodes. Each child will have its own XML loading function called by the API.
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
|
||||||||||||
|
Save node data to XML. Saves node's contents to XML. Note that this method will only save the contents of each node, not the data for all of the children nodes. Each child will have its own XML saving function called by the API.
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
|
|
Set code. Set new code string - if code string already exists, it gets replaced
|
|
|
Set Handle. Set handle to the compiled shader resource
|
|
|
Set is pixel shader. Sets whether this shader node is a pixel shader: true means that it is a pixel shader, false - that it's a vertex shader
|
|
||||||||||||
|
Set max instruction info. Sets the maximum instruction counts (set by compiler)
|
|
|
Set modify flag. Sets whether the shader has been modified or not
|
|
|
Sets the node child rule list for the given node. Sets the child addition rule list for the given node.
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
|
|
Set type. Compose the type string chain
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
|
||||||||||||
|
Update. Updates the internal values of the node
Reimplemented from RmNode. Reimplemented in RmHLShader, RmHLSLShader, and RmGLShader. |
1.3.6