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

RmGLPass Class Reference

OpenGL pass node. More...

#include <RmEffect.h>

Inheritance diagram for RmGLPass:

RmPass RmNode List of all members.

Public Member Functions

 RmGLPass ()
 Default Constructor.

 RmGLPass (const RM_TCHAR *strPassName, const int nPassIndex)
 Default Constructor.

virtual ~RmGLPass ()
 Destructor.

virtual bool AddChild (RmNode *pChildNode, RmNode *pNextSibling=NULL)
 AddChild.

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

virtual const RM_TCHAR * GetDescription ()
virtual RmSamplerGetSampler (const RM_TCHAR *strSamplerName)
virtual void DeleteSampler (const RM_TCHAR *strSamplerName)
virtual bool AddSampler (RmSampler *pSampler)
virtual void DeleteAllSamplers ()
virtual int GetNumSamplers () const
virtual RmSamplerListIterator BeginSamplers ()
virtual RmSamplerListConstIterator BeginSamplers () const
virtual RmSamplerListIterator EndSamplers ()
virtual RmSamplerListConstIterator EndSamplers () const
virtual void DeleteConstant (int nRegister)
virtual void DeleteConstant (const RM_TCHAR *strConstantName)
virtual void DeleteAllConstants ()
virtual bool AddConstant (RmShaderConstant *pConstant)
virtual RmShaderConstantGetConstant (const RM_TCHAR *strConstantName)
virtual RmShaderConstantGetConstant (int nRegister)
virtual RmShaderConstantGetConstantByIndex (int nIndex)
virtual int GetNumConstants () const
virtual RmShaderConstantListIterator BeginConstants ()
virtual RmShaderConstantListConstIterator BeginConstants () const
virtual RmShaderConstantListIterator EndConstants ()
virtual RmShaderConstantListConstIterator EndConstants () const
bool UsesSoftwareRendering ()
void SetUsesSoftwareRendering (bool bUsesSoftware)
int GetHandle ()
 Run-time program object handle.

void SetHandle (int nHandle)
 Set the handle to the run-time program object resource.


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.


Protected Attributes

RmSamplerList m_samplerList
 List of samplers.

RmShaderConstantList m_constantList
 List of shader constants (variables).


Detailed Description

OpenGL pass node.

RmGLPass is a node that contains data necessary to render a single pass for and OpenGL effect


Constructor & Destructor Documentation

RmGLPass::RmGLPass  ) 
 

Default Constructor.

Constructor

RmGLPass::RmGLPass const RM_TCHAR *  strPassName,
const int  nPassIndex
 

Default Constructor.

Creates a new pass node with the specified name. If bInitialize parameter is true, the pass is created with a pair of shaders (their type is according to the pass API determination), a stream mapping reference node and a model reference node.

virtual RmGLPass::~RmGLPass  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

virtual bool RmGLPass::AddChild RmNode pChildNode,
RmNode pNextSibling = NULL
[virtual]
 

AddChild.

Add a new child node. Also allows to specify a particular sibling for the new child node in the list of original node's children.

Parameters:
pChildNode Child node to add, must be none-NULL data
pNextSibling An optional node signifying the sibling node that should be following this node in the child list
Returns:
True on success

Reimplemented from RmPass.

virtual bool RmGLPass::AddConstant RmShaderConstant pConstant  )  [virtual]
 

Add new constant to the pass's program object. Note that if the pass already has a program object constant with the same name, the old constant node will be deleted and replaced with the newly specified constant.

Parameters:
pConstant A valid constant node to be added
Returns:
True on success, false if any errors were encountered

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

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 Allocated valid sampler node to add
Returns:
True on success

virtual RmShaderConstantListConstIterator RmGLPass::BeginConstants  )  const [inline, virtual]
 

Retrieve constant begin iterator for the pass's program object constants

Returns:
Constant begin iterator for the pass's program object constants

virtual RmShaderConstantListIterator RmGLPass::BeginConstants  )  [inline, virtual]
 

Retrieve the begin iterator for the pass's program object constants

Returns:
Begin iterator for the pass's program object constants

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

Returns begin iterator for the samplers in this pass

Returns:
Constant begin iterator for the samplers in this pass

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

Returns begin iterator for the samplers in this pass

