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>GXDrawSphere1</title>
10</head>
11
12<body>
13
14<h1 align="left">GXDrawSphere1</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20<dd><PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE></dd>
21<dd><pre><CODE>void GXDrawSphere1( u8 depth );</CODE></pre></dd>
22</dl><h2>Arguments</h2>
23<TABLE border="1" cellpadding="3" cellspacing="0.1">
24  <tr>
25<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>depth</font></strong></em></TD>
26<TD width="520">Number of segmentation levels</TD>
27    </tr>
28</TABLE>
29<h2>Return Values</h2>
30
31<p>None.</p>
32<H2>Description</H2>
33<P>This function draws a unit sphere by recursively subdividing an icosahedron.&nbsp;You can specify the number of levels of subdivision using <code><em><strong>depth</strong></em></code>. For example, a <code><strong><em>depth</em></strong></code> of 0 will draw an icosahedron.&nbsp;A <code><em><strong>depth</strong></em></code> of 1 will subdivide each triangle of the icosahedron into four triangles, for a total of 80 triangles.</P>
34<P>By default, this function generates both position and normal information in 32-bit floating point. The function saves the current vertex descriptor and the vertex attribute format used before drawing (and restores them afterward), so as not to interfere with the application's state.&nbsp; An example usage is:<br></P>
35<P><a href="GXDrawSphere.html">GXDrawSphere1</a>(2);</code><br></P>
36<P><br> The model is drawn centered about the origin. There are 320 triangles.</P>
37
38
39
40
41<h2>See Also</h2>
42
43<p><a href="GXDrawSphere.html"><CODE>GXDrawSphere</CODE></a></p>
44<H2>Revision History</H2>
45<P>03/01/2006 Initial version.</P>
46</BODY>
47</HTML>