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>C Specification</h2>
17
18<dl>
19<dd><pre><CODE>#include &lt;revolution/gx.h&gt;</CODE></pre></dd>
20<dd><pre><CODE>void GXSetViewportJitter(
21f32 xOrig,
22f32 yOrig,
23f32 wd,
24f32 ht,
25f32 nearZ,
26f32 farZ,
27u32 field );
28</CODE></pre></dd>
29</dl><h2>Arguments</h2>
30<TABLE border="1" cellpadding="3" cellspacing="0.1">
31  <tr>
32<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>xOrig</CODE></strong></em></TD>
33<TD width="520">Coordinate (in pixels) of the leftmost side of the viewport. Recommended value range: <code>0.0f &lt;= <em><strong>xOrig</strong></em> &lt; 640.0f</code></TD>
34    </tr>
35  <tr>
36<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>yOrig</CODE></strong></em></TD>
37<TD width="520">Coordinate (in pixels) of the topmost side of the viewport. Recommended value range: <code>0.0f &lt;= <em><strong>yOrig</strong></em> &lt; 528.0.0f</code></TD>
38    </tr>
39  <tr>
40<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>wd</CODE></strong></em></TD>
41<TD width="520">Width of the viewport (in pixels). Recommended value range: <code>0.0f &lt; <em><strong>wd</strong></em> &lt;= (640.0f - <em><strong>xOrig</strong></em>)</code></TD>
42    </tr>
43  <tr>
44<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>ht</CODE></strong></em></TD>
45<TD width="520">Height of the viewport (in pixels). Recommended value range: <code>0.0f &lt; <em><strong>ht</strong></em> &lt;= (528.0f - <em><strong>yOrig</strong></em>)</code></TD>
46    </tr>
47  <tr>
48<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>nearZ</CODE></strong></em></TD>
49<TD width="520">Floating point value for the near side of the depth scale. The normalized range is 0.0 to 1.0.</TD>
50    </tr>
51  <tr>
52<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>farZ</CODE></strong></em></TD>
53<TD width="520">Floating point value for the far side of the depth scale. The normalized range is 0.0 to 1.0.</TD>
54    </tr>
55  <tr>
56<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>field</CODE></strong></em></TD>
57<TD width="520">Represents whether the next field is even (0) or odd (1).</TD>
58    </tr>
59</TABLE>
60<h2>Return Values</h2>
61
62<p>None.</p>
63<H2>Description</H2>
64<P>This function sets the viewport and adjusts the viewport's line offset for interlaced field rendering.&nbsp;Depending on whether the viewport starts on an even or odd line, and whether the next <em><strong><code>field</code></strong></em> to be rendered is even (0) or odd (1), the viewport may be adjusted by half a line.&nbsp;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>
65<P>Typical usage is shown below:<br></P>
66<BLOCKQUOTE><code>GXSetViewportJitter(0.0f, 0.0f, 640.0f, 240.0f, 0.0f, 1.0f, <a href="../../vi/VIGetNextField.html">VIGetNextField</a>());</code></BLOCKQUOTE>
67<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>
68<P>To set a viewport <em>without</em> jitter, use <a href="GXSetViewport.html"><code>GXSetViewport</code></a>.</P>
69
70<h2>See Also</h2>
71
72<p><a href="../Framebuffer/RenderMode.html">Render Modes</a><br> <CODE><a href="GXSetViewport.html">GXSetViewport</a></CODE></p>
73<H2>Revision History</H2>
74<P>03/01/2006 Initial version.</P>
75</BODY>
76</HTML>