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>GXSetProjectionv</title>
10</head>
11
12<body>
13
14<h1 align="left">GXSetProjectionv</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXSetProjectionv( const f32* ptr );
21</pre></dd></dl>
22
23<H2>Arguments</H2>
24<TABLE class="arguments" border="1" >
25  <TBODY>
26    <TR>
27<TH>ptr</TH>
28<TD>Type and pointer to matrix data</TD>
29    </TR>
30  </TBODY>
31</TABLE>
32
33<H2>Return Values</H2>
34<P>None.</P>
35
36<h2>Description</h2>
37<P>This function sets the projection matrix.&nbsp;Only two types of projection matrices are supported.</P>
38<p>Perspective Matrix Format:</p>
39
40<table border="0" width="50%" style="border-left: 1px solid; border-right: 1px solid; border-top: medium none; border-bottom: medium none">
41  <tr>
42    <td width="25%" align="center">p0</td>
43    <td width="25%" align="center">0</td>
44    <td width="25%" align="center">p1</td>
45    <td width="25%" align="center">0</td>
46  </tr>
47  <tr>
48    <td width="25%" align="center">0</td>
49    <td width="25%" align="center">p2</td>
50    <td width="25%" align="center">p3</td>
51    <td width="25%" align="center">0</td>
52  </tr>
53  <tr>
54    <td width="25%" align="center">0</td>
55    <td width="25%" align="center">0</td>
56    <td width="25%" align="center">p4</td>
57    <td width="25%" align="center">p5</td>
58  </tr>
59  <tr>
60    <td width="25%" align="center">0</td>
61    <td width="25%" align="center">0</td>
62    <td width="25%" align="center">-1</td>
63    <td width="25%" align="center">0</td>
64  </tr>
65</table>
66
67<p>Orthographic Matrix Format:</p>
68
69<table border="0" width="50%" style="border-left: 1px solid; border-right: 1px solid; border-top: medium none; border-bottom: medium none">
70  <tr>
71    <td width="25%" align="center">p0</td>
72    <td width="25%" align="center">0</td>
73    <td width="25%" align="center">0</td>
74    <td width="25%" align="center">p1</td>
75  </tr>
76  <tr>
77    <td width="25%" align="center">0</td>
78    <td width="25%" align="center">p2</td>
79    <td width="25%" align="center">0</td>
80    <td width="25%" align="center">p3</td>
81  </tr>
82  <tr>
83    <td width="25%" align="center">0</td>
84    <td width="25%" align="center">0</td>
85    <td width="25%" align="center">p4</td>
86    <td width="25%" align="center">p5</td>
87  </tr>
88  <tr>
89    <td width="25%" align="center">0</td>
90    <td width="25%" align="center">0</td>
91    <td width="25%" align="center">0</td>
92    <td width="25%" align="center">1</td>
93  </tr>
94</table>
95
96<P>The arguments specified to the <CODE>GXSetProjectionv</CODE> function follow the same form as the arguments returned by the <A href="GXGetProjectionv.html"><CODE>GXGetProjectionv</CODE></A> function.</P>
97<P>The first element of <SPAN class="argument">ptr</SPAN> is the matrix type <A href="../Enumerated_Types/GXProjectionType.html"><SPAN class="argument">type</SPAN></A> (cast to <code>f32</code>). The parameters p0 - p5 are loaded from the elements 1 - 6 of the array <SPAN class="argument">ptr</SPAN>.</P>
98<P>Only the parameters p0 - p5 (and the <A href="../Enumerated_Types/GXProjectionType.html"><SPAN class="argument">type</SPAN></A>) are actually loaded into the hardware projection matrix. All the other values are determined by the <A href="../Enumerated_Types/GXProjectionType.html"><SPAN class="argument">type</SPAN></A>.</P>
99<P>The matrix data is copied from DRAM through the CPU cache into the graphics FIFO. The matrix loaded that uses this function is therefore always coherent with the CPU cache.
100</P>
101
102<h2>See Also</h2>
103<p class="reference">
104<a href="../../mtx/Projection/MTXFrustum.html">MTXFrustum</a>,
105<a href="../../mtx/Projection/MTXPerspective.html">MTXPerspective</a>
106</p>
107
108<H2>Revision History</H2>
109<P>
1102006/03/01 Initial version.<br>
111</P>
112
113<hr><p>CONFIDENTIAL</p></body>
114</HTML>