|
|
Frequently Asked Questions Performance improvement by using n-sided polygons
N-Sided Polygons
Direct3D and SGL Direct games can improve their performance by around 35% by using n-sided polygons with PowerVR instead of just triangles. This reduces software driver calculations and data bandwidth to the hardware. The format used ensures compatibility with systems that only support triangles. SGL Direct has a sgltri_quads function to complement sgltri_triangles, but for greater flexibility and performance sgltri_triangles will accept triangle lists in Direct3D format when the flags SGLTT_FACESIND3DFORMAT and SGLTT_USED3DSTRIPFLAGS are set. Look up 'triangle flags' in the Direct3D SDK help file for a full description of this format. The PowerVR driver converts fans (with either all triangles having the 'even' flag or all triangles having the 'odd' flag) to multi-sided polygons, but you must be sure to make each polygon coplanar and convex. Only the first triangle of a polygon is used to describe the entire polygon face's angle, texturing, shading and alpha blending, but the fourth and subsequent vertices should have the appropriate u,v and colour/alpha values in case the polygon is subdivided by Direct 3D clipping, or some future optimisation in the PowerVR driver or hardware needs to use them. Only the first triangle of the polygon needs to be tested by the driver for backface culling. For Direct3D programs refer to the PowerVR Direct3D documentation for a description of how to set the PowerVR HAL's state to enable reading of the triangle flags. They are normally disabled to guard against games not specifically tested on the system.
|
Confidential / provided under Non-Disclosure Agreement Copyright © 1999-2000, PowerVR Technologies and partners. PowerVR Technologies is a division of Imagination Technologies Limited. |