F3DEX3
|
#include <gbi.h>
Data Fields | |
short | vtrans [4] |
The viewport structure elements have 2 bits of fraction, necessary to accomodate the sub-pixel positioning scaling for the hardware. This can also be exploited to handle odd-sized viewports.
Accounting for these fractional bits, using the default projection and viewing matrices, the viewport structure is initialized thusly:
(SCREEN_WD/2)*4, -(SCREEN_HT/2)*4, G_NEW_MAXZ/2, 0, (SCREEN_WD/2)*4, (SCREEN_HT/2)*4, G_NEW_MAXZ/2, 0,
short vtrans[4] |
scale, 2 bits fraction (X and Y only)