1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>GXSetViewportJitter</title>
10</head>
11
12<body>
13
14<h1 align="left">GXSetViewportJitter</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXSetViewportJitter(
21    f32 xOrig,
22    f32 yOrig,
23    f32 wd,
24    f32 ht,
25    f32 nearZ,
26    f32 farZ,
27    u32 field );
28</pre></dd></dl>
29
30<h2>Arguments</h2>
31<TABLE class="arguments" border="1" >
32  <tr>
33<TH>xOrig</TH>
34<TD>Coordinate (in pixels) of the leftmost side of the viewport. Recommended value range: <CODE>0.0f</CODE> &#x2266; <SPAN class="argument">xOrig</SPAN> &lt; <CODE>640.0f</CODE></TD>
35  </tr>
36  <tr>
37<TH>yOrig</TH>
38<TD>Coordinate (in pixels) of the topmost side of the viewport. Recommended value range: <CODE>0.0f</CODE> &#x2266; <SPAN class="argument">yOrig</SPAN> &lt; <CODE>528.0f</CODE></TD>
39  </tr>
40  <tr>
41<TH>wd</TH>
42<TD>Width of the viewport (in pixels). Recommended value range: <CODE>0.0f</CODE> &lt; <SPAN class="argument">wd</SPAN> &#x2266; (<CODE>640.0f</CODE> - <SPAN class="argument">xOrig</SPAN>)</TD>
43  </tr>
44  <tr>
45<TH>ht</TH>
46<TD>Height of the viewport (in pixels). Recommended value range: <CODE>0.0f</CODE> &lt; <SPAN class="argument">ht</SPAN> &#x2266; (<CODE>528.0f</CODE> - <SPAN class="argument">yOrig</SPAN>)</TD>
47  </tr>
48  <tr>
49<TH>nearZ</TH>
50<TD>Floating-point value for the near side of the depth scale.</TD>
51  </tr>
52  <tr>
53<TH>farZ</TH>
54<TD>Floating-point value for the far side of the depth scale.</TD>
55  </tr>
56  <tr>
57<TH>field</TH>
58<TD>Whether the next field is even (0) or odd (1).</TD>
59  </tr>
60</TABLE>
61
62<h2>Return Values</h2>
63<p>None.</p>
64
65<H2>Description</H2>
66<P>Sets the viewport and adjusts the viewport's line offset for interlaced field rendering. Depending on whether the viewport starts on an even or odd line, and whether the next <SPAN class="argument">field</SPAN> to be rendered is even (0) or odd (1), the viewport may be adjusted by half a line. This has the same effect as slightly tilting the camera down and is necessary for interlaced field rendering. No other camera adjustment (i.e., the projection matrix doesn't change) is needed for interlaced field rendering.</P>
67<P>Typical usage is shown below:<br></P>
68<BLOCKQUOTE><code>GXSetViewportJitter(0.0f, 0.0f, 640.0f, 240.0f, 0.0f, 1.0f, <a href="../../vi/VIGetNextField.html">VIGetNextField</a>());</code></BLOCKQUOTE>
69<P><B>Note:</B> This function should only be applied to field rendering. If you use this for other rendering modes, such as interlaced frame rendering or progressive mode, it may cause redundant flickering.</P>
70<P>To set a viewport without jitter, use the <A href="GXSetViewport.html"><CODE>GXSetViewport</CODE></A> function.</P>
71
72<h2>See Also</h2>
73<P>
74<a href="../Framebuffer/RenderMode.html">Render Modes</a><BR> <a href="GXSetViewport.html"><CODE>GXSetViewport</CODE></a>
75</p>
76
77<H2>Revision History</H2>
78<P>
792008/12/04 Revised the description of depth scale.<br>2006/03/01 Initial version.
80</P>
81
82<hr><p>CONFIDENTIAL</p></body>
83</HTML>