Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

G3x_ADLClone
[Clone Rendering Pipelines]


Defines

#define  rwPDS_G3x_ADLClone_CodeArraySize
#define  rwPDS_G3x_ADLClone_MatPipeRegister()
#define  rwPDS_G3x_ADLClone_AtmPipeRegister()

Functions

RwBool  RpPDS_G3x_ADLClone_LightingUpload (RpLight *ambient, RpLight *directional)
RpAtomic RpPDS_G3x_ADLCloneRender (RpAtomic *atomic, RwFrame **cloneFrames, RwUInt32 numClones, RwV3d *directionalLTMat)

Variables

void *  rwPDS_G3x_ADLClone_VU1Transforms [rwPDS_G3x_ADLClone_CodeArraySize]
RpPDSSkyVU1CodeTemplate  rwPDS_G3x_ADLClone_VU1Code
RwUInt64  G3x_ADLClonePER
RwUInt64  G3x_ADLCloneLinePER
RpPDSSkyMatTemplate  rwPDS_G3x_ADLClone_MatPipe
RpPDSSkyObjTemplate  rwPDS_G3x_ADLClone_AtmPipe

Detailed Description

Documentation for the G3x_ADLClone rendering pipeline. The individual pipelines are not documented fully. However an Example Pipeline Definition is fully documented and all the pipelines have the same structure.

G3x_ADLClone definitions

 
 Projection:    Perspective correct projection

 Primitive:     Triangle strips
                Triangle list

 Lighting:      Custom light buffer
                Fixed lighting

                1 Ambient light
                1 Directional light
            
 Clipping:      Fast path rendering
                Triangle fast culling

 Cloning:       48 maximum clones

 Fog:           All primitives support linear fog
 
   

This pipeline supports persistent lighting and uses a custom lighting buffer. The lighting upload function RpPDS_G3x_ADLClone_LightingUpload should be used to initialize the lighting buffer prior to pipeline execution.

This pipeline supports object cloning. This allows the application to render an atomic once specifiying an array of RwFrame pointers describing the clone locations. Using a cloning pipeline greatly improves rendering and submission performance. The atomic itself is not rendered hence it's matrix is ignored and not considered one of the clones.

A set of object clones should be rendered by calling RpPDS_G3x_ADLCloneRender. This function will test the clones visibility against the current view frustum and batch the clones for rendering.

See also:
RpPDS_G3x_ADLClone_LightingUpload , RpPDS_G3x_ADLCloneRender

Define Documentation

 
#define rwPDS_G3x_ADLClone_AtmPipeRegister
 
 

Object pipe register

See also:
rwPDS_G3_Example_AtmPipeRegister , RpPDSRegisterObjPipe
#define rwPDS_G3x_ADLClone_CodeArraySize
 

VU1 Code array size

See also:
rwPDS_G3_Example_CodeArraySize
 
#define rwPDS_G3x_ADLClone_MatPipeRegister
 
 

Material pipe register

See also:
rwPDS_G3_Example_MatPipeRegister , RpPDSRegisterMatPipe

Function Documentation

RwBool RpPDS_G3x_ADLClone_LightingUpload RpLight   ambient,
RpLight   directional
 

This function setups the custom lighting buffers used by the custom lighting cloning pipeline, G3x_ADLClone definitions. The ambient and directional lights are uploaded into vector memory for use by the custom lighting pipeline. The lighting information will persist whilst the same combination lighting pipelines are used. However, if another set of lighting pipelines are used, either another custom lighting pipeline or a generic lighting pipeline, then the lighting buffer must be reinitialized with this function.

Parameters:
ambient  Pointer to the ambient light to persist.
directional  Pointer to the Directional light to persist.
Returns:
TRUE on success : FALSE otherwise.
See also:
RpPDS_G3x_ADLCloneRender
RpAtomic* RpPDS_G3x_ADLCloneRender RpAtomic   atomic,
RwFrame **    cloneFrames,
RwUInt32    numClones,
RwV3d   directionalLTMat
 

This function should be used to render a collection of clones. The array of clone frames define the positions of the individual clones. The position of the atomic itself is ignored and isn't rendered.

The custom lighting buffer must be initialized before rendering the clones. This is done by calling RpPDS_G3x_ADLClone_LightingUpload which persists the custom lighting information.

This function should be used in place of RpAtomicRender

   // Extract the directional lights ltm at vector.
   RwFrame  *frame    = RpLightGetFrame(<Direct>);
   RwMatrix *ltm      = RwFrameGetLTM(frame);
   RwV3d    *dirLTMat = RwMatrixGetAt(ltm);

   // Setup the persistent lighting information.
   RpPDS_G3x_ADLClone_LightingUpload(<Ambient>, <Direct>);

   // Render the clones.
   RpPDS_G3x_ADLCloneRender(<Atomic>, <CloneFrames>, <NumClones>, dirLTMat);
Parameters:
atomic  Pointer to the base clone.
cloneFrames  Array of frame pointers, defining the location of each of the clones.
numClones  Number of clones to render.
directionalLTMat  Pointer to the directional light's ltm's at vector.
Returns:
The RpAtomic on success : NULL otherwise.
See also:
RpPDS_G3x_ADLClone_LightingUpload

Variable Documentation

RwUInt64 G3x_ADLCloneLinePER
 

VU1 code array node elements

See also:
G3_ExamplePER
RwUInt64 G3x_ADLClonePER
 

VU1 code array node elements

See also:
G3_ExamplePER
RpPDSSkyObjTemplate rwPDS_G3x_ADLClone_AtmPipe
 

Object pipeline template defines

See also:
rwPDS_G3_Example_AtmPipe , RpPDSSkyObjTemplate
RpPDSSkyMatTemplate rwPDS_G3x_ADLClone_MatPipe
 

Material pipeline template defines

See also:
rwPDS_G3_Example_MatPipe , RpPDSSkyMatTemplate
RpPDSSkyVU1CodeTemplate rwPDS_G3x_ADLClone_VU1Code
 

VU1 code template

See also:
rwPDS_G3_Example_VU1Code , RpPDSSkyVU1CodeTemplate
void* rwPDS_G3x_ADLClone_VU1Transforms[rwPDS_G3x_ADLClone_CodeArraySize]
 

VU1 code array

See also:
rwPDS_G3_Example_VU1Transforms

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