#include <revolution/gx.h> void GXSetDispCopyDst( u16 wd, u16 ht );
| wd | The distance between XFB continuous lines in pixels. Must be a multiple of 16. |
|---|---|
| ht | The XFB height in line units. |
None.
This function sets the width wd and heightht of the display buffer in pixels. The application typically renders an image into the embedded frame buffer (EFB, the source) and then copies it into an external frame buffer (XFB, the destination) in main memory. wd specifies the number of pixels between horizontal lines in the copy target buffer. This can differ from the EFB width.
( The XFB address (specified by the GXCopyDisp function) must be 32-byte aligned. In addition, each line within XFB must be a multiple of 32 bytes. Each pixel in the XFB occupies two bytes. Therefore, wd must be specified in multiples of 16 pixels.
Normally, the width of the EFB and the destination wd are the same. However, when rendering smaller images that get copied and composited into a larger XFB, the EFB width and XFB wd are not the same. An antialiased four-player split screen display is an example of this situation.
Typically, wd is set using the current Render Mode:
GXRenderModeObj* rmode = &GXNtsc240IntAa;
GXSetDispCopyDst( rmode->fbWidth, rmode->fbHeight );The image can be scaled vertically during the copy. See the GXSetDispCopyYScale function.
Note: The number of actual lines copied to XFB is determined based on source EFB height (see the GXSetDispCopySrc function) and vertical scale. Therefore you must set the argument ht to be the same as the number of lines actually copied. See the GXSetDispCopyYScale function for details. You cannot control the height of XFB by just changing ht.
GXCopyDisp, GXSetDispCopySrc, GXSetDispCopyYScale
2006/03/01 Initial version.
CONFIDENTIAL