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