<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iphone.mitchallen.com &#187; GLUT</title>
	<atom:link href="http://mitchallen.com/iphone/archives/tag/glut/feed" rel="self" type="application/rss+xml" />
	<link>http://mitchallen.com/iphone</link>
	<description>random notes on iPhone development</description>
	<lastBuildDate>Tue, 10 Aug 2010 20:36:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Getting started with OpenGL on the Mac</title>
		<link>http://mitchallen.com/iphone/archives/50</link>
		<comments>http://mitchallen.com/iphone/archives/50#comments</comments>
		<pubDate>Mon, 02 Mar 2009 19:28:40 +0000</pubDate>
		<dc:creator>Mitch  Allen</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[newbie]]></category>
		<category><![CDATA[GLUT]]></category>
		<category><![CDATA[graphics]]></category>

		<guid isPermaLink="false">http://mitchallen.com/iphone/?p=50</guid>
		<description><![CDATA[The iPhone uses a special form of OpenGL known as OpenGL ES. The ES stands for &#8220;embedded systems.&#8221; It&#8217;s a scaled back version to fit on small devices (like the iPhone). I&#8217;ve decided to teach myself Open GL first &#8211; then go through the pain of learning OpenGL ES &#8211; which means when I scale [...]]]></description>
			<content:encoded><![CDATA[<p>The iPhone uses a special form of <a href="http://www.khronos.org/opengl/">OpenGL</a> known as <a href="http://www.khronos.org/opengles/">OpenGL ES</a>.  The ES stands for &#8220;embedded systems.&#8221;  It&#8217;s a scaled back version to fit on small devices (like the iPhone).</p>
<p>I&#8217;ve decided to teach myself Open GL first &#8211; then go through the pain of learning OpenGL ES &#8211; which means when I scale back to ES, some features I&#8217;m going to learn about may be missing.  </p>
<p>Even though I&#8217;m more comfortable in Windows, I&#8217;m going to make life even more complicated by learning OpenGL on the Mac first.</p>
<p><strong>OpenGL on the Mac</strong></p>
<p>To get started developing for OpenGL on the Mac you are going to need Xcode.  See my previous post for information on that.  I&#8217;m assuming you are using the latest version of Mac OS X.</p>
<p>Then what you need to do is visit this link:</p>
<p><a href="http://blog.onesadcookie.com/2007/12/xcodeglut-tutorial.html">http://blog.onesadcookie.com/2007/12/xcodeglut-tutorial.html</a></p>
<p>At this point you could be done.  What I&#8217;m doing here is taking my notes from that article and compressing them.  In a few places I did things a little differently.  But in each case the goal was met:  have a working project that will compile OpenGL and GLUT code.</p>
<ol>
<li>In Xcode select: <strong>File / New Project &#8230;</strong></li>
<li>Under <strong>Mac OS X</strong> select: <strong>Other</strong></li>
<li>Click on: <strong>Empty Project</strong></li>
<li>Click: <strong>Choose &#8230;</strong></li>
<li>Select your development root directory</li>
<li>Click: <strong>New Folder</strong></li>
<li>Give the folder the name of your project, like <em>TestOpenGL</em></li>
<li>For <strong>Save As</strong> enter the name of your project, like <em>TestOpenGL</em></li>
<li>Click: <strong>Save</strong> </li>
<li>Under <strong>Groups &amp; Files</strong> right-click on <strong>Targets</strong></li>
<li>Select: <strong>Add / New Target &#8230;</strong></li>
<li>Under <strong>Mac OS X</strong> select: <strong>Cocoa</strong></li>
<li>Select: <strong>Application</strong></li>
<li>Click: <strong>Next</strong></li>
<li>Enter a <strong>Target Name</strong>, like <em>TestOpenGL</em></li>
<li>Click: <strong>Finish</strong></li>
<li>You&#8217;ll be presented with a <strong>Target &#8220;<em>TestOpenGL</em>&#8221; Info</strong> window</li>
<li>Scroll to the bottom and double click: <strong>GCC_PREFIX_HEADER</strong></li>
<li>Clear the contents and click <strong>OK</strong></li>
<li>Close the <strong>Info</strong> window</li>
<li>In the <strong>Groups &amp; Files</strong> window of Xcode, right click on the <strong>Products</strong> folder</li>
<li>Select: <strong>Add / Existing Frameworks &#8230;</strong></li>
<li>Expand: <strong>Frameworks</strong></li>
<li>Select: <strong>GLUT.framework</strong></li>
<li>Apple-key + click <strong>OpenGL.framework</strong></li>
<li>Click: <strong>Add</strong></li>
<li>You&#8217;ll see a dialog box, just use the defaults and click <strong>Add</strong></li>
<li>In the <strong>Groups &amp; Files</strong> window of Xcode, right click on the <strong>Products</strong> folder</li>
<li>Select: <strong>Add / New File &#8230;</strong></li>
<li>Under <strong>Mac OS X</strong> select: <strong>C and C++</strong></li>
<li>Select: <strong>C File</strong></li>
<li>Click: <strong>Next</strong></li>
<li>Name it <strong>main.c</strong></li>
<li>Click: <strong>Finish</strong></li>
</ol>
<div>Now you have a main.c file where you can plug in OpenGL code &#8211; including code that uses the GLUT framework &#8211; from your favorite tutorial. It should compile and run on the Mac just fine.</div>
]]></content:encoded>
			<wfw:commentRss>http://mitchallen.com/iphone/archives/50/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
