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>GXSetCoPlanar</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GXSetCoPlanar</H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15<PRE>#<CODE>include &lt;revolution/gx.h&gt;</CODE></PRE>
16  <DD>
17<PRE><CODE>void GXSetCoPlanar( <A href="../Enumerated_Types/GXBool.html">GXBool</A> enable );</CODE></PRE>
18</DL>
19<H2>Arguments</H2>
20<TABLE border="1" cellpadding="3" cellspacing="0.1">
21  <TBODY>
22    <TR>
23<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>enable</FONT></STRONG></EM></TD>
24<TD width="520">Coplanar mode is enabled when <EM><STRONG>enable</STRONG></EM> is set to <CODE>GX_ENABLE</CODE>. The last polygon to be rendered before coplanar mode is enabled will become the reference plane.<br>Coplanar mode is disabled when <EM><STRONG>enable</STRONG></EM> is set to <CODE>GX_DISABLE</CODE>.</TD>
25    </TR>
26  </TBODY>
27</TABLE>
28<H2>Return Values</H2>
29<P>None.</P>
30<H2>Description</H2>
31<P>This function enables coplanar mode when <EM><STRONG>enable</STRONG></EM> is set to <CODE>GX_ENABLE</CODE>. When coplanar mode is enabled, every polygon will be rendered on the reference plane with the same Z value as the reference plane. This plane is defined by the last polygon rendered before coplanar mode was enabled (the reference polygon).
32</P>
33<P>
34The rendering procedure is as follows.<br><br>
35
361. Always set the Z comparison mode to <CODE>GX_LEQUAL</CODE>.<br>2. Render the reference polygon.<br>3. Call <CODE>GXSetCoplanar(GX_ENABLE)</CODE> to enable coplanar mode. The reference plane will be defined by the reference polygon.<br>4. Polygons are rendered from back to front. These polygons share the same plane as the reference polygon.<br>5. Call <CODE>GXSetCoplanar(GX_DISABLE)</CODE> to disable coplanar mode.<br>
37</P>
38
39<P>The reference polygon does not need to be visible. You can use the following command to make the reference polygon invisible.</P>
40<P><CODE><A href="GXSetCullMode.html">GXSetCullMode</A>(GX_CULL_ALL);</CODE></P>
41<P>However, the reference polygon must not be entirely outside the viewport; in other words, it cannot be placed where it will be trivially rejected by clipping.</P>
42<P>
43Coplanar mode is disabled when <EM><STRONG>enable</STRONG></EM> is set to <CODE>GX_DISABLE</CODE>. Coplanar mode is also disabled when the <A href="../Management/GXInit.html"><CODE>GXInit</CODE></A> function has been called.
44</P>
45
46<H2>See Also</H2>
47<P><A href="GXSetCullMode.html"><CODE>GXSetCullMode</CODE></A></P>
48<H2>Revision History</H2>
49<P>
502008/05/13 Cleaned up content.<br>2006/03/01 Initial version.
51</P>
52<hr><p>CONFIDENTIAL</p></body>
53</HTML>