Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

Example Pipeline Definition
[PlayStation 2]


Defines

#define  rwPDS_G3_Example_CodeArraySize   (4)
#define  rwPDS_G3_Example_MatPipeRegister()
#define  rwPDS_G3_Example_GrpMatPipeRegister()
#define  rwPDS_G3_Example_AtmPipeRegister()
#define  rwPDS_G3_Example_GrpAtmPipeRegister()

Variables

RwUInt64  G3_ExamplePER
void *  rwPDS_G3_Example_VU1Transforms [rwPDS_G3_Example_CodeArraySize]
RpPDSSkyVU1CodeTemplate  rwPDS_G3_Example_VU1Code
RpPDSSkyMatTemplate  rwPDS_G3_Example_MatPipe
RpPDSSkyMatTemplate  rwPDS_G3_Example_GrpMatPipe
RpPDSSkyObjTemplate  rwPDS_G3_Example_AtmPipe
RpPDSSkyObjTemplate  rwPDS_G3_Example_GrpAtmPipe

Detailed Description

G3_Example rendering pipeline.

G3_Example Pipeline Overview

Documentation for the dummy G3_Example rendering pipeline. This pipeline does not exist within the API, but is documented as an example template. It is designed to describe all the rendering pipelines.

Whilst the rendering features of the pipelines may vary visually they are all defined in a standard fashion. This example pipeline tries to document the template features, where as the actual documentation for a pipeline just details the names of the elements defining that pipeline.

Some pipelines will define new vector (VU1) code. These pipelines will define the following :-

All pipeline will define some registration macros and definition structures. These structures define how the pipeline should be constructed. The registration macros are provided as helper macros to allow easy attachment of the individual pipelines. The example pipeline contains the following definition structures :- and the following registration macros :-

Define Documentation

 
#define rwPDS_G3_Example_AtmPipeRegister
 
 

Value:

RpPDSRegisterObjPipe( &rwPDS_G3_Example_AtmPipe,                        \
                      rwPDS_G3_Example_AtmPipeID )
This helper registration macro is registering the rwPDS_G3_Example_AtmPipe object pipe definition structure with the rwPDS_G3_Example_AtmPipeID. The PDS will then create the object pipeline from the pipe definition structure and associate it with the pipe ID. Then RpPDSGetPipe can be used to retrieve the RxPipeline once constructed.
See also:
RpPDSRegisterObjPipe , RpPDSSkyObjPipeCreate
#define rwPDS_G3_Example_CodeArraySize   (4)
 

The number of elements in the VU1 code array. When the pipeline is being created this defines the number of elements in the array. For more detailed description of VU1 code arrays within RenderWare Graphics see RxPipelineNodePS2AllMatSetVU1CodeArray and it's associated documentation.

See also:
rwPDS_G3_Example_VU1Transforms , RxPipelineNodePS2AllMatSetVU1CodeArray
 
#define rwPDS_G3_Example_GrpAtmPipeRegister
 
 

Value:

RpPDSRegisterGrpObjPipe( &rwPDS_G3_Example_AtmPipe,                     \
                         rwPDS_G3_Example_GrpAtmPipeID,                 \
                         rwPDS_G3_Example_GrpMatPipeID )
This helper registration macro is almost identical to rwPDS_G3_Example_GrpAtmPipeRegister but is registering a grouped objected pipeline. Hence there is no need to attach material pipelines to the materials as the grouped material pipeline is used in their place.
See also:
RxPipelineNodePS2AllGroupMeshes , RpPDSRegisterObjPipe , RpPDSSkyObjPipeCreate
 
#define rwPDS_G3_Example_GrpMatPipeRegister
 
 

Value:

RpPDSRegisterMatPipe( &rwPDS_G3_Example_MatPipe,                        \
                      rwPDS_G3_Example_GrpMatPipeID )
This helper registration macro is almost identical to rwPDS_G3_Example_MatPipeRegister but is registering a grouped material pipeline.
See also:
RxPipelineNodePS2AllGroupMeshes , RpPDSRegisterMatPipe , RpPDSSkyMatPipeCreate
 
#define rwPDS_G3_Example_MatPipeRegister
 
 

Value:

RpPDSRegisterMatPipe( &rwPDS_G3_Example_MatPipe,                        \
                      rwPDS_G3_Example_MatPipeID )
This helper registration macro is registering the rwPDS_G3_Example_MatPipe pipe definition structure with the rwPDS_G3_Example_MatPipeID. The PDS will then create a material pipeline from the pipe definition structure and associate it with the pipe ID. Then RpPDSGetPipe can be used to retrieve the RxPipeline once constructed.
See also:
RpPDSRegisterMatPipe , RpPDSSkyMatPipeCreate

Variable Documentation

RwUInt64 G3_ExamplePER
 

Example VU1 code symbol. These VU1 code elements are stored in the rwPDS_G3_Example_VU1Transforms code array.

RwUInt64 _rpPDSVU1CodeSymb(G3_ExamplePER);   // Perspective (PER) rendering
RwUInt64 _rpPDSVU1CodeSymb(G3_BFExamplePER); // Back face culling PER rendering
RwUInt64 _rpPDSVU1CodeSymb(G3_ExampleISO);   // Isometric (ISO) rendering
RwUInt64 _rpPDSVU1CodeSymb(G3_BFExampleISO); // Back face culling ISO rendering
   

Or alternatively the VU1 code could be stored in a custom section with :-

RwUInt64 G3_ExamplePER   __attribute__ ((section(".vudata")));
RwUInt64 G3_BFExamplePER __attribute__ ((section(".vudata")));
RwUInt64 G3_ExampleISO   __attribute__ ((section(".vudata")));
RwUInt64 G3_BFExampleISO __attribute__ ((section(".vudata")));
   
