1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<TITLE>GXInitFogAdjTable</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GXInitFogAdjTable</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15<PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
16  <DD>
17<PRE><CODE>void GXInitFogAdjTable(
18<a href="../Structures/GXFogAdjTable.html">GXFogAdjTable</a>*  table,
19u16             width,
20f32             projmtx[4][4] );</CODE></PRE>
21</DL>
22<H2>Arguments</H2>
23<TABLE border="1" cellpadding="3" cellspacing="0.1">
24  <TBODY>
25    <TR>
26<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE>table</FONT></STRONG></EM></TD>
27<TD width="520">The range adjustment parameter table that uses <CODE><A href="GXSetFogRangeAdj.html">GXSetFogRangeAdj</A></CODE> to send to the graphics pipe.</TD>
28    </TR>
29    <TR>
30<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE>width</FONT></STRONG></EM></TD>
31<TD width="520">Width of the viewport (in pixels). Match this value to that of the current viewport's settings. Failure to do so may result in an incorrect range adjustment.</TD>
32    </TR>
33    <TR>
34<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE>projmtx</FONT></STRONG></EM></TD>
35<TD width="520">The project matrix used in rendering for the viewport.</TD>
36    </TR>
37  </TBODY>
38</TABLE>
39<H2>Return Values</H2>
40<P>None.</P>
41<H2>Description</H2>
42<P>This function generates the standard range adjustment table and puts the results into <code><strong><em>table</em></strong></code> (the user must allocate <font face="Courier New"><strong><em>table</em></strong></font>). This table can be used by <a href="GXSetFogRangeAdj.html">GXSetFogRangeAdj</a> to adjust the visual-space Z used for fog based upon the X position of the pixels being rendered. The Y direction is not compensated for.&nbsp;This effectively increases the fog density at the edges of the screen, making for a more realistic fog effect.&nbsp;The width of the viewport is specified using <code><em><strong>width</strong></em></code>.&nbsp;The <em><strong><code>projmtx</code></strong></em> parameter is the projection matrix that is used to render into the viewport.&nbsp;It must be specified so that the function can compute the X extent of the viewing frustum in visual space.</P>
43
44
45<H2>See Also</H2>
46<P><a href="GXSetFog.html">GXSetFog</a><br> <a href="GXSetFogRangeAdj.html">GXSetFogRangeAdj</a><br> <a href="../Structures/GXFogAdjTable.html">GXFogAdjTable</a><br></P>
47<H2>Revision History</H2>
48<P>03/01/2006 Initial version.</P>
49</BODY>
50</HTML>