1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>GXSetDispCopyDst</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">GXSetDispCopyDst</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/gx.h> 16 17void GXSetDispCopyDst( u16 wd, u16 ht ); 18</pre></dd></dl> 19 20<H2>Arguments</H2> 21<TABLE class="arguments" border="1" > 22 <TBODY> 23 <TR> 24<TH>wd</TH> 25<TD>The distance between XFB continuous lines in pixels. Must be a multiple of 16.</TD> 26 </TR> 27 <TR> 28<TH>ht</TH> 29<TD>The XFB height in line units.</TD> 30 </TR> 31 </TBODY> 32</TABLE> 33 34<H2>Return Values</H2> 35<P>None.</P> 36 37<H2>Description</H2> 38<P>This function sets the width <SPAN class="argument">wd</SPAN> and height<SPAN class="argument">ht</SPAN> 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. <SPAN class="argument">wd</SPAN> specifies the number of pixels between horizontal lines in the copy target buffer. This can differ from the EFB width.</P> 39<P>( The XFB address (specified by the <A href="GXCopyDisp.html"><CODE>GXCopyDisp</CODE></A> 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, <SPAN class="argument">wd</SPAN> must be specified in multiples of 16 pixels.</P> 40<P>Normally, the width of the EFB and the destination <SPAN class="argument">wd</SPAN> are the same. However, when rendering smaller images that get copied and composited into a larger XFB, the EFB width and XFB <SPAN class="argument">wd</SPAN> are not the same. An antialiased four-player split screen display is an example of this situation.</P> 41<P>Typically, <SPAN class="argument">wd</SPAN> is set using the current <A href="RenderMode.html">Render Mode</A>:</P> 42<DL><DD><CODE><A href="../Structures/GXRenderModeObj.html">GXRenderModeObj</A>* rmode = &GXNtsc240IntAa;<BR> <BR> GXSetDispCopyDst( rmode->fbWidth, rmode->fbHeight );</CODE></DD></DL> 43<P>The image can be scaled vertically during the copy. See the <A href="GXSetDispCopyYScale.html"><CODE>GXSetDispCopyYScale</CODE></A> function.<BR><BR><B>Note:</B> The number of actual lines copied to XFB is determined based on source EFB height (see the <A href="GXSetDispCopySrc.html"><CODE>GXSetDispCopySrc</CODE></A> function) and vertical scale. Therefore you must set the argument <SPAN class="argument">ht</SPAN> to be the same as the number of lines actually copied. See the <A href="GXSetDispCopyYScale.html"><CODE>GXSetDispCopyYScale</CODE></A> function for details. You cannot control the height of XFB by just changing <SPAN class="argument">ht</SPAN>.</P> 44 45<H2>See Also</H2> 46<P class="reference"> 47<A href="GXCopyDisp.html">GXCopyDisp</A>, 48<A href="GXSetDispCopySrc.html">GXSetDispCopySrc</A>, 49<A href="GXSetDispCopyYScale.html">GXSetDispCopyYScale</A> 50</P> 51 52<H2>Revision History</H2> 53<P> 542006/03/01 Initial version.<br> 55</P> 56 57<hr><p>CONFIDENTIAL</p></body> 58</HTML>