See also:
rwPDS_G3_Example_VU1Transforms , RxPipelineNodePS2AllMatSetVU1CodeArray
RpPDSSkyObjTemplate rwPDS_G3_Example_AtmPipe
 

Initial value:

{
    rwID_PDSPLUGIN,
    rwPDS_G3_Example_AtmPipeID,
    RpAtomicPS2AllObjectSetupCallBack,
    (RxPipelineNodePS2AllObjectFinalizeCallBack)NULL,
    NULL
}
The G3_Example object pipeline definition structure. Presently all the object pipelines are created off the RxNodeDefinitionGetPS2All node.
See also:
RpPDSSkyObjTemplate , RpPDSRegisterPipe , RpPDSRegisterObjPipe , RpPDSRegisterGrpObjPipe , RpPDSSkyObjPipeCreate , RxNodeDefinitionGetPS2All
RpPDSSkyObjTemplate rwPDS_G3_Example_GrpAtmPipe
 

The grouped G3_Example object pipeline definition structure. Pipelines are constructed identically as the non-grouped (rwPDS_G3_Example_AtmPipe) pipeline, except the material pipeline is grouped onto the object pipeline.

Once the grouped material pipeline has been created it is attached to the structure's matGroup member. The grouped pipeline is then attached during object pipeline creation with RxPipelineNodePS2AllGroupMeshes.

See also:
RpPDSSkyObjTemplate , RpPDSRegisterPipe , RpPDSRegisterGrpObjPipe , RpPDSSkyObjPipeCreate , RxNodeDefinitionGetPS2All , RxPipelineNodePS2AllGroupMeshes
RpPDSSkyMatTemplate rwPDS_G3_Example_GrpMatPipe
 

Normally the grouped material pipelines will be identical to the non-grouped version. However there are a number of optimizations that could be contained between the grouped object and grouped material pipeline, hence whenever a grouped object pipeline is created a grouped material pipeline is also created.

Optimizations will normally envolving moving material specific code into the RxPipelineNodePS2AllObjectSetupCallBack. This reduces the code executed per material increasing pipeline execution performance.

See also:
rwPDS_G3_Example_MatPipe , rwPDS_G3_Example_GrpAtmPipe , RxNodeDefinitionGetPS2AllMat
RpPDSSkyMatTemplate rwPDS_G3_Example_MatPipe
 

Initial value:

{
    rwID_PDSPLUGIN,
    rwPDS_G3_Example_MatPipeID,
    { { &RxClPS2xyz,    CL_XYZ    },
      { &RxClPS2uv,     CL_UV     },
      { &RxClPS2rgba,   CL_RGBA   },
      { &RxClPS2normal, CL_NORMAL },
      { NULL,           CL_MAXCL  },
      { NULL,           CL_MAXCL  },
      { NULL,           CL_MAXCL  },
      { NULL,           CL_MAXCL  },
      { NULL,           CL_MAXCL  },
      { NULL,           CL_MAXCL  } },
    { rwPRIMTYPETRISTRIP,
      _rwskyStrideOfInputCluster,
      _rwskyTSVertexCount,
      _rwskyTLTriCount,
      _rwskyVIFOffset },
    &rwPDS_G3_Example_VU1Code,
    RpMeshPS2AllMeshInstanceTestCallBack,
    RpMeshPS2AllResEntryAllocCallBack,
    RpMeshPS2AllInstanceCallBack,
    RpMeshPS2AllBridgeCallBack,
    RpMeshPS2AllPostMeshCallBack
}
The G3_Example material pipeline definition structure. Presently all pipelines are constructed off the RxNodeDefinitionGetPS2AllMat node.
See also:
RpPDSSkyMatTemplate , rwPDS_G3_Example_VU1Code , RpPDSRegisterPipe , RpPDSRegisterMatPipe , RpPDSSkyMatPipeCreate , RxNodeDefinitionGetPS2AllMat
RpPDSSkyVU1CodeTemplate rwPDS_G3_Example_VU1Code
 

Initial value:

The VU1 code (rwPDS_G3_Example_VU1Transforms) is grouped with the number of slots in the array. This information fully describes the VU1 code array. This structure is attached to the rwPDS_G3_Example_MatPipe material pipeline descriptor to setup the VU1 code within the pipeline.
See also:
rwPDS_G3_Example_MatPipe
void* rwPDS_G3_Example_VU1Transforms[rwPDS_G3_Example_CodeArraySize]
 

Example VU1 code array. This VU1 code array will be attached to the material pipeline with RxPipelineNodePS2AllMatSetVU1CodeArray. The rxPS2ALLMATCALLBACKBRIDGE call back will select a VU1 code from the array and upload it before starting to render the material's mesh.

void * RWALIGN( rwPDS_G3_Example_VU1Transforms
                    [rwPDS_G3_Example_CodeArraySize],
                    rwFRAMEALIGNMENT ) =
{
    &G3_ExamplePER,     // TRANSTRI,  TRANSPER, TRANSNCULL
    &G3_BFExamplePER,   // TRANSTRI,  TRANSPER, TRANSCULL
    &G3_ExampleISO,     // TRANSTRI,  TRANSISO, TRANSNCULL
    &G3_BFExampleISO,   // TRANSTRI,  TRANSISO, TRANSCULL
}; 
See also:
G3_ExamplePER , rwPDS_G3_Example_MatPipeRegister , RpPDSRegisterMatPipe , RpPDSSkyMatPipeCreate , RxPipelineNodePS2AllMatSetVU1CodeArray

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