Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

Generic
[Core PowerPipe]


Data Structures

struct   RxCamSpace3DVertex
struct   RxCluster
struct   RxClusterDefinition
struct   RxClusterRef
struct   RxExecutionContext
struct   RxHeap
struct   RxInterp
struct   RxIoSpec
struct   RxMeshStateVector
struct   RxNodeDefinition
struct   RxNodeMethods
struct   RxOutputSpec
struct   RxPacket
struct   RxPipeline
struct   RxPipelineCluster
struct   RxPipelineNode
struct   RxPipelineNodeParam
struct   RxPipelineNodeTopSortData
struct   RxPipelineRequiresCluster
struct   RxRenderStateVector
struct   RxScatter
struct   RxTriPlane
struct   RxUV
struct   RxVStep

Typedefs

typedef RwUInt16  RxVertexIndex
typedef RxVertexIndex  RwImVertexIndex
typedef RxObjSpace3DVertex  RxObjSpace3DVertex
typedef RxObjSpace3DVertex  RxObjSpace3DLitVertex
typedef RwIm2DVertex  RxScrSpace2DVertex
typedef RwBool(*  RxNodeBodyFn )(RxPipelineNode *self, const RxPipelineNodeParam *params)
typedef RwBool(*  RxNodeInitFn )(RxNodeDefinition *self)
typedef void(*  RxNodeTermFn )(RxNodeDefinition *self)
typedef RwBool(*  RxPipelineNodeInitFn )(RxPipelineNode *self)
typedef void(*  RxPipelineNodeTermFn )(RxPipelineNode *self)
typedef RwBool(*  RxPipelineNodeConfigFn )(RxPipelineNode *self, RxPipeline *pipeline)
typedef RwUInt32(*  RxConfigMsgHandlerFn )(RxPipelineNode *self, RwUInt32 msg, RwUInt32 intparam, void *ptrparam)
typedef RxPipelineNode *(*  RxPipelineNodeOutputCallBack )(RxPipelineNode *node, RxPipelineNode *outputnode, void *callbackdata)
typedef RwUInt32 RxNodeOutput
typedef RxPipelineNode RxNodeInput
typedef RxPipeline  RxLockedPipe
typedef RxCamSpace3DVertex  RwCameraVertex
typedef RwV3d  RxCamNorm

Enumerations

