GXSetDispCopyDst

C Specification

#include <revolution/gx.h>
void GXSetDispCopyDst( u16 wd, u16 ht );

Arguments

wd The distance between successive lines in the XFB, in pixels. Must be a multiple of 16.
ht The XFB height in line units.

Return Values

None.

Description

This function sets the width, wd, height,ht, of the display buffer in pixels. The application typically renders an image into the Embedded Frame Buffer (EFB, source) and then copies it into an External Frame Buffer (XFB, destination) in main memory. wd specifies the number of pixels between adjacent 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 GXSetDispCopyYScale.

Note: The number of actual lines copied to XFB is determined based on source EFB height (set by GXSetDispCopySrc) and vertical scale. Therefore you should set ht argument same as the number of lines actually copied. See GXSetDispCopyYScale page for details. You cannot control the height of XFB by just changing ht.

See Also

GXCopyDisp
GXSetDispCopySrc
GXSetDispCopyYScale

Revision History

2006/03/01 Initial version


CONFIDENTIAL