Returns:
Begin iterator for the samplers in this pass

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

Clone this node.

Creates a clone of this node

Returns:
Cloned node. Returns NULL if cloning failed.

Reimplemented from RmPass.

virtual void RmGLPass::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 RmPass.

virtual void RmGLPass::DeleteAllConstants  )  [virtual]
 

Delete all constants from this pass's program object

Returns:
None

virtual void RmGLPass::DeleteAllSamplers  )  [virtual]
 

Delete all sampler mappings from this shader

Returns:
None

virtual void RmGLPass::DeleteConstant const RM_TCHAR *  strConstantName  )  [virtual]
 

Delete pass program object constant with a given name

Parameters:
strConstantName Name for the shader constant to be deleted
Returns:
None

virtual void RmGLPass::DeleteConstant int  nRegister  )  [virtual]
 

Delete pass program object constant linked to a given register (by nIndex)

Parameters:
nRegister Index of the register for constant to be deleted
Returns:
None

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

Delete sampler by its name

Parameters:
strSamplerName Sampler name
Returns:
None

virtual RmShaderConstantListConstIterator RmGLPass::EndConstants  )  const [inline, virtual]
 

Retrieve constant end iterator for the pass's program object constants

Returns:
Constant end iterator for the pass's program object constants

virtual RmShaderConstantListIterator RmGLPass::EndConstants  )  [inline, virtual]
 

Retrieve the end iterator for the pass's program object constants

Returns:
End iterator for the pass's program object constants

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

Returns end iterator for the samplers in this pass

Returns:
Constant end iterator for the samplers in this pass

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

Returns end iterator for the samplers in this pass

Returns:
End iterator for the samplers in this pass

virtual RmShaderConstant* RmGLPass::GetConstant int  nRegister  )  [virtual]
 

Retrieve pass's program object constant given its register index. Note that although OpenGL GLSL does not specify register index to map constants to, this function in implemented in order to support full RmPass interface for constants in GL passes.

Parameters:
nRegister Constant register index
Returns:
The found constant or NULL if no matching constant is found

virtual RmShaderConstant* RmGLPass::GetConstant const RM_TCHAR *  strConstantName  )  [virtual]
 

Retrieve pass's program object constant given its name.

Parameters:
strConstantName The name of the constant to be retrieved
Returns:
The found constant or NULL if no matching constant is found

virtual RmShaderConstant* RmGLPass::GetConstantByIndex int  nIndex  )  [virtual]
 

Retrieve shader constant by index

Parameters:
nIndex Constant index
Returns:
The found constant or NULL if no matching constant is found

virtual const RM_TCHAR* RmGLPass::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 RmPass.

int RmGLPass::GetHandle  )  [inline]
 

Run-time program object handle.

Retrieve the handle to the run-time program object resource. Do not outside of a renderer - not guaranteed to be valid.

Returns:
The handle to the run-time program object resource

virtual RmNodeTypeChildRuleList* RmGLPass::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 RmPass.

virtual int RmGLPass::GetNumConstants  )  const [inline, virtual]
 

Retrieve number of constants in this pass's program object

Returns:
Number of constants

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

Returns number of samplers

Returns:
Number of samplers in this pass

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

Retrieve sampler given its name.

Parameters:
strSamplerName Sampler name
Returns:
Sampler node or NULL if such sampler wasn't found.

virtual bool RmGLPass::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 RmPass.

virtual bool RmGLPass::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 RmPass.

void RmGLPass::SetHandle int  nHandle  )  [inline]
 

Set the handle to the run-time program object resource.

Set the handle to the run-time program object resource. Do not use outside of a renderer - not guaranteed to be valid.

Parameters:
nHandle Handle to the run-time program object resource
Returns:
None

virtual void RmGLPass::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 RmPass.

void RmGLPass::SetUsesSoftwareRendering bool  bUsesSoftware  )  [inline]
 

Set whether this pass will use software rasterizer

Returns:
None

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

Update.

Updates the internal values of the pass node

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

Reimplemented from RmPass.

bool RmGLPass::UsesSoftwareRendering  )  [inline]
 

Returns true if this pass need to use software rasterizer to render and false if it can be rendered in hardware rasterizer

Returns:
True if this pass need to use software rasterizer to render, false otherwise


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