enum   RxClusterValidityReq { rxCLREQ_DONTWANT = 0, rxCLREQ_REQUIRED = 1, rxCLREQ_OPTIONAL = 2, rxCLUSTERVALIDITYREQFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum   RxClusterValid { rxCLVALID_NOCHANGE = 0, rxCLVALID_VALID = 1, rxCLVALID_INVALID = 2, rxCLUSTERVALIDFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum   RxClusterForcePresent { rxCLALLOWABSENT = FALSE, rxCLFORCEPRESENT = TRUE, rxCLUSTERFORCEPRESENTFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum   RxNodeDefEditable { rxNODEDEFCONST = FALSE, rxNODEDEFEDITABLE = TRUE, rxNODEDEFEDITABLEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum   RxRenderStateFlag {
  rxRENDERSTATEFLAG_TEXTUREPERSPECTIVE = 0x00000001, rxRENDERSTATEFLAG_ZTESTENABLE = 0x00000002, rxRENDERSTATEFLAG_ZWRITEENABLE = 0x00000004, rxRENDERSTATEFLAG_VERTEXALPHAENABLE = 0x00000008,
  rxRENDERSTATEFLAG_FOGENABLE = 0x00000010, rxRENDERSTATEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RwClipFlag {
  rwXLOCLIP = 0x01, rwXHICLIP = 0x02, rwXCLIP = 0x03, rwYLOCLIP = 0x04,
  rwYHICLIP = 0x08, rwYCLIP = 0x0C, rwZLOCLIP = 0x10, rwZHICLIP = 0x20,
  rwZCLIP = 0x30, rwCLIPMASK = 0x3F, rwCLIPFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RxGeometryFlag {
  rxGEOMETRY_TRISTRIP = 0x01, rxGEOMETRY_POSITIONS = 0x02, rxGEOMETRY_TEXTURED = 0x04, rxGEOMETRY_PRELIT = 0x08,
  rxGEOMETRY_NORMALS = 0x10, rxGEOMETRY_LIGHT = 0x20, rxGEOMETRY_MODULATE = 0x40, rxGEOMETRY_TEXTURED2 = 0x80,
  rxGEOMETRY_COLORED = 0x100, rxGEOMETRYFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}

Functions

void  RxPipelineSetFreeListCreateParams (RwInt32 blockSize, RwInt32 numBlocksToPrealloc)
RxHeap RxHeapGetGlobalHeap (void)
RxPacket RxPacketCreate (RxPipelineNode *self)
RxCluster RxClusterSetStride (RxCluster *cluster, RwInt32 stride)
RxCluster RxClusterSetExternalData (RxCluster *cluster, void *data, RwInt32 stride, RwInt32 numElements)
RxCluster RxClusterSetData (RxCluster *cluster, void *data, RwInt32 stride, RwInt32 numElements)
RxCluster RxClusterInitializeData (RxCluster *cluster, RwUInt32 numElements, RwUInt16 stride)
RxCluster RxClusterResizeData (RxCluster *cluster, RwUInt32 numElements)
RxCluster RxClusterDestroyData (RxCluster *cluster)
RxCluster RxClusterLockRead (RxPacket *packet, RwUInt32 clusterIndex)
RxCluster RxClusterLockWrite (RxPacket *packet, RwUInt32 clusterIndex, RxPipelineNode *node)
void  RxClusterUnlock (RxCluster *cluster)
RwUInt32  RxPipelineNodeSendConfigMsg (RxPipelineNode *dest, RwUInt32 msg, RwUInt32 intparam, void *ptrparam)
RxPipelineNode RxPipelineNodeForAllConnectedOutputs (RxPipelineNode *node, RxPipeline *pipeline, RxPipelineNodeOutputCallBack callbackfn, void *callbackdata)
RxPipelineCluster RxPipelineNodeGetPipelineCluster (RxPipelineNode *node, RwUInt32 clustersOfInterestIndex)
RwUInt32  RxPipelineClusterGetCreationAttributes (RxPipelineCluster *cluster)
RxPipelineCluster RxPipelineClusterSetCreationAttributes (RxPipelineCluster *cluster, RwUInt32 creationAttributes)
RwUInt32  RxClusterGetAttributes (RxCluster *cluster)
RxCluster RxClusterSetAttributes (RxCluster *cluster, RwUInt32 attributes)
RxPipeline RxPipelineExecute (RxPipeline *pipeline, void *data, RwBool heapReset)
RxPipeline RxPipelineCreate (void)
void  RxPipelineDestroy (RxPipeline *Pipeline)
RxPacket RxPacketFetch (RxPipelineNode *Node)
void  RxPacketDestroy (RxPacket *Packet)
void  RxPacketDispatch (RxPacket *packet, RwUInt32 output, RxPipelineNode *self)
void  RxPacketDispatchToPipeline (RxPacket *packet, RxPipeline *dest, RxPipelineNode *self)
RxNodeDefinition RxPipelineNodeCloneDefinition (RxPipelineNode *node, RxClusterDefinition *cluster2add)
RwUInt32 RxPipelineNodeFindOutputByName (RxPipelineNode *node, const RwChar *outputname)
RwUInt32 RxPipelineNodeFindOutputByIndex (RxPipelineNode *node, RwUInt32 outputindex)
RxPipelineNode RxPipelineNodeFindInput (RxPipelineNode *node)
RxPipeline RxPipelineNodeRequestCluster (RxPipeline *pipeline, RxPipelineNode *node, RxClusterDefinition *clusterDef)
RxPipeline RxPipelineNodeReplaceCluster (RxPipeline *pipeline, RxPipelineNode *node, RxClusterDefinition *oldClusterDef, RxClusterDefinition *newClusterDef)
void *  RxPipelineNodeCreateInitData (RxPipelineNode *node, RwUInt32 size)
void *  RxPipelineNodeGetInitData (RxPipelineNode *node)
RxPipeline RxLockedPipeUnlock (RxPipeline *pipeline)
RxPipeline RxPipelineLock (RxPipeline *pipeline)
RxPipeline RxPipelineClone (RxPipeline *pipeline)
RxPipelineNode RxPipelineFindNodeByName (RxPipeline *pipeline, const RwChar *name, RxPipelineNode *start, RwInt32 *nodeIndex)
RxPipelineNode RxPipelineFindNodeByIndex (RxPipeline *pipeline, RwUInt32 nodeindex)
RxPipeline RxLockedPipeAddFragment (RxPipeline *pipeline, RwUInt32 *firstIndex, RxNodeDefinition *nodeDef0,...)
RxPipeline RxLockedPipeReplaceNode (RxPipeline *pipeline, RxPipelineNode *node, RxNodeDefinition *nodeDef)
RxPipeline RxLockedPipeDeleteNode (RxPipeline *pipeline, RxPipelineNode *node)
RxPipeline RxLockedPipeSetEntryPoint (RxPipeline *pipeline, RxPipelineNode *in)
RxPipelineNode RxLockedPipeGetEntryPoint (RxPipeline *pipeline)
RxPipeline RxLockedPipeAddPath (RxPipeline *pipeline, RwUInt32 *out, RxPipelineNode *in)
RxPipeline RxLockedPipeDeletePath (RxPipeline *pipeline, RwUInt32 *out, RxPipelineNode *in)
RxPipeline RxPipelineInsertDebugNode (RxPipeline *pipeline, RxPipelineNode *before, RxPipelineNode *after, RxNodeDefinition *debugNodeDef)
void  RxHeapFree (RxHeap *heap, void *block)
void *  RxHeapAlloc (RxHeap *heap, RwUInt32 size)
void *  RxHeapRealloc (RxHeap *heap, void *block, RwUInt32 newSize, RwBool allowCopy)
RwBool  RxHeapReset (RxHeap *heap)
void  RxHeapDestroy (RxHeap *heap)
RxHeap RxHeapCreate (RwUInt32 size)
void *  RxClusterDecCursorByStride (RxCluster *cluster, RwUInt32 stride)
void *  RxClusterDecCursor (RxCluster *cluster)
void *  RxClusterIncCursorByStride (RxCluster *cluster, RwUInt32 stride)
void *  RxClusterIncCursor (RxCluster *cluster)
void *  RxClusterResetCursor (RxCluster *cluster)
TYPE *  RxClusterGetCursorData (RxCluster *cluster, TYPE *TYPE)
TYPE *  RxClusterGetIndexedData (RxCluster *cluster, TYPE *TYPE, RwUInt32 index)
RwUInt32  RxClusterGetFreeIndex (RxCluster *cluster)
void  RxPipelineClusterAssertAttributeSet (RxCluster *cluster, RwChar *attributeSet)
void *  RxPipelineNodeParamGetData (RxPipelineNodeParam *param)
RxHeap RxPipelineNodeParamGetHeap (RxPipelineNodeParam *param)
RxRenderStateVector RxRenderStateVectorSetDefaultRenderStateVector (RxRenderStateVector *rsvp)
const RxRenderStateVector RxRenderStateVectorGetDefaultRenderStateVector (void)
RxRenderStateVector RxRenderStateVectorCreate (RwBool current)
void  RxRenderStateVectorDestroy (RxRenderStateVector *rsvp)
RxRenderStateVector RxRenderStateVectorLoadDriverState (RxRenderStateVector *rsvp)

Detailed Description

Generic Pipeline

Typedef Documentation

typedef RxCamSpace3DVertex RwCameraVertex
 

RwCameraVertex typedef for a structure describing a camera-space 3D vertex.

typedef RxVertexIndex RwImVertexIndex
 

RwImVertexIndex Typedef for a RenderWare Graphics Immediate Mode Vertex

typedef RwV3d RxCamNorm
 

RxCamNorm typedef for RwV3d used by the RxClVStep cluster

typedef RwUInt32(* RxConfigMsgHandlerFn)(RxPipelineNode * self, RwUInt32 msg, RwUInt32 intparam, void *ptrparam)
 

RxConfigMsgHandlerFn is the callback to be called, for the owning pipeline node, whenever a message is sent to it by the RxPipelineNodeConfigFn of another pipeline node in the same pipeline. See RxPipelineNodeSendConfigMsg.

Parameters:
self  A pointer to the pipeline node
msg  Message ID
intparam  Meaning is message-specific
ptrparam  Meaning is message-specific
Returns:
A RwInt32 value, 0: unserviced; -ve: error; +ve: informative success
See also:
RxNodeMethods
typedef RxPipeline RxLockedPipe
 

RxLockedPipe typedef for a reference to a locked pipeline

typedef RwBool(* RxNodeBodyFn)(RxPipelineNode * self, const RxPipelineNodeParam *params)
 

RxNodeBodyFn is the callback to be called during pipeline execution -- and, typically, process RxPacket's -- for the owning pipeline node.

Parameters:
self  A pointer to the pipeline node being executed
params  A pointer to a parameter structure
Returns:
TRUE on success, FALSE otherwise.
See also:
RxNodeMethods
typedef RwBool(* RxNodeInitFn)(RxNodeDefinition * self)
 

RxNodeInitFn is the callback to be called, for the owning node definition, the first time an RxPipeline referencing that node definition is unlocked.

Parameters:
self  A pointer to the node definition
Returns:
TRUE on success, FALSE otherwise.
See also:
RxNodeMethods
typedef RxPipelineNode* RxNodeInput
 

RxNodeInput typedef for a reference to the input of a pipeline node

typedef RwUInt32* RxNodeOutput
 

RxNodeOutput typedef for a reference to an output of a pipeline node

typedef void(* RxNodeTermFn)(RxNodeDefinition * self)
 

RxNodeTermFn is the callback to be called, for the owning node definition, the last time an RxPipeline referencing that node definition is destroyed or locked.

Parameters:
self  A pointer to the node definition
Returns:
None
See also:
RxNodeMethods
typedef RxObjSpace3DVertex RxObjSpace3DLitVertex
 

RxObjSpace3DLitVertex Typedef for an RxObjSpace3DLitVertex structure

typedef struct RxObjSpace3DVertex RxObjSpace3DVertex
 

RxObjSpace3DVertex Typedef for an RxObjSpace3DVertex structure

typedef RwBool(* RxPipelineNodeConfigFn)(RxPipelineNode * self, RxPipeline * pipeline)
 

RxPipelineNodeConfigFn is the callback to be called, for the owning pipeline node, whenever a RxPipeline containing that that pipeline node is unlocked, *after* all RxPipelineNodeInitFn's have been called for the pipeline in question. This func is to be used as described in RxPipelineNodeSendConfigMsg.

Parameters:
self  A pointer to the pipeline node
pipeline  A pointer to the containing pipeline
Returns:
TRUE on success, FALSE otherwise.
See also:
RxNodeMethods
typedef RwBool(* RxPipelineNodeInitFn)(RxPipelineNode * self)
 

RxPipelineNodeInitFn is the callback to be called, for the owning pipeline node, whenever a RxPipeline containing that that pipeline node is unlocked.

Parameters:
self  A pointer to the pipeline node
Returns:
TRUE on success, FALSE otherwise.
See also:
RxNodeMethods
typedef RxPipelineNode*(* RxPipelineNodeOutputCallBack)(RxPipelineNode * node, RxPipelineNode * outputnode, void *callbackdata)
 

RxPipelineNodeOutputCallBack is the callback function supplied to RxPipelineNodeForAllConnectedOutputs.

The callback will be passed a pointer to the RxPipelineNode whose outputs are being traversed and a pointer to the current output RxPipelineNode, as well as a pointer to an optional user-defined data structure (callbackdata). If no such structure was specified, this will be NULL.

Parameters:
node  A pointer to the pipeline node whose outputs are being traversed
outputnode  A pointer to the current output pipeline node
callbackdata  A pointer to optional user-supplied data
Returns:
Returns a pointer to the RxPipelineNode whose outputs are being traversed, or NULL to terminate traversal
typedef void(* RxPipelineNodeTermFn)(RxPipelineNode * self)
 

RxPipelineNodeTermFn is the callback to be called, for the owning pipeline node, whenever a RxPipeline containing that that pipeline node is locked or destroyed.

Parameters:
self  A pointer to the pipeline node
Returns:
None
See also:
RxNodeMethods
typedef RwIm2DVertex RxScrSpace2DVertex
 

RxScrSpace2DVertex Typedef for an RxScrSpace2DVertex structure

typedef RwUInt16 RxVertexIndex
 

RxVertexIndex Typedef for a RenderWare Graphics PowerPipe Immediate Mode Vertex


Enumeration Type Documentation

enum RwClipFlag
 

RwClipFlag Flags specifying the clipping status of a vertex

Enumeration values:
rwXLOCLIP  The vertex is outside the low X clip-plane
rwXHICLIP  The vertex is outside the high X clip-plane
rwXCLIP  The vertex is outside an X clip-plane
rwYLOCLIP  The vertex is outside the low Y clip-plane
rwYHICLIP  The vertex is outside the high Z clip-plane
rwYCLIP  The vertex is outside a Y clip-plane
rwZLOCLIP  The vertex is outside the low Z clip-plane
rwZHICLIP  The vertex is outside the high Z clip-plane
rwZCLIP  The vertex is outside a Z clip-plane
rwCLIPMASK  Mask covering all used bits in the clip flags in case a plugin wants free ones to use (e.g RpGloss)
enum RxClusterForcePresent
 

RxClusterForcePresent Flags specifying whether an RxCluster should be forced to be present in an RxPipelineNode

Enumeration values:
rxCLALLOWABSENT  The cluster is allowed to be absent if no prior nodes create it and no subsequent nodes require it
rxCLFORCEPRESENT  The cluster must be present even if no prior nodes create it and no subsequent nodes require it
enum RxClusterValid
 

RxClusterValid Flags specifying the state requirements for a RxCluster on exit from a node

Enumeration values:
rxCLVALID_NOCHANGE  The cluster and its data will not change in validity on passing through this node
rxCLVALID_VALID  The cluster and its data will be valid on exit from this node
rxCLVALID_INVALID  The cluster's data will be invalid on exit from this node
enum RxClusterValidityReq
 

RxClusterValidityReq Flags specifying the state requirements for a RxCluster on entry to a node

Enumeration values:
rxCLREQ_DONTWANT  The cluster is required but any data within it is not wanted and will be overwritten
rxCLREQ_REQUIRED  The cluster is required and it must contain valid data
rxCLREQ_OPTIONAL  The cluster will be used if it is present and contains valid data, otherwise the node will make do without it.
enum RxGeometryFlag
 

RxGeometryFlag Flags describing geometry properties

Enumeration values:
rxGEOMETRY_TRISTRIP  This geometry's meshes can be rendered as tri-strips
rxGEOMETRY_POSITIONS  This geometry has positions
rxGEOMETRY_TEXTURED  This geometry has textures applied
rxGEOMETRY_PRELIT  This geometry has luminance values
rxGEOMETRY_NORMALS  This geometry has normals
rxGEOMETRY_LIGHT  This geometry will be lit
rxGEOMETRY_MODULATE  This geometry will modulate the material color with the vertex colors (prelit + lit)
rxGEOMETRY_TEXTURED2  This geometry has 2 set of texture coordinates
rxGEOMETRY_COLORED  This mesh specifies per-vertex colors. NB: ONLY USED IN IM3D
enum RxNodeDefEditable
 

RxNodeDefEditable Flags specifying whether an RxNodeDefinition is editable or not (RxPipelineNodeCloneDefinition, RxPipelineNodeReplaceCluster and RxPipelineNodeRequestCluster create editable copies of node definitions as the originals may be static definitions).

Enumeration values:
rxNODEDEFCONST  This node definition is a temporary, modified copy of another and can be freed
enum RxRenderStateFlag
 

RxRenderStateFlag Flags used in the RxRenderStateVector structure

Enumeration values:
rxRENDERSTATEFLAG_TEXTUREPERSPECTIVE  Perspective texturing is to be enabled
rxRENDERSTATEFLAG_ZTESTENABLE  Z-Buffer testing is to be performed
rxRENDERSTATEFLAG_ZWRITEENABLE  Z-Buffer writing is to be enabled
rxRENDERSTATEFLAG_VERTEXALPHAENABLE  Vertex alpha is to be enabled
rxRENDERSTATEFLAG_FOGENABLE  Fog is to be enabled

Function Documentation

void* RxClusterDecCursor RxCluster   cluster
 

RxClusterDecCursor decreases the cluster's data array cursor by the array's stride.

Parameters:
cluster  A pointer to a cluster.
Returns:
A pointer to the cursor in its new location.
See also:
RxClusterResetCursor , RxClusterGetCursorData , RxClusterIncCursor , RxClusterIncCursorByStride , RxClusterDecCursorByStride
void* RxClusterDecCursorByStride RxCluster   cluster,
RwUInt32    stride
 

RxClusterDecCursorByStride decrements the cluster's data array cursor by "stride" bytes.

Parameters:
cluster  A pointer to a cluster
stride  An RwInt32 equal to the number of bytes by which to decrement the cluster's cursor
Returns:
A pointer to the cursor in its new location
See also:
RxClusterResetCursor , RxClusterGetCursorData , RxClusterIncCursor , RxClusterDecCursor , RxClusterIncCursorByStride
RxCluster* RxClusterDestroyData RxCluster   cluster
 

RxClusterDestroyData destroys a cluster's data array.

In the same manner as the run-time library free() call, RxClusterDestroyData can be used to deallocate cluster data. A cluster should have some data to free on entering this function, naturally - if it is external data, it won't actually be freed, but the cluster's pointer to the data will be cleared, as will its flags.

Parameters:
cluster  A pointer to the cluster to act upon
Returns:
A NULL cluster pointer
See also:
RxClusterInitializeData , RxClusterResizeData , RxClusterLockRead , RxClusterLockWrite , RxClusterUnlock , RxClusterSetData , RxClusterSetExternalData , RxClusterSetStride
RwUInt32 RxClusterGetAttributes RxCluster   cluster
 

RxClusterGetAttributes gets the attributes of a cluster.

Each RxCluster in each RxPacket has an attributes field. RxClusterInitializeData initializes the attributes field to a creationAttributes value specific to the cluster and the pipeline in which creation occurs. Using RxClusterGetAttributes or RxClusterSetAttributes, this attributes value may be read and modified as the packet flows down the pipeline.

Interpretation of the cluster attributes field is with reference to the cluster's attributeSet identifier. For example, PlayStation 2 specific pipelines tend to employ clusters with the attributeSet identifier "PS2"; given the attributeSet identifier "PS2", we know that the attribute values are constructed from the PlayStation 2 cluster attributes (CL_ATTRIB_OPAQUE, CL_V4_16, etc.).

It is good practice for a node's pipelinenodeinit/pipelinenodeconfig methods to test a cluster's attributeSet identifier before reading or writing attribute values (e.g. RxPipelineClusterAssertAttributeSet(cl, RWSTRING("PS2"))).

Parameters:
cluster  A pointer to the cluster from which to retrieve the attributes
Returns:
An RwUInt32 equal to the attributes of the cluster if successful or -1 if there is an error
See also:
RxClusterSetAttributes , RxPipelineNodeGetPipelineCluster , RxPipelineClusterGetCreationAttributes , RxPipelineClusterSetCreationAttributes
TYPE* RxClusterGetCursorData RxCluster   cluster,
TYPE *    TYPE
 

RxClusterGetCursorData is a macro that returns a reference to the element of the cluster's data array pointed to by the data array cursor.

Parameters:
cluster  A pointer to a cluster
TYPE  The type of the data
Returns:
A pointer to the cluster's cursor
See also:
RxClusterResetCursor , RxClusterIncCursor , RxClusterDecCursor , RxClusterIncCursorByStride , RxClusterDecCursorByStride
RwUInt32 RxClusterGetFreeIndex RxCluster   cluster
 

RxClusterGetFreeIndex returns an index one beyond the last used element in the cluster's data array. Additionally increments the numUsed member of the cluster.

It is the responsibility of the user to test that the array is large enough to hold a new entry - i.e. that RxClusterGetFreeIndex(cl) is less than the cluster and greater than numAlloced - and to RxClusterResizeData as necessary.

Parameters:
cluster  A pointer to a cluster
Returns:
An RwUInt32 equal to the index of the first free element in the cluster
See also:
RxClusterResetCursor , RxClusterGetCursorData , RxClusterIncCursor , RxClusterDecCursor , RxClusterIncCursorByStride , RxClusterDecCursorByStride
TYPE* RxClusterGetIndexedData RxCluster   cluster,
TYPE *    TYPE,
RwUInt32    index
 

RxClusterGetIndexedData returns a reference to the element of the cluster's data array specified by the given index.

Parameters:
cluster  A pointer to a cluster
TYPE  The type of the data
index  An RwUInt32 equal to the index of the desired element
Returns:
A pointer to the indexed data element
See also:
RxClusterResetCursor , RxClusterGetCursorData , RxClusterIncCursor , RxClusterDecCursor , RxClusterIncCursorByStride , RxClusterDecCursorByStride
void* RxClusterIncCursor RxCluster   cluster
 

RxClusterIncCursor increases the cluster's data array cursor by the array's stride.

Parameters:
cluster  A pointer to a cluster.
Returns:
A pointer to the cursor in its new location.
See also:
RxClusterResetCursor , RxClusterGetCursorData , RxClusterIncCursor , RxClusterDecCursor , RxClusterIncCursorByStride , RxClusterDecCursorByStride
void* RxClusterIncCursorByStride RxCluster   cluster,
RwUInt32    stride
 

RxClusterIncCursorByStride increments the cluster's data array cursor by "stride" bytes.

Parameters:
cluster  A pointer to a cluster
stride  An RwUInt32 equal to the number of bytes by which to increment the cluster's cursor
Returns:
A pointer to the cursor in its new location
See also:
RxClusterResetCursor , RxClusterGetCursorData , RxClusterIncCursor , RxClusterDecCursor , RxClusterDecCursorByStride
RxCluster* RxClusterInitializeData RxCluster   cluster,
RwUInt32    numElements,
RwUInt16    stride
 

RxClusterInitializeData creates a cluster's data array.

In the same manner as the run-time library alloc() call, RxClusterInitializeData can be used to allocate cluster data. However, it is probably best to think of this function's purpose as to "(re)initialize a cluster's data" - it sets the cluster's stride (values greater than zero are valid) and allocates data. If the cluster already has data then it will be freed. If you know that you do not need the old data then it is better to call this function rather than RxClusterResizeData, because the copy of the data that that function will do is entirely unnecessary and may be costly.

Both the stride and number of elements specified must be greater than zero.

Parameters:
cluster  A pointer to the cluster to act upon
numElements  An RwUInt32 equal to the number of elements to alloc
stride  An RwUInt32 equal to the stride of the cluster's data array
Returns:
Pointer to the modified cluster on success, or NULL if there is an error
See also:
RxClusterResizeData , RxClusterDestroyData , RxClusterLockRead , RxClusterLockWrite , RxClusterUnlock , RxClusterSetData , RxClusterSetExternalData , RxClusterSetStride
RxCluster* RxClusterLockRead RxPacket   packet,
RwUInt32    clusterIndex
 

RxClusterLockRead locks a cluster for reading in an RxPacket.

RxClusterLockRead will fail (indicated by a NULL return) if the packet does not contain the requested cluster. To ensure that this does not happen, the node's RxNodeDefinition should flag the cluster as required [rxCLREQ_REQUIRED or rxCLREQ_DONTWANT - the latter means that the cluster is required but any prior data it contains is not wanted]. Even if this is done, the cluster may not be present if no subsequent nodes in the pipeline require it and no prior nodes create it. The node can ensure that it definitely is there by specifying rxCLFORCEPRESENT for the forcePresent member of the cluster's RxClusterRef in the clustersOfInterest array in the RxNodeDefinition. This is important if the cluster is to be dispatched in the packet to another pipeline.

It is possible for an rxCLREQ_REQUIRED cluster to be empty, and to guard against this nodes should test (cluster->numUsed > 0). rxCLREQ_OPTIONAL clusters may not be present and should always be tested for presence.

Clusters locked for reading may not be resized, and modification of their data is not permitted.

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
packet  A pointer to the packet containing the cluster
clusterIndex  An RwUInt32 equal to the cluster's index within the node's RxNodeDefinition.io.clustersOfInterest array
Self-contained example that iterates through a packet's ObjVerts cluster.
   RwBool
   ProcessPacket(RxPacket *pk)
   {
           RxCluster *clObjVerts;

           // cluster we wish to LockRead() is identified by its index
           // within the node's RxNodeDefinition.io.clustersOfInterest array

           clObjVerts = RxClusterLockRead(pk, 3);
           if ( (clObjVerts != NULL ) && (clObjVerts->numUsed > 0))
           {
                   RwUInt32 n;

                   for (n = 0; n < clObjVerts->numUsed; n++) // iterate over ObjVerts array
                   {
                           const RwObjSpace3DVertex *objVert =
                               RxClusterGetCursorData(clObjVerts, const RwObjSpace3DVertex);

                           ... // do something with objVert

                           RxClusterIncCursor(clObjVerts);
                   }

                   RxClusterUnlock(clObjVerts);
           }
   }
   
Returns:
A pointer to the cluster if successful, NULL if there is an error
See also:
RxClusterLockWrite , RxClusterUnlock , RxPacketFetch , RxPacketDispatch , RxPacketDispatchToPipeline
RxCluster* RxClusterLockWrite RxPacket   packet,
RwUInt32    clusterIndex,
RxPipelineNode   node
 

RxClusterLockWrite locks a cluster for writing.

Returns NULL if the packet does not contain the requested cluster. [The node's RxNodeDefinition record may list a cluster as rxCLVALID_VALID, but if dependency chasing identifies that no subsequent nodes have any interest in the cluster and no prior nodes create the cluster, it will be eliminated: packets will not make provision for the cluster, and it will not be possible to create it. To override this elimination behavior, set the RxClusterRef.forcePresent flag to rxCLFORCEPRESENT - see also RxClusterLockRead]

Clusters locked for writing may have their data initialized, resized, destroyed or modified. This function sets the rxCLFLAGS_MODIFIED bit in the cluster's flags so that it can later be determined that the cluster's data has been edited.

If RxClusterLockWrite is called on an external (by reference) cluster, "internalization" occurs - the cluster data is copied to permit modification, and the cluster becomes internal (dropping the reference altogether). It is this internal cluster that will subsequently be propagated. For a more detailed discussion of the internal/external distinction, see RxClusterSetExternalData or RxClusterSetData.

Parameters:
packet  A pointer to the packet containing the cluster
clusterIndex  An RwUInt32 equal to the cluster's index within the node's RxNodeDefinition.io.clustersOfInterest array
node  A pointer to the calling pipeline node
Creating a cluster
    RwBool
    ProcessRenderState( RxPipelineNodeInstance *self,
                        const RxPipelineNodeParam *params )
    {
        RxPacket            *packet;

        RxCluster           *clRenderState;

        RxRenderStateVector *renderStateData;


        packet = (RxPacket *)RxPacketFetch( self );
        RWASSERT( NULL != packet );

        // cluster we wish to LockWrite() is identified by its index
        // within the node's RxNodeDefinition.io.clustersOfInterest array

        clRenderState = RxClusterLockWrite( packet, 1, self );
        RWASSERT( clRenderState != NULL );

        clRenderState = RxClusterInitializeData( clRenderState, 1, sizeof(RxRenderStateVector) );
        RWASSERT( NULL != clRenderState );

        renderStateData = RxClusterGetCursorData( clRenderState, RxRenderStateVector );
        RWASSERT( NULL != renderStateData );

        memset( renderStateData, 0, sizeof(RxRenderStateVector) );

        // ... and any further changes to renderStateData

        RxClusterUnlock( clRenderState );

        // ...
    }
   
Returns:
A pointer to the cluster on success, or NULL if there is an error
See also:
RxClusterLockRead , RxClusterUnlock , RxClusterInitializeData , RxClusterDestroyData , RxClusterResizeData , RxClusterSetData , RxClusterSetExternalData , RxPacketFetch , RxPacketDispatch , RxPacketDispatchToPipeline
void* RxClusterResetCursor RxCluster   cluster
 

RxClusterResetCursor resets the cluster's data array cursor, so that it points to the first element in the cluster's data array.

A cursor reset is performed automatically by the API after RxClusterLockRead, RxClusterLockWrite, RxClusterInitializeData, RxClusterResizeData, RxClusterSetData and RxClusterSetExternalData.

Parameters:
cluster  A pointer to a cluster
Returns:
A pointer to the cluster's cursor in its new location.
See also:
RxClusterGetCursorData , RxClusterIncCursor , RxClusterDecCursor , RxClusterIncCursorByStride , RxClusterDecCursorByStride , RxClusterLockRead , RxClusterLockWrite , RxClusterInitializeData , RxClusterResizeData , RxClusterSetData , RxClusterSetExternalData
RxCluster* RxClusterResizeData RxCluster   cluster,
RwUInt32    numElements
 

RxClusterResizeData resizes a cluster's data array.

In the same manner as the run-time library realloc() call, RxClusterResizeData can be used to reallocate cluster data. RxClusterDestroyData should be used to deallocate data, not this function. Equally, data should be initially allocated by RxClusterInitializeData, not this function.

The number of elements specified must be greater than zero.

Parameters:
cluster  A pointer to the cluster to act upon
numElements  An RwUInt32 equal to the new number of elements in the cluster's data array; should be greater than zero
Returns:
Pointer to the modified cluster on success, or NULL if there is an error
See also:
RxClusterInitializeData , RxClusterDestroyData , RxClusterLockRead , RxClusterLockWrite , RxClusterUnlock , RxClusterSetData , RxClusterSetExternalData , RxClusterSetStride
RxCluster* RxClusterSetAttributes RxCluster   cluster,
RwUInt32    attributes
 

RxClusterSetAttributes sets the attributes of a cluster.

Each RxCluster in each RxPacket has an attributes field. RxClusterInitializeData initializes the attributes field to a creationAttributes value specific to the cluster and the pipeline in which creation occurs. Using the RxClusterGetAttributes and RxClusterSetAttributes functions, this attributes value may be read and modified as the packet flows down the pipeline.

Interpretation of the cluster attributes field is with reference to the cluster's attributeSet identifier. For example, PlayStation 2 specific pipelines tend to employ clusters with the attributeSet identifier "PS2"; given the attributeSet identifier "PS2", we know that the attribute values are constructed from the PlayStation 2 cluster attributes (CL_ATTRIB_OPAQUE, CL_V4_16, etc.).

It is good practice for a node's pipelinenodeinit/pipelinenodeconfig methods to test a cluster's attributeSet identifier before reading or writing attribute values (e.g. RxPipelineClusterAssertAttributeSet(cl, RWSTRING("PS2"))).

Parameters:
cluster  A pointer to the cluster whose attributes are to be set
attributes  An RwUInt32 equal to the new attributes value
Returns:
A pointer to the modified cluster, or NULL if there is an error
See also:
RxPipelineNodeGetPipelineCluster , RxPipelineClusterGetCreationAttributes , RxPipelineClusterSetCreationAttributes
RxCluster* RxClusterSetData RxCluster   cluster,
void *    data,
RwInt32    stride,
RwInt32    numElements
 

RxClusterSetData sets a cluster's data to an existing data block.

Clusters are the means by which packets convey data. A packet will usually contain a number of clusters, e.g. { RenderState, ObjVerts, Indices }.

Clusters are classified as internal or external (to pipeline execution). Nodes treat internal or external clusters in exactly the same fashion; indeed, as a rule, nodes need not know whether a given cluster is internal or external. This function sets the data to INTERNAL.

INTERNAL clusters: A cluster created by RxClusterInitializeData is internal - the cluster data is allocated from the pipeline execution heap, and the cluster may be resized and its data modified as the packet flows down the pipeline. When the containing packet is destroyed, or the cluster is terminated - because subsequent nodes have no interest in it, as identified by dependency chasing during RxLockedPipeUnlock - the cluster data is freed.

EXTERNAL clusters: These are used to convey a reference to data external to the pipeline execution heap. Should a node attempt to modify (i.e. call RxClusterLockWrite) or resize (RxClusterResizeData) an external cluster, then the cluster will be transparently "internalized" (the referenced data will be copied into the pipeline execution heap, and the cluster will become internal). In the event of internalization, it is the copied data that is subsequently propagated. Note that this scheme makes it essential that you use RxClusterLockWrite for a cluster instead of RxClusterLockRead, if you are subsequently to edit the cluster's data.

Non-array data is treated as a single element array; it is still necessary to correctly set the stride for non-array data.

Parameters:
cluster  A pointer to the cluster to act upon
data  A pointer to the data to reference
stride  An RwInt32 equal to the stride of data array (increment in bytes from one element of the data array to the next)
numElements  An RwInt32 equal to the number of elements in data array (or 1 for non-array data)
Returns:
A pointer to the modified cluster on success, or NULL if there is an error
See also:
RxClusterInitializeData , RxClusterResizeData , RxClusterDestroyData , RxClusterLockRead , RxClusterLockWrite , RxClusterUnlock , RxClusterSetExternalData
RxCluster* RxClusterSetExternalData RxCluster   cluster,
void *    data,
RwInt32    stride,
RwInt32    numElements
 

RxClusterSetExternalData initializes a cluster as referencing external data.

Clusters are the means by which packets convey data. A packet will usually contain a number of clusters, e.g. { RenderState, ObjVerts, Triangles }.

Clusters are classified as internal or external (to pipeline execution). Nodes treat internal or external clusters in exactly the same fashion; indeed, as a rule, nodes need not know whether a given cluster is internal or external. This function sets the data to EXTERNAL.

INTERNAL clusters: A cluster created by RxClusterInitializeData is internal - the cluster data is allocated from the pipeline execution heap, and the cluster may be resized and its data modified as the packet flows down the pipeline. When the containing packet is destroyed, or the cluster is terminated - because subsequent nodes have no interest in it, as identified by dependency chasing during RxLockedPipeUnlock - the cluster data is freed.

EXTERNAL clusters: These are used to convey a reference to data external to the pipeline execution heap. Should a node attempt to modify (i.e. call RxClusterLockWrite) or resize (RxClusterResizeData) an external cluster, then the cluster will be transparently "internalized" (the referenced data will be copied into the pipeline execution heap, and the cluster will become internal). In the event of internalization, it is the copied data that is subsequently propagated. Note that this scheme makes it essential that you use RxClusterLockWrite for a cluster instead of RxClusterLockRead, if you are subsequently to edit the cluster's data.

Note that in some cases it may be useful to flag cluster data that is allocated from the pipeline execution heap as external. Doing so will protect the original data array from modification by any subsequent nodes in the pipeline, which might be useful if the same array is to be used in multiple packets that a node creates.

Non-array data is treated as a single element array; it is still necessary to correctly set the stride for non-array data.

Parameters:
cluster  A pointer to the cluster to act upon
data  A pointer to the data to reference
stride  An RwInt32 equal to the stride of data array (increment in bytes from one element of the data array to the next)
numElements  An RwInt32 equal to the number of elements in the data array (or 1 for non-array data)
Returns:
A pointer to the modified cluster on success or NULL if there is an error
See also:
RxClusterInitializeData , RxClusterResizeData , RxClusterDestroyData , RxClusterLockRead , RxClusterLockWrite , RxClusterUnlock , RxClusterSetData , RxClusterSetData
RxCluster* RxClusterSetStride RxCluster   cluster,
RwInt32    stride
 

RxClusterSetStride sets a cluster's stride (the increment in bytes from one element of the data array to the next).

This function only stores the stride value; it does not reorganize the data array, nor does it resize it. It is common practice to follow RxClusterSetStride with an RxClusterResizeData. When creating a cluster, it is more natural to use the RxClusterInitializeData call, which sets the stride of, and allocates memory for, the data array.

Parameters:
cluster  A pointer to the cluster to act upon
stride  An RwInt32 equal to the new stride for the cluster's data
Returns:
Pointer to the modified cluster on success, or NULL if there is an error
See also:
RxClusterLockRead , RxClusterLockWrite , RxClusterUnlock , RxClusterInitializeData , RxClusterResizeData , RxClusterDestroyData , RxClusterSetData , RxClusterSetExternalData
void RxClusterUnlock RxCluster   cluster
 

RxClusterUnlock unlocks a cluster.

Counterpart to RxClusterLockRead and RxClusterLockWrite ; call when the RxCluster is no longer required - when reading, writing or resizing is complete.

Parameters:
cluster  A pointer to the cluster to unlock
Returns:
None
See also:
RxClusterLockRead , RxClusterLockWrite
void* RxHeapAlloc RxHeap   heap,
RwUInt32    size
 

RxHeapAlloc allocates a block of memory from an RxHeap.

Parameters:
heap  A pointer to the heap from which to allocate memory
size  An RwUInt32 equal to the amount of memory to be allocated in bytes
Returns:
A pointer to the allocated block of memory on success, or NULL if there is an error
See also:
RxHeapCreate , RxHeapDestroy , RxHeapFree , RxHeapRealloc , RxHeapReset
RxHeap* RxHeapCreate RwUInt32    size
 

RxHeapCreate creates an RxHeap for dynamic memory management optimized for use during the execution of PowerPipe pipelines. See RxHeapGetGlobalHeap and RxPipelineExecute for details of current usage within PowerPipe.

This heap structure is optimized for the following kind of process: blocks of memory are allocated, a minority of these blocks are freed or resized and at the end of the process, the entire set of remaining allocations can be freed with one call (to RxHeapReset).

The RxHeap provides very quick allocations but does not do anything clever to deal with fragmentation within the heap. It operates as its fastest if it does not have to resort to reusing freed memory (i.e. if you can allocate all your blocks without filling the heap, then do so without freeing any blocks and merely call RxHeapReset at the end of the process).

If the heap is filled and cannot service an allocation, it will automatically grow by the size passed to RxHeapCreate or the size of the allocation (whichever is the larger).

Parameters:
size  An RwUInt32 equal to the initial heap size in bytes
Returns:
A pointer to the created heap on success or NULL if there is an error
See also:
RxHeapGetGlobalHeap , RxPipelineExecute , RxHeapAlloc , RxHeapDestroy , RxHeapFree , RxHeapRealloc , RxHeapReset
void RxHeapDestroy RxHeap   heap
 

RxHeapDestroy destroys an RxHeap previously created by RxHeapCreate, freeing any outstanding memory allocations from that heap.

Parameters:
heap  A pointer to the heap to be destroyed
Returns:
None
See also:
RxHeapAlloc , RxHeapCreate , RxHeapFree , RxHeapRealloc , RxHeapReset
void RxHeapFree RxHeap   heap,
void *    block
 

RxHeapFree returns a previously allocated block of memory to an RxHeap for reuse.

Parameters:
heap  A pointer to the heap within which to free memory
block  A pointer to the previously allocated block of memory
Returns:
None
See also:
RxHeapAlloc , RxHeapCreate , RxHeapDestroy , RxHeapRealloc , RxHeapReset
RxHeap* RxHeapGetGlobalHeap void   
 

RxHeapGetGlobalHeap returns the global PowerPipe heap.

The pipeline execution code maintains an execution heap that is tightly bound to the current invocation of RxPipelineExecute .

This heap is used to rapidly service allocations for "transient" memory; such allocations are not preserved between pipeline executions - the heap is cleared down on exit from RxPipelineExecute, with a call to RxHeapReset.

RxClusterInitializeData and RxClusterResizeData, for example, use the execution heap to allocate cluster memory.

The returned heap of type RxHeap can be used in calls to RxHeapAlloc, RxHeapRealloc and RxHeapFree. During the execution of the node body method of a RxPipelineNode, the current heap - we may have multiple heaps eventually to execute more than one pipe simultaneously on multiprocessor systems - may be obtained through RxPipelineNodeParamGetHeap.

Use of execution heap:

   {
           RxHeap *heap;
           int *intArray;

           heap = RxHeapGetGlobalHeap();

           intArray = (int *) RxHeapAlloc(heap, 200 * sizeof(int));

           intArray[199] = 3;

           RxHeapFree(heap, intArray);
   }
   
Returns:
A pointer to the global pipeline execution heap
See also:
RxPipelineExecute , RxPipelineNodeParamGetHeap , RxHeapAlloc , RxHeapRealloc , RxHeapFree
void* RxHeapRealloc RxHeap   heap,
void *    block,
RwUInt32    newSize,
RwBool    allowCopy
 

RxHeapRealloc resizes a previously allocated block of memory within an RxHeap, possibly moving the block. The allowCopy parameter determines whether, if the current block cannot be resized in-place, it should be copied to a new location or whether this should be treated as failure (in some cases, the caller may prefer to do something else if realloc'ing requires an expensive copy).

Note:
AllowCopy is currently ignored.
Parameters:
heap  A pointer to the heap from which the block of memory was allocated
block  A pointer to the block of memory to be resized
newSize  An RwUInt32 equal to the new size for the block
allowCopy  TRUE if realloc is allowed to copy the block to a new location, FALSE otherwise. [Note: allowCopy is currently ignored]
Returns:
A pointer to the resized and possibly moved block of memory on success, NULL otherwise.
See also:
RxHeapAlloc , RxHeapCreate , RxHeapDestroy , RxHeapFree , RxHeapReset
RwBool RxHeapReset RxHeap   heap
 

RxHeapReset resets an RxHeap, (quickly) marking all memory allocations from that heap as free.

Parameters:
heap  A pointer to the heap to be reset
Returns:
TRUE if successful, FALSE if there is an error
See also:
RxHeapAlloc , RxHeapCreate , RxHeapDestroy , RxHeapFree , RxHeapRealloc
RxPipeline* RxLockedPipeAddFragment RxPipeline   pipeline,
RwUInt32   firstIndex,
RxNodeDefinition   nodeDef0,
...   
 

RxLockedPipeAddFragment adds a fragment to a locked pipeline.

A fragment is a chain of nodes, interconnected on their first (default) outputs.

Constructing a pipeline is typically a process of adding a number of fragments (describing linear sections of the pipeline graph), and then adding additional paths between fragments using RxLockedPipeAddPath.

Note:
Each node definition is limited to have RXNODEMAXCLUSTERSOFINTEREST clusters of interest.
Each node definition is limited to have RXNODEMAXOUTPUTS outputs.
Each pipeline is limited to have by default a maximum of RXPIPELINEDEFAULTMAXNODES nodes. This value may be overridden by changing _rxPipelineMaxNodes BEFORE RenderWare is initialized.
This function should be called before the containing pipeline is unlocked.
Parameters:
pipeline  A pointer to a locked pipeline
firstIndex  An optional pointer to a RwUInt32 to receive the index of the first added node
nodeDef0  A pointer to an array of one or more RxNodeDefinitions. The array is of variable length and is NULL terminated
Returns:
A pointer to the locked pipeline or NULL if it fails
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipeline* RxLockedPipeAddPath RxPipeline   pipeline,
RwUInt32   out,
RxPipelineNode   in
 

RxLockedPipeAddPath adds a path in the specified locked pipeline, between the given RxNodeOutput and the given RxNodeInput.

Parameters:
pipeline  A pointer to a locked pipeline
out  A reference to a pipeline node output
in  A reference to a pipeline node input
Returns:
A pointer to the input pipeline on success, or NULL if it fails
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipeline* RxLockedPipeDeleteNode RxPipeline   pipeline,
RxPipelineNode   node
 

RxLockedPipeDeleteNode deletes the specified node from a locked pipeline. Paths into and out of the node are deleted.

Parameters:
pipeline  A pointer to a locked pipeline
node  A pointer to the pipeline node to be deleted
Returns:
A pointer to the input pipeline on success, or NULL if there is an error
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipeline* RxLockedPipeDeletePath RxPipeline   pipeline,
RwUInt32   out,
RxPipelineNode   in
 

RxLockedPipeDeletePath deletes a path in the specified locked pipeline, between the given RxNodeOutput and the given RxNodeInput.

Parameters:
pipeline  A pointer to a locked pipeline
out  A reference to a pipeline node output
in  A reference to a pipeline node input
Returns:
A pointer to the pipeline on success, NULL otherwise.
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipelineNode* RxLockedPipeGetEntryPoint RxPipeline   pipeline
 

RxLockedPipeGetEntryPoint gets the locked pipeline's entry point - that is, the pipeline node that forms the head of the pipeline graph, where pipeline processing will commence. After RxLockedPipeUnlock, the specified node will be the first node in the flattened node array.

Parameters:
pipeline  A pointer to a locked pipeline
Returns:
A pointer to the entry-point pipeline node on success, NULL otherwise.
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipeline* RxLockedPipeReplaceNode RxPipeline   pipeline,
RxPipelineNode   node,
RxNodeDefinition   nodeDef
 

RxLockedPipeReplaceNode replaces an existing pipeline node with a new pipeline node instanced from a specified node definition. Paths into and out of the node are retained to the greatest extent possible.

Pipeline nodes can be located within pipelines using RxPipelineFindNodeByName or RxPipelineFindNodeByIndex.

Parameters:
pipeline  A pointer to a locked pipeline
node  A pointer to the pipeline node to be replaced
nodeDef  A pointer to the node definition of the pipeline node to be added
Returns:
A pointer to the pipeline added.
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipeline* RxLockedPipeSetEntryPoint RxPipeline   pipeline,
RxPipelineNode   in
 

RxLockedPipeSetEntryPoint sets a locked pipeline's entry point - that is, the index of node that forms the head of the pipeline graph, where pipeline processing will commence. After RxLockedPipeUnlock, the specified node will be the first node in the flattened node array.

Note:
You should not normally need to call this function. Each pipeline has one entry point and dependency-chasing should identify it unambiguously. This allows the decision to be overridden.
Parameters:
pipeline  A pointer to a locked pipeline
in  A pointer to the pipeline node to set as the pipeline's entry point
Returns:
A pointer to the input pipeline on success, or NULL if there is an error
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeUnlock
RxPipeline* RxLockedPipeUnlock RxPipeline   pipeline
 

RxLockedPipeUnlock unlocks a pipeline (switches, in effect, pipeline state from EDITABLE to EXECUTABLE).

Pipeline unlocking is computationally intensive (see RxPipelineExecute), and can fail if it is determined that the requirements of all nodes cannot be met by the nodes feeding them.

Parameters:
pipeline  A pointer to a locked pipeline.
Returns:
A pointer to the input pipeline on success, or NULL if there is an error
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint
RxPacket* RxPacketCreate RxPipelineNode   self
 

RxPacketCreate creates an empty packet.

This function will fail if there is insufficient memory on the pipeline execution heap or if a packet is already in existence (owing to the nested pipeline executed model, only one packet exists at a time, see RxPacketFetch for details).

Data for all clusters in the created packet will be flagged invalid !(RxCluster.flags & rxCLFLAGS_CLUSTERVALID). Use RxClusterLockWrite then RxClusterInitializeData, RxClusterSetExternalData or RxClusterSetData to initialize clusters as required.

This function is for use within node body methods.

Parameters:
self  A pointer to the calling pipeline node
Returns:
A pointer to an empty packet on success, otherwise NULL
See also:
RxPacketDestroy , RxPacketFetch , RxPacketDispatch , RxPacketDispatchToPipeline
void RxPacketDestroy RxPacket   Packet
 

RxPacketDestroy destroys a packet.

Data for all valid clusters is also freed, excepting "external" [by reference] clusters. RxPacketCreate must be called in order to do further RxPacket processing in the current node.

Parameters:
Packet  A pointer to the packet to destroy
RxPacketDestroy is used within node body methods. This example shows the bones of an atypical node.
   {
           RxPacket *pk;

           pk = RxPacketFetch(self);
           RWASSERT (NULL != pk);

           ... // process packet

           RxPacketDestroy(pk, self);

           return(TRUE);
   }
   
Returns:
None
See also:
RxPacketCreate , RxPacketFetch , RxPacketDispatch , RxPacketDispatchToPipeline , RxClusterLockRead , RxClusterLockWrite
void RxPacketDispatch RxPacket   packet,
RwUInt32    output,
RxPipelineNode   self
 

RxPacketDispatch dispatches an RxPacketFetch -ed or RxPacketCreate -ed packet to an output of the current node.

RxPacketDispatch dispatches packets to one of the outputs of the current node [RxPacketDispatchToPipeline is used to dispatch packets to another pipeline].

If a packet is dispatched to an unconnected output, it will be destroyed. NOTE, however, that this happens anyway from the point of view of the calling node due to the nested nature of pipeline execution - when RxPacketDispatch is called, the packet is sent down the rest of the pipeline within this call and will have been destroyed [as described in RxPacketFetch] by the time the dispatch function returns (you can no longer operate on this packet, you will need to RxPacketCreate another).

If the current node has not RxPacketCreate -ed or RxPacketFetch -ed a packet then it is valid to pass NULL as the packet parameter to this function (if a packet exists and you simply haven't checked, it will be passed on anyway).

As noted in the documentation for RxPacketFetch, you should not RxPacketCreate or RxPacketFetch a packet unless you subsequently RxPacketDispatch, RxPacketDispatchToPipeline or RxPacketDestroy it.

Note:
This function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
Parameters:
packet  A pointer to the packet to dispatch
output  RwInt32, the number of the output to dispatch the packet to
self  A pointer to the calling RxPipelineNode
RxPacketFetch is used within node body methods. This example shows the bones of a typical node.
   {
           RxPacket *pk;

           pk = RxPacketFetch(self);
           RWASSERT (NULL != pk);

           ... // process packet

           // dispatch packet to output 0 (default)
           RxPacketDispatch(pk, 0, self);

           return(TRUE);
   }
   
Returns:
None
See also:
RxPacketDispatchToPipeline , RxPacketFetch , RxPacketCreate , RxPacketDestroy , RxClusterLockRead , RxClusterLockWrite
void RxPacketDispatchToPipeline RxPacket   packet,
RxPipeline   dest,
RxPipelineNode   self
 

RxPacketDispatchToPipeline dispatches a RxPacketFetch -ed or RxPacketCreate -ed packet to an output of the current node.

RxPacketDispatchToPipeline dispatches packets to another pipeline [RxPacketDispatch is used to dispatch packets to one of the outputs of the current node].

When RxPacketDispatchToPipeline is called, the packet is sent down the subsequent pipeline immediately due to the nested nature of pipeline execution - when RxPacketDispatchToPipeline is called, the packet is sent down the destination pipeline within this call and will have been destroyed [as described in RxPacketFetch] by the time the dispatch function returns (you can no longer operate on this packet, you will need to RxPacketCreate another).

If the current node has not RxPacketCreate -ed or RxPacketFetch -ed a packet then it is valid to pass NULL as the packet parameter to this function (if a packet exists and you simply haven't checked, it will be passed on anyway).

As noted in the documentation for RxPacketFetch, it is an error to RxPacketCreate or RxPacketFetch a packet and not to subsequently RxPacketDispatch, RxPacketDispatchToPipeline or RxPacketDestroy it.

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
packet  A pointer to the packet to dispatch
dest  A pointer to the destination pipeline
self  A pointer to the calling RxPipelineNode
RxPacketFetch is used within node body methods. This example shows the bones of a typical node.
   {
           RxPacket *pk;

           pk = RxPacketFetch(self);
           RWASSERT (NULL != pk);

           ... // process packet

           // dispatch packet to output 0 (default)
           RxPacketDispatchToPipeline(pk, fancyPipeline, self);

           return(TRUE);
   }
   
Returns:
None
See also:
RxPacketDispatch , RxPacketFetch , RxPacketCreate , RxPacketDestroy , RxClusterLockRead , RxClusterLockWrite
RxPacket* RxPacketFetch RxPipelineNode   Node
 

RxPacketFetch fetches the current packet if there is one, returning a pointer to an RxPacket or NULL if there is no packet currently.

The RxPacketFetch -ed packet should be RxPacketDispatchToPipeline -ed, RxPacketDispatch -ed or RxPacketDestroy -ed. If a node fails to do so, the packet will automatically be freed on exit of the node. Pipeline execution proceeds in a nested manner such that inside a dispatch, the RxPacket in fact proceeds along the rest of the pipeline and is destroyed explicitly by a node or automatically on dispatch to an unconnected node output or on exit of the terminal node. Hence, a dispatch is equivalent to calling RxPacketDestroy from the point of view of the current node - the packet can no longer be used within this node and another must be created.

The convention is to give terminal nodes an output to which they dispatch, while recognizing that this output will usually remain unconnected - dispatch to an unconnected output causes the packet to be destroyed.

RxPacketFetch should only be called once within a node, given the nested pipeline execution structure described above. RxPacketDispatch and RxPacketDispatchToPipeline are the only mechanisms to progress along a pipeline and they pass along at most one RxPacket.

Note:
This function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
Parameters:
Node  A pointer to the calling pipeline node
RxPacketFetch is used within node body methods. This example shows the bones of a typical node.
   {
           RxPacket *pk;

           pk = RxPacketFetch(self);
           RWASSERT (NULL != pk);

           ... // process packet

           // dispatch packet to output 0 (default)
           RxPacketDispatch(pk, 0, self);

           return(TRUE);
   }
   
Returns:
A pointer to the current packet or NULL if there isn't one
See also:
RxPacketDispatch , RxPacketDispatchToPipeline , RxPacketCreate , RxPacketDestroy , RxClusterLockRead , RxClusterLockWrite
RxPipeline* RxPipelineClone RxPipeline   pipeline
 

RxPipelineClone deep-copies an unlocked pipeline; the resultant copy may then form the basis for subsequent edits.

Cloning a pipeline is non-trivial. This is because the nodes within a pipeline that was created in external code will have been set up by unknown API calls. Initialization data (see RxPipelineNodeCreateInitData) is used to 'remember' the effects of pipeline node setup API functions, such that a pipeline node's RxPipelineNodeInitFn may use it to perform automatic initialization of the node in a clone pipeline.

The use of this function is no longer recommended. It may be removed from the library in subsequent versions.

Parameters:
pipeline  A pointer to the unlocked pipeline to clone
Returns:
A pointer to the clone on success, otherwise NULL.
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
void RxPipelineClusterAssertAttributeSet RxCluster   cluster,
RwChar   attributeSet
 

RxPipelineClusterAssertAttributeSet provides a convenient debugging test that can be made if one plans to manipulate a cluster's attributes. See RxPipelineClusterSetCreationAttributes for further information.

Parameters:
cluster  A pointer to a cluster
attributeSet  A pointer to the name string of the attribute set you wish use
Returns:
None
See also:
RxPipelineClusterSetCreationAttributes
RwUInt32 RxPipelineClusterGetCreationAttributes RxPipelineCluster   cluster
 

RxPipelineClusterGetCreationAttributes gets creation attributes from a pipeline cluster.

Each pipeline maintains a collection of RxPipelineCluster records, one for each cluster used by the pipeline.

An RxPipelineCluster record holds a creationAttributes value - when a cluster is created in the pipeline (RxClusterInitializeData), the cluster's attributes field is initialized from RxPipelineCluster.creationAttributes. Nodes may subsequently modify the cluster's attributes as the packet flows down the pipe.

Interpretation of the cluster attributes field is with reference to the cluster's attributeSet identifier. For example, PlayStation 2 specific pipelines tend to employ clusters with the attributeSet identifier "PS2"; given the attributeSet identifier "PS2", we know that the attribute values are constructed from the PlayStation 2 cluster attributes (CL_ATTRIB_OPAQUE, CL_V4_16, etc.).

It is good practice for a node's pipelinenodeinit/pipelinenodeconfig methods to test a cluster's attributeSet identifier before reading or writing attribute values (e.g. RxPipelineClusterAssertAttributeSet(cl, RWSTRING("PS2"))).

Parameters:
cluster  A pointer to the pipeline cluster to retrieve creation attributes from
Returns:
The cluster's attributes, which may equal zero, or -1 if there is an error
See also:
RxPipelineClusterSetCreationAttributes , RxPipelineNodeGetPipelineCluster , RxClusterGetAttributes , RxClusterSetAttributes
RxPipelineCluster* RxPipelineClusterSetCreationAttributes RxPipelineCluster   cluster,
RwUInt32    creationAttributes
 

RxPipelineClusterSetCreationAttributes sets creation attributes.

Each pipeline maintains a collection of RxPipelineCluster records, one for each cluster used by the pipeline.

An RxPipelineCluster record holds a creationAttributes value - when a cluster is created in the pipeline (RxClusterInitializeData), the cluster's attributes field is initialized from RxPipelineCluster.creationAttributes. nodes may subsequently modify the cluster's attributes as the packet flows down the pipe.

Interpretation of the cluster attributes field is with reference to the cluster's attributeSet identifier. For example, PlayStation 2 specific pipelines tend to employ clusters with the attributeSet identifier "PS2"; given the attributeSet identifier "PS2", we know that the attribute values are constructed from the PlayStation 2 cluster attributes (CL_ATTRIB_OPAQUE, CL_V4_16, etc.).

It is good practice for a node's pipelinenodeinit/pipelinenodeconfig methods to test a cluster's attributeSet identifier before reading or writing attribute values (e.g. RxPipelineClusterAssertAttributeSet(cl, RWSTRING("PS2"))).

Parameters:
cluster  The pipeline cluster to set creation attributes of.
creationAttributes  New creation attributes value
Returns:
A pointer to the modified pipeline cluster on success, or NULL if there is an error
See also:
RxPipelineClusterGetCreationAttributes , RxPipelineNodeGetPipelineCluster , RxClusterGetAttributes , RxClusterSetAttributes
RxPipeline* RxPipelineCreate void   
 

RxPipelineCreate creates an RxPipeline.

RxPipelineCreate may return NULL if there is insufficient memory.

The following code creates a worldsector object pipeline containing the three library nodes WorldSectorInstance.csl, WorldSectorEnumerateLights.csl and MaterialScatter.csl.

   RxPipeline *
   CreateWorldSectorPipeline(void)
   {
           RxPipeline *pipe;
           RxLockedPipe *lpipe;

           pipe = RxPipelineCreate();
           if ( pipe != NULL )
           {
                   lpipe = RxPipelineLock(pipe);
                   if ( lpipe != NULL )
                   {
                           if ( RxLockedPipeAddFragment(lpipe, NULL,
                                                        RxNodeGetNodeWorldSectorInstance(),
                                                        RxNodeGetNodeWorldSectorEnumerateLights(),
                                                        RxNodeGetNodeMaterialScatter(),
                                                        NULL) )
                           {
                                   if ( RxLockedPipeUnlock(lpipe) )
                                   {
                                           return (pipe); // success
                                   }
                           }
                   }

                   // fall through to here for cleanup if pipeline was
                   // Create()d okay, but one of the construction calls
                   // [Lock(), AddFragment(), Unlock()] has failed

                   _rxPipelineDestroy(pipe);
           }

           return NULL; // failure
   }
   
Returns:
A pointer to the created pipeline on success, or NULL if there is an error
See also:
RxPipelineDestroy , RxPipelineLock , RxLockedPipeUnlock , RxPipelineExecute
void RxPipelineDestroy RxPipeline   Pipeline
 

RxPipelineDestroy destroys a RxPipeline, freeing all associated resources.

Counterpart to RxPipelineCreate.

Parameters:
Pipeline  A pointer to the pipeline to destroy
Returns:
None
Warning:
This is infact implemented as a macro
See also:
RxPipelineCreate , RxPipelineLock , RxLockedPipeUnlock , RxPipelineExecute
RxPipeline* RxPipelineExecute RxPipeline   pipeline,
void *    data,
RwBool    heapReset
 

RxPipelineExecute executes a pipeline.

The RxPipeline object describes a directed acylic graph of nodes, which must be in an unlocked state for execution [RxPipelineLock and RxLockedPipeUnlock calls bracket edits of the DAG; inside the RxLockedPipeUnlock call, analysis is made of data flow through the pipeline, which is then used to optimize RxPipelineExecute performance].

Execution begins at the head node of the pipeline, proceeding downwards through the flattened ("topologically sorted") pipeline. Parameter "data" is passed into each node. Typically, a node near the top of the pipeline will process the object referenced by this data pointer to generate one or more RxPacket's, which are then directed down the graph for further processing.

RxPipelineNode's may invoke other pipelines by dispatching RxPacket s with the inter-DAG RxPacketDispatchToPipeline function rather than the RxPacketDispatch intra-DAG function [which outputs the RxPacket to the node connected to output "outputIndex"].

Pipeline execution proceeds in a nested manner such that inside a dispatch, the RxPacket in fact proceeds along the rest of the pipeline and is destroyed explicitly by a node or automatically on dispatch to an unconnected node output or on exit of the terminal node. Hence, a dispatch is equivalent to calling RxPacketDestroy from the point of view of the calling node - the packet can no longer be used within that node and another must be created. RxPacketDispatchToPipeline and RxPacketDispatch are the only means of causing subsequent nodes to execute (i.e pipeline execution to continue).

Nodes executing within a pipeline should use the RxHeap structure (as detailed in RxHeapGetGlobalHeap and RxHeapCreate) to allocate "transient" memory, where "transient" means that the memory can safely be lost as soon as the pipeline execution terminates or sooner (the heap is cleared with a call to RxHeapReset before execution begins, unless the heapReset parameter to RxPipelineExecute is FALSE, as used by RwIm3DTransform for example). Allocations of cluster memory, for instance (through RxClusterInitializeData and RxClusterResizeData), use the pipeline execution heap.

The heap attached to the current pipeline execution is accessible via the RxPipelineNodeParam parameter of pipeline node RxNodeBodyFn's, with the aid of RxPipelineNodeParamGetHeap. While there is currently one global heap, the system may in the future be extended to use different heaps for each pipeline execution, such that many pipelines could be executed simultaneously on multiprocessor systems.

Early termination: the nested execution model descibed above means that terminating pipeline execution is achieved merely by not dispatching to a subsequent node or pipeline. However, there is no guarantee that nodes above the current node will not create and dispatch further packets. So, if a node returns FALSE (signifying an error) then pipeline execution will terminate as soon as all nodes above it can exit and no further dispatches will be allowed.

If the pipeline (or any invoked pipelines) terminates with an error, RxPipelineExecute will return NULL.

Parameters:
pipeline  A pointer to the pipeline to execute
data  A pointer to data to pass to node body methods (the purpose is pipeline-specific)
heapReset  TRUE in normal usage; FALSE to carry over heap contents from the previous pipeline execution, i.e not call RxHeapReset before executing
Invoke the default atomic pipeline on "atomic". All things being equal, the atomic pipeline will generate atomic->numMaterialsUsed packets, each packet corresponding to one RwMaterial, and containing the subset of the atomic's geometry that specifies that material. These packets will then be scattered to material pipelines (see RpMaterialSetPipeline, RpMaterialSetDefaultPipeline) for transform, lighting and rendering.
   if ( !RxPipelineExecute(defaultAtomicPipeline, (void *) atomic, TRUE) )
   {
           // pipeline execution incurred an error
   }
   
Returns:
A pointer to the RxPipeline executed if it runs to completion without error, otherwise NULL
See also:
RxPipelineCreate , RxPipelineDestroy , RxPipelineLock , RxLockedPipeUnlock , RxLockedPipeAddFragment
RxPipelineNode* RxPipelineFindNodeByIndex RxPipeline   pipeline,
RwUInt32    nodeindex
 

RxPipelineFindNodeByIndex returns the node in a pipeline at index "nodeindex". Indices increment from zero with the first fragment through each subsequent pipeline node added.

Neither pipeline node indices nor pipeline node pointers are valid across an RxLockedPipeUnlock, as this function causes the pipeline nodes to be re-ordered.

Parameters:
pipeline  A pointer to the target pipeline
nodeindex  The index of the pipeline node
Returns:
A pointer to the pipeline node on success, NULL otherwise.
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipelineNode* RxPipelineFindNodeByName RxPipeline   pipeline,
const RwChar   name,
RxPipelineNode   start,
RwInt32   nodeIndex
 

RxPipelineFindNodeByName finds the first PipelineNode in a given pipeline which has a given name specified in its RxNodeDefinition. If a non-NULL reference to a RxPipelineNode within the pipeline is passed in, the search starts immediately after that pipeline node. If a non-NULL reference to a RwInt32 index is passed in, it will be filled, on success, with the index of the pipeline node. On failure it will be filled with -1.

Pipeline node pointers are not valid across an RxLockedPipeUnlock, as this function causes the nodes to be re-ordered.

Parameters:
pipeline  A pointer to a pipeline to search
name  A pointer to a string to search with
start  An optional pointer to a pipeline node after which to start the search
nodeIndex  An optional reference to an index in which to put the pipeline node's index
Returns:
A pointer to the found pipeline node on success, or NULL if there is an error
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipeline* RxPipelineInsertDebugNode RxPipeline   pipeline,
RxPipelineNode   before,
RxPipelineNode   after,
RxNodeDefinition   debugNodeDef
 

RxPipelineInsertDebugNode inserts a 'debug' pipeline node inbetween two specified pipeline nodes.

For all clusters active in either of the two specified pipeline nodes, the added pipeline node will have rxCLREQ_REQUIRED specified for them on input and rxCLVALID_VALID on output.

Debug nodes are constructed to monitor traffic by "packet sniffing".

Parameters:
pipeline  A pointer to an unlocked pipeline
before  A pointer to a pipeline node to feed into the debug node
after  A pointer to a pipeline node for the debug node to feed into
debugNodeDef  A pointer to the node definition for the debug node
Returns:
Input pipeline on success, or NULL if there is an error
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipeline* RxPipelineLock RxPipeline   pipeline
 

RxPipelineLock locks a pipeline (switches, in effect, pipeline state from EXECUTABLE to EDITABLE).

Parameters:
pipeline  A pointer to an unlocked pipeline.
Returns:
A pointer to the input pipeline on success, or NULL if there is an error
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxNodeDefinition* RxPipelineNodeCloneDefinition RxPipelineNode   node,
RxClusterDefinition   cluster2add
 

RxPipelineNodeCloneDefinition creates a private copy of the RxNodeDefinition of a given an RxPipelineNode, so that the definition can be modified. It optionally adds a new cluster_of_interest.

The same cluster may not appear twice in a node's clusters_of_interest array, so it is an error to add a cluster that is already present.

This function is generally used by nodes to assist in the provision of construction-time "customization" APIs.

Parameters:
node  A pointer to the source pipeline node
cluster2add  An optional pointer to a cluster definition to add
Returns:
A pointer to the clone node definition
See also:
RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeRequestCluster , RxPipelineNodeReplaceCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
void* RxPipelineNodeCreateInitData RxPipelineNode   node,
RwUInt32    size
 

RxPipelineNodeCreateInitData creates space for initialization data for a pipeline node.

Initialization data can be supplied before a pipeline is unlocked, so that the pipeline node initialization function has some data to work with when it is called at unlock time.

This function creates space for initialization data in a node and returns a pointer to that space so that the application can fill it. It creates the space locally so that it can safely be freed when the node is destroyed. If this function is called subsequently, any prior data will be freed.

Initialization data was introduced to support RxPipelineClone. It is used to 'remember' the effects of pipeline node setup API functions, such that a pipeline node's RxPipelineNodeInitFn may use it to perform automatic initialization of the node in a clone pipeline.

This function should be called before the containing pipeline is unlocked.

Parameters:
node  A pointer to a pipeline node
size  An RwUInt32 equal to the size (size > 0) of the initialization data
Returns:
a pointer to the space for the initialization data on success, NULL otherwise.
See also:
RxPipelineNodeGetInitData , RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipelineNode* RxPipelineNodeFindInput RxPipelineNode   node
 

RxPipelineNodeFindInput returns a handle to the node's input, suitable for use with RxLockedPipeAddPath, etc.

Parameters:
node  A pointer to a pipeline node
Returns:
An RxNodeInput handle for the node's input on success, or NULL if there is an error.
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RwUInt32* RxPipelineNodeFindOutputByIndex RxPipelineNode   node,
RwUInt32    outputindex
 

RxPipelineNodeFindOutputByIndex searches through the node's outputs, as defined in its RxNodeDefinition, returning a handle to the requested output (requested with an index into the node's array of outputs, in the order defined in the node's RxNodeDefinition). This handle can be used with RxLockedPipeAddPath, etc.

Parameters:
node  A pointer to a pipeline node
outputindex  The index of the output to retrieve
Returns:
An RxNodeOutput handle for the output on success, or NULL if there is an error
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RwUInt32* RxPipelineNodeFindOutputByName RxPipelineNode   node,
const RwChar   outputname
 

RxPipelineNodeFindOutputByName searches through the node's outputs, as defined in its struct RxNodeDefinition, returning a handle to the requested output - requested with a string in the RxNodeDefinition . This handle can be used with RxLockedPipeAddPath, etc.

Parameters:
node  A pointer to a pipeline node
outputname  A pointer to a string identifying an output of the node
Returns:
An RxNodeOutput handle for the output on success, or NULL if there is an error.
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeReplaceCluster , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipelineNode* RxPipelineNodeForAllConnectedOutputs RxPipelineNode   node,
RxPipeline   pipeline,
RxPipelineNodeOutputCallBack    callbackfn,
void *    callbackdata
 

RxPipelineNodeForAllConnectedOutputs enumerates over the connected outputs of a node.

Enumeration function. The callback is executed on every connected output of the specified node. The callback may return NULL to terminate enumeration, or a non-NULL value to continue.

Expected use is in pipelinenodeconfig methods.

Callback prototype:

   typedef RxPipelineNode *
   (*RxPipelineNodeOutputCallBack)(RxPipelineNode *node,
                                   RxPipelineNode *outputnode,
                                   void *callbackdata);
   
Parameters:
node  A pointer to the pipeline node
pipeline  A pointer to pipeline node's containing pipeline
callbackfn  Per-connected-output callback function
callbackdata  A pointer to user data for enumeration - passed to the callback function
Returns:
A pointer to the specified pipeline node on success, or NULL if there is an error
See also:
RxPipelineNodeSendConfigMsg
void* RxPipelineNodeGetInitData RxPipelineNode   node
 

RxPipelineNodeGetInitData gets the initialization data pointer of a pipeline node.

Initialization data may be supplied before a pipeline is unlocked, so that the pipeline node initialization function has some data to work with when it is called.

When the pipeline node is destroyed (this occurs when its containing pipeline is destroyed or the node removed from it) or the data is replaced (this occurs whenever RxPipelineNodeCreateInitData is called), the data is freed.

Parameters:
node  A pointer to a pipeline node
Returns:
A pointer to the initialization data on success, or NULL if there is an error.
See also:
RxPipelineNodeCreateInitData , RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipelineCluster* RxPipelineNodeGetPipelineCluster RxPipelineNode   node,
RwUInt32    clustersOfInterestIndex
 

RxPipelineNodeGetPipelineCluster gets a pipeline cluster from a pipeline node.

Each pipeline maintains a collection of RxPipelineCluster records, one for each cluster used by the pipeline.

An RxPipelineCluster record holds a creationAttributes value - when a cluster is created in the pipeline (RxClusterInitializeData), the cluster's attributes field is initialized from RxPipelineCluster.creationAttributes.

RxPipelineNodeGetPipelineCluster is most commonly used in a node's pipelinenodeinit method, as a precursor to modifying a cluster's creationAttributes.

Parameters:
node  A pointer to the pipeline node
clustersOfInterestIndex  An RwUInt32 equal to the cluster's index within the node's RxNodeDefinition.io.clustersOfInterest array
Returns:
A pointer to the pipeline cluster on success, or NULL if there is an error
See also:
RxPipelineClusterGetCreationAttributes , RxPipelineClusterSetCreationAttributes , RxClusterGetAttributes , RxClusterSetAttributes
void* RxPipelineNodeParamGetData RxPipelineNodeParam   param
 

RxPipelineNodeParamGetData gets the data pointer which was passed in to RxPipelineExecute for the current pipeline execution.

Parameters:
param  A pointer to the current pipeline node's params.
Returns:
A pointer to the current pipeline execution data.
See also:
RxPipelineExecute , RxPipelineNodeParamGetHeap
RxHeap* RxPipelineNodeParamGetHeap RxPipelineNodeParam   param
 

RxPipelineNodeParamGetHeap gets the RxHeap in use by the current pipeline execution

Parameters:
param  A pointer to the current pipeline node's params.
Returns:
A pointer to the current heap.
See also:
RxPipelineExecute , RxPipelineNodeParamGetData
RxPipeline* RxPipelineNodeReplaceCluster RxPipeline   pipeline,
RxPipelineNode   node,
RxClusterDefinition   oldClusterDef,
RxClusterDefinition   newClusterDef
 

RxPipelineNodeReplaceCluster replaces a cluster in a pipeline node during pipeline definition.

This can be used in multipass pipelines, which use the same node several times and want to pass in a different cluster to each instance (a different set of RxUVs or a different RxMeshStateVector, for instance).

This function can also be used when the node designer has no means of knowing what a cluster will be called (e.g. a node which simply copies the contents of 'a cluster' into memory somewhere - it reads stride at run-time and can potentially work on any cluster); a place-holder cluster (&clusterPlaceHolder) is then used, which is invariably replaced during pipeline definition.

This function must be called prior to unlocking the containing pipeline.

Parameters:
pipeline  A pointer to the target pipeline
node  A pointer to the target node
oldClusterDef  A pointer to the cluster definition of the cluster to be removed
newClusterDef  A pointer to the cluster definition of the cluster to be added
Returns:
A pointer to the input pipeline on success, or NULL if there is an error
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeRequestCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RxPipeline* RxPipelineNodeRequestCluster RxPipeline   pipeline,
RxPipelineNode   node,
RxClusterDefinition   clusterDef
 

RxPipelineNodeRequestCluster causes a node to request a cluster.

When pipelines are unlocked, a requirements/data flow analysis is performed within the pipeline, which is intended to validate the pipeline and eliminate redundant effort.

This analysis can not, of itself, factor in the requirements of any pipelines to which this pipeline might dispatch (such dispatches are dependent on the execution-time behavior of node body methods).

For this reason, it is important that terminal nodes which dispatch to other pipelines require (in their RxNodeDefinition's ) the clusters that the destination pipelines will require. Without this, it might be determined that certain clusters are no longer required, and they may be terminated before packets reach the dispatching node.

RxPipelineNodeRequestCluster causes the node to request a cluster. A copy of the node's RxNodeDefinition is made, and this is edited, so other RxPipelineNodes instanced from the same RxNodeDefinition are not impacted. The cluster is always requested as rxCLREQ_OPTIONAL because it is more flexible than rxCLREQ_REQUIRED. If this function is used and the cluster is not present, rxCLREQ_REQUIRED would cause dependency chasing to fail, whereas with rxCLREQ_OPTIONAL no harm is done.

This function must be called prior to unlocking the containing pipeline.

Parameters:
pipeline  A pointer to the pipeline to act upon
node  A pointer to the node to request the specified cluster
clusterDef  A pointer to the cluster definition of the cluster to request
Returns:
A pointer to the input pipeline on success, or NULL if there is an error The function fails if the node already requests the cluster
See also:
RxPipelineNodeCloneDefinition , RxPipelineNodeFindInput , RxPipelineNodeFindOutputByIndex , RxPipelineNodeFindOutputByName , RxPipelineNodeReplaceCluster , RxLockedPipeAddFragment , RxLockedPipeAddPath , RxPipelineClone , RxPipelineInsertDebugNode , RxLockedPipeDeleteNode , RxLockedPipeDeletePath , RxPipelineFindNodeByIndex , RxPipelineFindNodeByName , RxLockedPipeGetEntryPoint , RxPipelineLock , RxLockedPipeReplaceNode , RxLockedPipeSetEntryPoint , RxLockedPipeUnlock
RwUInt32 RxPipelineNodeSendConfigMsg RxPipelineNode   dest,
RwUInt32    msg,
RwUInt32    intparam,
void *    ptrparam
 

RxPipelineNodeSendConfigMsg requests information on node requirements.

In the final stages of pipeline Unlock()-ing, (i) the pipelinenodeinit method of each node in the pipeline is called [in bottom to top (consumer -> producer) order]; (ii) the pipelinenodeconfig method of each node is called, again in bottom to top order.

It is expected that nodes will use the pipelinenodeinit method to initialize their private data. Once the pipelinenodeinit phase is complete, it is assumed that all nodes are initialized as necessary. Nodes may then use the pipelinenodeconfig method as an opportunity to communicate with other nodes in the pipeline and further ascertain requirements.

A typical node's pipelinenodeconfig method might use RxPipelineNodeForAllConnectedOutputs (perhaps recursively) to identify the nodes to which it outputs, and then use RxPipelineNodeSendConfigMsg to request information on their requirements.

Nodes receive messages via their configmsghandler method. The return value of RxPipelineNodeSendConfigMsg is the node's response, or zero if the message is unserviced.

No default msg values are currently defined.

The use of this function (and the related callback types, RxPipelineNodeConfigFn and RxConfigMsgHandlerFn) is no longer recommended. It may be removed from the library in subsequent versions.

Parameters:
dest  Destination node for the message
msg  Message ID
intparam  Meaning is message-specific
ptrparam  Meaning is message-specific
Returns:
0: unserviced; -ve: error; +ve: informative success
See also:
RxPipelineNodeForAllConnectedOutputs , RxPipelineNodeGetInitData , RxLockedPipeUnlock
void RxPipelineSetFreeListCreateParams RwInt32    blockSize,
RwInt32    numBlocksToPrealloc
 

RxPipelineSetFreeListCreateParams allows the developer to specify how many RxPipeline s to preallocate space for. Call before RwEngineInit.

Parameters:
blockSize  number of entries per freelist block.
numBlocksToPrealloc  number of blocks to allocate on RwFreeListCreateAndPreallocateSpace.
See also:
RwFreeList
RxRenderStateVector* RxRenderStateVectorCreate RwBool    current
 

RxRenderStateVectorCreate returns a RxRenderStateVector set to the default or current state.

The returned vector can be set to the current driver state or the default render state depending on the value of the 'current' parameter.

This function should not be called before RwEngineStart() has been called.

Parameters:
current  if TRUE, the vector is set to the current state, else it is set to the default state
Returns:
A pointer to the new RxRenderStateVector on success or NULL if there is an error
See also:
RxRenderStateVectorGetDefaultRenderStateVector , RxRenderStateVectorLoadDriverState , RxRenderStateVectorDestroy , RxRenderStateVectorSetDefaultRenderStateVector
void RxRenderStateVectorDestroy RxRenderStateVector   rsvp
 

RxRenderStateVectorDestroy destroys a RxRenderStateVector

Parameters:
rsvp  a pointer to the RxRenderStateVector to destroy
Returns:
None
See also:
RxRenderStateVectorGetDefaultRenderStateVector , RxRenderStateVectorLoadDriverState , RxRenderStateVectorCreate , RxRenderStateVectorSetDefaultRenderStateVector
const RxRenderStateVector* RxRenderStateVectorGetDefaultRenderStateVector void   
 

RxRenderStateVectorGetDefaultRenderStateVector returns a CONST pointer to the global default RxRenderStateVector.

This function should not be called before RwEngineStart() has been called.

Returns:
A pointer to the vector to fill on success, or NULL if there is an error
See also:
RxRenderStateVectorLoadDriverState , RxRenderStateVectorCreate , RxRenderStateVectorDestroy , RxRenderStateVectorSetDefaultRenderStateVector
RxRenderStateVector* RxRenderStateVectorLoadDriverState RxRenderStateVector   rsvp
 

RxRenderStateVectorLoadDriverState sets a RxRenderStateVector to the current driver render state.

This function should not be called before RwEngineInit() has been called.

Parameters:
rsvp  The RxRenderStateVector to set to the current driver state
Returns:
A pointer to the RxRenderStateVector on success, or NULL if there is an error
See also:
RxRenderStateVectorGetDefaultRenderStateVector , RxRenderStateVectorCreate , RxRenderStateVectorDestroy , RxRenderStateVectorSetDefaultRenderStateVector
RxRenderStateVector* RxRenderStateVectorSetDefaultRenderStateVector RxRenderStateVector   rsvp
 

RxRenderStateVectorSetDefaultRenderStateVector sets a RxRenderStateVector to the default state.

This function should not be called before RwEngineStart() has been called.

Parameters:
rsvp  A pointer to the vector to fill
Returns:
A pointer to the vector to fill on success, or NULL if there is an error
See also:
RxRenderStateVectorGetDefaultRenderStateVector , RxRenderStateVectorLoadDriverState , RxRenderStateVectorCreate , RxRenderStateVectorDestroy

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:21 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)