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