Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmHLShader Class Reference

HL Shader. More...

#include <RmEffect.h>

Inheritance diagram for RmHLShader:

RmShader RmNode RmGLShader RmHLSLShader List of all members.

Public Member Functions

 RmHLShader ()
 Default Constructor.

virtual ~RmHLShader ()
 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 RmNodeClone (bool bIncludeLoadedData)
 Clone this node.

virtual bool IsHighLevel ()
 Is high level.

virtual RmSamplerGetSampler (const RM_TCHAR *strSamplerName)
 Get sampler.

virtual void DeleteSampler (const RM_TCHAR *strSamplerName)
 Delete sampler.

virtual bool AddSampler (RmSampler *pSampler)
 Add sampler.

virtual void DeleteAllSamplers ()
 Delete all samplers.

virtual int GetNumSamplers () const
 Get number of samplers.

virtual RmSamplerListIterator BeginSamplers ()
 Begin iterator.

virtual RmSamplerListConstIterator BeginSamplers () const
 Begin iterator.

virtual RmSamplerListIterator EndSamplers ()
 End iterator.

virtual RmSamplerListConstIterator EndSamplers () const
 End iterator.

virtual void AddParameterDeclaration (RmNode *pParameterNode, int nRegisterIndex)
 Add parameter declaration.


Protected Member Functions

virtual void CopyNodeData (RmNode *pDestinationNode, bool bIncludeLoadedData)
 Copy node data.

virtual RmNodeTypeChildRuleListGetNodeTypeChildRuleList ()
 Parent / Child rule list function.

virtual void SetNodeTypeChildRuleList (RmNodeTypeChildRuleList *pRmNodeChildRuleList)
 Sets the node child rule list for the given node.

virtual void SetType (const RM_TCHAR *strNewType)
 Set type.


Protected Attributes

RmSamplerList m_samplerList
 List of samplers attached to the shader (HLSL only).


Detailed Description

HL Shader.

RmHLShader is the base class for representing high level shader nodes in the database. It derives functionality from RmShader, however it can't be instantiated as you should use an appropriate derived class specific for the shader API.


Constructor & Destructor Documentation

RmHLShader::RmHLShader  ) 
 

Default Constructor.

Default constructor

virtual RmHLShader::~RmHLShader  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

virtual void RmHLShader::AddParameterDeclaration RmNode pParameterNode,
int  nRegisterIndex
[inline, virtual]
 

Add parameter declaration.

Virtual method to add correct declaration for the specified parameter to the shader text The input parameter can be either a shader constant or a sampler node.

Parameters:
pParameterNode ParameterNode to add
nRegisterIndex Register index
Returns:
None

Reimplemented in RmHLSLShader, and RmGLShader.

virtual bool RmHLShader::AddSampler RmSampler pSampler  )  [virtual]
 

Add sampler.

Add new sampler mapping. Note that if this shader already contains a sampler with the same name it, the old instance will be replaced with the new.

Parameters:
pSampler Sampler to add
Returns:
True on success

virtual RmSamplerListConstIterator RmHLShader::BeginSamplers  )  const [inline, virtual]
 

Begin iterator.

Begin iterator

Returns:
Begin iterator

virtual RmSamplerListIterator RmHLShader::BeginSamplers  )  [inline, virtual]
 

Begin iterator.

Begin iterator

Returns:
Begin iterator

virtual RmNode* RmHLShader::Clone bool  bIncludeLoadedData  )  [virtual]
 

Clone this node.

Creates a clone of this node

Returns:
Cloned node. Returns NULL if cloning failed.

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.

virtual void RmHLShader::CopyNodeData RmNode pDestinationNode,
bool  bIncludeLoadedData
[protected, virtual]
 

Copy node data.

Copies this node's contents (not including children) into the destination node. See RmNode::CopyNodeData for details

Parameters:
pDestinationNode the destination node
Returns:
None

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.

virtual void RmHLShader::DeleteAllSamplers  )  [virtual]
 

Delete all samplers.

Delete all sampler mappings from this shader

Returns:
None

virtual void RmHLShader::DeleteSampler const RM_TCHAR *  strSamplerName  )  [virtual]
 

Delete sampler.

Delete sampler by its name

Parameters:
strSamplerName Sampler name to delete
Returns:
None

virtual RmSamplerListConstIterator RmHLShader::EndSamplers  )  const [inline, virtual]
 

End iterator.

End iterator

Returns:
End iterator

virtual RmSamplerListIterator RmHLShader::EndSamplers  )  [inline, virtual]
 

End iterator.

End iterator

Returns:
End iterator

virtual const RM_TCHAR* RmHLShader::GetDescription  )  [virtual]
 

Returns description of the node: used for displaying a tooltip in the workspace tree view for the given node.

Returns:
Returns description string

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.

virtual RmNodeTypeChildRuleList* RmHLShader::GetNodeTypeChildRuleList  )  [inline, protected, virtual]
 

Parent / Child rule list function.

Retrieves the rule list for adding child nodes for a given node type

Returns:
Returns node type child list rules

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.

virtual int RmHLShader::GetNumSamplers  )  const [inline, virtual]
 

Get number of samplers.

Returns number of samplers

Returns:
Number of samplers

virtual RmSampler* RmHLShader::GetSampler const RM_TCHAR *  strSamplerName  )  [virtual]
 

Get sampler.

Retrieve sampler given its name. Returns NULL if such sampler wasn't found.

Parameters:
strSamplerName Name of sampler
Returns:
Sampler
See also:
RmSampler

virtual bool RmHLShader::IsHighLevel  )  [inline, virtual]
 

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

Returns:
True

Reimplemented from RmShader.

virtual bool RmHLShader::LoadXMLData int  hDoc,
const RM_TCHAR *  strXPath,
const RM_TCHAR *  strRmXMLVersion
[virtual]
 

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.

Parameters:
hDoc Handle to the XML document
strXPath Node path in XML
strRmXMLVersion XML version
Returns:
True if load succeeded. False otherwise.

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.

virtual bool RmHLShader::SaveXMLData int  hDoc,
const RM_TCHAR *  strXPath
[virtual]
 

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.

Parameters:
hDoc Handle to the XML document
strXPath Node path in XML
Returns:
True if save succeeded. False otherwise.

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.

virtual void RmHLShader::SetNodeTypeChildRuleList RmNodeTypeChildRuleList pRmNodeChildRuleList  )  [inline, protected, virtual]
 

Sets the node child rule list for the given node.

Sets the child addition rule list for the given node.

Parameters:
pRmNodeChildRuleList new node rules list
None 

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.

virtual void RmHLShader::SetType const RM_TCHAR *  strNewType  )  [inline, protected, virtual]
 

Set type.

Compose the type string chain

Parameters:
strNewType New type string
Returns:
None

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.

virtual void RmHLShader::Update RmNodeUpdateType  nodeUpdateType,
RmNode pRmUpdateRootNode
[virtual]
 

Update.

Updates the internal values of the node

Parameters:
nodeUpdateType Update type
See also:
RmNodeUpdateType
Parameters:
pRmUpdateRootNode Root node for update
Returns:
None

Reimplemented from RmShader.

Reimplemented in RmHLSLShader, and RmGLShader.


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 16:09:03 2005 for RenderMonkey SDK by doxygen 1.3.6