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<H2>C Specification</H2>
13<DL>
14  <DD>
15<PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
16  <DD>
17<PRE><CODE>void GXSetDispCopyDst( u16 wd, u16 ht );</CODE></PRE>
18</DL>
19<H2>Arguments</H2>
20<TABLE border="1" cellpadding="3" cellspacing="0.1">
21  <TBODY>
22    <TR>
23<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>wd</FONT></STRONG></EM></TD>
24<TD width="520">The distance between successive lines in the XFB, in pixels. Must be a multiple of 16.</SPAN></TD>
25    </TR>
26    <TR>
27<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>ht</FONT></STRONG></EM></TD>
28<TD width="520"><SPAN>The XFB height in line units.</SPAN></TD>
29    </TR>
30  </TBODY>
31</TABLE>
32<H2>Return Values</H2>
33<P>None.</P>
34<H2>Description</H2>
35<P>This function sets the width, <em><strong><code>wd, </code></strong></em>height<code>,<em><strong>ht,</strong></em></code> 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. <CODE><EM><STRONG>wd</STRONG></EM></code> specifies the number of pixels between adjacent horizontal lines in the copy target buffer. This can differ from the EFB width.</P>
36<P>The XFB address (specified by the <CODE><A href="GXCopyDisp.html">GXCopyDisp</A></CODE> 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.&nbsp;Therefore, <code><em><strong>wd</strong></em></code> must be specified in multiples of 16 pixels.</P>
37<P>Normally, the width of the EFB and the destination <code>wd</code> are the same.&nbsp;However, when rendering smaller images that get copied and composited into a larger XFB, the EFB width and XFB <code><strong><em>wd</em></strong></code> are not the same.&nbsp;An antialiased four-player split screen display is an example of this situation.</P>
38<P>Typically, <em><strong><code>wd</code></strong></em> is set using the current <code><a href="RenderMode.html">Render Mode</a></code>:</P>
39<P><code><a href="../Structures/GXRenderModeObj.html">GXRenderModeObj</a>* rmode = &GXNtsc240IntAa;</code></P>
40<P><CODE>GXSetDispCopyDst( rmode-&gt;fbWidth, rmode-&gt;fbHeight );</CODE></P>
41<P>The image can be scaled vertically during the copy, see <a href="GXSetDispCopyYScale.html"><code>GXSetDispCopyYScale</code></a>.<br><BR><B>Note:</B> The number of actual lines copied to XFB is determined based on source EFB height (set by <a href="GXSetDispCopySrc.html"><code>GXSetDispCopySrc</code></a>) and vertical scale. Therefore you should set <i><b>ht</b></i> argument same as the number of lines actually copied. See <code><a href="GXSetDispCopyYScale.html">GXSetDispCopyYScale</a></code> page for details. You cannot control the height of XFB by just changing <i><b>ht</b></i>.<br></P>
42
43
44<H2>See Also</H2>
45<P><a href="GXCopyDisp.html">GXCopyDisp</a><br> <a href="GXSetDispCopySrc.html">GXSetDispCopySrc</a><br> <a href="GXSetDispCopyYScale.html">GXSetDispCopyYScale</a></P>
46<H2>Revision History</H2>
47<P>2006/03/01 Initial version</P><hr>
48<P>CONFIDENTIAL</p>
49</BODY>
50</HTML>