Data Structures | |
| struct | RpADCDataTag |
Typedefs | |
| typedef RwBool(* | RpADCMeshCallback )(RpMesh *mesh) |
Functions | |
| RwBool | RpADCPluginAttach (void) |
| RwBool | RpADCGeometryConvertIgnoreWinding (RpGeometry *geometry) |
| RwBool | RpADCGeometryConvertPreserveWinding (RpGeometry *geometry) |
| RwBool | RpADCWorldSectorConvertIgnoreWinding (RpWorldSector *sector) |
| RwBool | RpADCWorldSectorConvertPreserveWinding (RpWorldSector *sector) |
| RwInt8 * | RpADCGeometryGetADCSupport (RpGeometry *geometry) |
| RwInt8 * | RpADCWorldSectorGetADCSupport (RpWorldSector *sector) |
| RpADCMeshCallback | RpADCGetMeshCallback (void) |
| void | RpADCSetMeshCallback (RpADCMeshCallback callback) |
In order to build continuous triangle-strip structure suitable for rendering on platforms such as the PlayStation 2, degenerated vertices are inserted to create jumps from triangle to triangle through zero sized triangles. Even zero size triangles have no effect on the final scene rendering result, their vertices are as expensive to store and process as useful triangles vertices.
The ADC plugin uses a PlayStation 2 platform ability to flag triangles as not to be drawn instead of degenerated vertices insertion, reducing the amount of memory, DMA upload, and Vector Unit processing cost.
Triangle-strips indices are purged from degenerated vertex indices, and an extra array of information is used to store an ADC flag information for each index. The ADC information is instanced in the fourth field of the position cluster. To allow this instancing format, the CL_XYZW cluster is used in place of the usual CL_XYZ position cluster. This extra 32-bit word as a memory cost that is absorbed by the reduction of vertices to be instanced after degenerated vertices elimination. An ADC converted geometry or world sector can only be rendered through a rendering pipeline crafted to support the ADC flag information.
Before any of the plugin functions are used, the plugin should be attached using RpADCPluginAttach.
The PreserveWinding functions are suitable for objects that require facing information, for example, a world to be rendered with back face culling turned on. A few degenerated vertices are still used in order to preserve the strip structure from winding inversions.
In order to query if a geometry or a world sector is formatted for ADC flag support, the two following functions can be invoked
|
|
RpADCMeshCallback Optional per-mesh callback, allowing the application to opt out of conversion of specific meshes by returning FALSE.
|
|
|
RpADCGeometryConvertIgnoreWinding is used to convert a geometry into an ADC support geometry while ignoring the triangle strip winding order.
|
|
|
RpADCGeometryConvertPreserveWinding is used to convert a geometry into an ADC support geometry while preserving the triangle strip winding order.
|
|
|
RpADCGeometryGetADCSupport is used to test if a geometry is formated as an ADC flagged geometry.
|
|
|
RpADCGetMeshCallback is used to get the callback the plugin calls on each mesh during the ADC converison process.
|
|
|
RpADCPluginAttach is used to attach the ADC plugin to the RenderWare system. The plugin must be attached between initializing the system with RwEngineInit and opening it with RwEngineOpen. Note that the include file rpadc.h is required and must be included by an application wishing to use this facility. The ADC library is contained in the file rpadc.lib.
|
|
|
RpADCSetMeshCallback is used to set the callback the plugin calls on each mesh during the ADC converison process.
|
|
|
RpADCWorldSectorConvertIgnoreWinding is used to convert a sector into an ADC support sector while ignoring the triangle strips winding order.
|
|
|
RpADCWorldSectorConvertPreserveWinding is used to convert a sector into an ADC support sector while preserving the triangle strips winding order.
|
|
|
RpADCWorldSectorGetADCSupport is used to test if a sector is formated as an ADC flagged sector.
|
© 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:47:00 2004.
Send Feedback