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>GXGetViewportv</title>
10</head>
11
12<body>
13
14<h1 align="left">GXGetViewportv</h1>
15
16<h2>C Specification</h2>
17
18<dl>
19<dd><pre><CODE>#include &lt;revolution/gx.h&gt;</CODE></pre>
20  </dd>
21<dd><pre><CODE>void GXGetViewportv( f32* vp );</CODE></pre>
22  </dd>
23</dl>
24
25<h2>Arguments</h2>
26<TABLE border="1" cellpadding="3" cellspacing="0.1">
27  <tr>
28<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>vp</font></strong></em></TD>
29<TD width="520">Pointer to a floating point type array. Minimum size is <code>GX_VIEWPORT_SZ</code>.</TD>
30    </tr>
31</TABLE>
32<h2>Return Values</h2>
33
34<p>None.</p>
35<H2>Description</H2>
36<P>This function gets the current viewport parameters and places them in array <code><em><strong>vp</strong></em></code>.&nbsp;</P>
37<P>The function <a href="GXSetViewportv.html"><code>GXSetViewportv</code></a> sets the viewport in vector form.&nbsp;The order of parameters in <em><strong><code>vp</code></strong></em> corresponds to the order of parameters in <a href="GXSetViewport.html"><code>GXSetViewport</code></a>. The array returned by <a href="GXGetViewportv.html"><code>GXGetViewportv</code></a> can be supplied as an argument to <a href="GXProject.html"><code>GXProject</code></a>.</P>
38<H2>Example</H2>
39<P><code>f32 vp[GX_VIEWPORT_SZ];<br> <br> <a href="GXGetViewportv.html">GXGetViewPortv</a>( vp );<br> vp[2] = 512.0f; // change width to 512<br> <a href="GXSetViewportv.html">GXSetViewportv</a>( vp );</code></P>
40<P>The viewport is typically set using parameters derived from the current render mode. For more information, see <a href="../Framebuffer/RenderMode.html"><code>Render Modes</code></a>.</P>
41
42<h2>See Also</h2>
43
44<p><a href="../Culling/GXSetScissor.html">GXSetScissor</a><br> <a href="../../mtx/Projection/MTXFrustum.html">MTXFrustum</a><br> <a href="../Framebuffer/RenderMode.html">Render Modes</a></p>
45<H2>Revision History</H2>
46<P>03/01/2006 Initial version.</P>
47</BODY>
48</HTML>