<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Amber Tasks</title>
	<atom:link href="http://amberissues.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://amberissues.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sat, 10 Oct 2009 10:17:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='amberissues.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Amber Tasks</title>
		<link>http://amberissues.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://amberissues.wordpress.com/osd.xml" title="Amber Tasks" />
	<atom:link rel='hub' href='http://amberissues.wordpress.com/?pushpress=hub'/>
		<item>
		<title>iPhone From Scratch pt. III</title>
		<link>http://amberissues.wordpress.com/2009/10/10/iphone-from-scratch-pt-iii/</link>
		<comments>http://amberissues.wordpress.com/2009/10/10/iphone-from-scratch-pt-iii/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 10:16:26 +0000</pubDate>
		<dc:creator>musi00e0</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://amberissues.wordpress.com/?p=30</guid>
		<description><![CDATA[Add a custom UIView-subclassed object to the window, to prepare for initializing OpenGL.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amberissues.wordpress.com&amp;blog=9520761&amp;post=30&amp;subd=amberissues&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="padding-left:30px;">Last time I talked a bit about the implementation of OpenGL ES that Apple provides its developers and the restrictions that it imposes when writing an OpenGL app. This time we will walk through obeying those constraints and write a Plain-Jane app that sets the stage for the app to properly receive and handle OpenGL commands.</p>
<h2 style="padding-left:30px;">Road Map</h2>
<p style="padding-left:30px;">The general idea here is that the simplest iPhone template gives us a Window. We will add a special View subclass to that Window in Interface Builder, then at the appointed time, initialize OpenGL with an appropriate framebuffer that conforms to Apple&#8217;s implementation.</p>
<p style="padding-left:30px;"><span id="more-30"></span></p>
<ol style="padding-left:30px;">
<li>Open the app we started in part two, or just simply create a new iPhone Application using the Window-based Application template.</li>
<li>Double-click the <code>MainWindow.xib</code> file to launch Interface Builder.</li>
<li>
<p><div id="attachment_36" class="wp-caption alignnone" style="width: 470px"><img class="size-full wp-image-36" title="01-MainWindow" src="http://amberissues.files.wordpress.com/2009/10/01-mainwindow.png?w=460&#038;h=316" alt="Double-click the xib file." width="460" height="316" /><p class="wp-caption-text">Double-click the xib file.</p></div></li>
<li>Drag the UIView element out from the Library and drop it on top of the Window in your app.</li>
<li>
<p><div id="attachment_37" class="wp-caption alignnone" style="width: 403px"><img class="size-full wp-image-37" title="02-NewView" src="http://amberissues.files.wordpress.com/2009/10/02-newview.png?w=393&#038;h=653" alt="02-NewView" width="393" height="653" /><p class="wp-caption-text">Find the UIView choice and drag it onto the Window.</p></div></li>
<li>With the new View object selected, use the Inspector to change the class to a new name. This will be the name of your special subclass.</li>
<li>
<p><div id="attachment_38" class="wp-caption alignnone" style="width: 330px"><img class="size-full wp-image-38" title="03-NewViewInWindow" src="http://amberissues.files.wordpress.com/2009/10/03-newviewinwindow.png?w=320&#038;h=502" alt="Make sure the new view object is selected in the Window after dragging and dropping it." width="320" height="502" /><p class="wp-caption-text">Make sure the new view object is selected in the Window after dragging and dropping it.</p></div></li>
<li>
<p><div id="attachment_39" class="wp-caption alignnone" style="width: 297px"><img class="size-full wp-image-39" title="04-ViewInInspector" src="http://amberissues.files.wordpress.com/2009/10/04-viewininspector.png?w=287&#038;h=406" alt="Edit the new view object to be an instance of a new class." width="287" height="406" /><p class="wp-caption-text">Edit the new view object to be an instance of a new class.</p></div></li>
<li>Now go to File &#8211; Write Class Files&#8230; to export the class definition to go with the new View subclass. Have it create the .h file, then check the check box to have Interface Builder add these files to your Xcode project.</li>
<li>At this point you can close Interface Builder, but your app won&#8217;t compile. Open up GLView.h and change the comment so that <code>GLView</code> actually inherits from a real class. Unfortunately, the comment is wrong. For iPhones, the View superclass is <code>UIView</code>, not <code>NSView</code>. The final file should look like this:</li>
</ol>
<p><code><br />
#import &lt;UIKit/UIKit.h&gt;<br />
#import &lt;Foundation/Foundation.h&gt;<br />
@interface GLView : UIView {</code></p>
<p><code>}</code></p>
<p><code> </code></p>
<p><code>@end<br />
</code><br />
Now your app should compile and run like normal, although from a visual standpoint, we can&#8217;t tell that we&#8217;ve done anything.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amberissues.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amberissues.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amberissues.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amberissues.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amberissues.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amberissues.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amberissues.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amberissues.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amberissues.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amberissues.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amberissues.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amberissues.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amberissues.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amberissues.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amberissues.wordpress.com&amp;blog=9520761&amp;post=30&amp;subd=amberissues&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amberissues.wordpress.com/2009/10/10/iphone-from-scratch-pt-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39a846803a539e0e8f3ac01576d10e21?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">musi00e0</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/01-mainwindow.png" medium="image">
			<media:title type="html">01-MainWindow</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/02-newview.png" medium="image">
			<media:title type="html">02-NewView</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/03-newviewinwindow.png" medium="image">
			<media:title type="html">03-NewViewInWindow</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/04-viewininspector.png" medium="image">
			<media:title type="html">04-ViewInInspector</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone From Scratch pt. II</title>
		<link>http://amberissues.wordpress.com/2009/10/08/iphone-from-scratch-pt-ii/</link>
		<comments>http://amberissues.wordpress.com/2009/10/08/iphone-from-scratch-pt-ii/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 07:01:32 +0000</pubDate>
		<dc:creator>musi00e0</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://amberissues.wordpress.com/?p=25</guid>
		<description><![CDATA[What's required on our part to get the iPhone to play nicely with OpenGL? <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amberissues.wordpress.com&amp;blog=9520761&amp;post=25&amp;subd=amberissues&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Whenever I begin working with a new graphics API or a new environment, I like to spend time getting acquainted with fundamental issues like the coordinate system. Often times, the first thing I do is setup hardcoded vertex buffers to draw coordinate axes just to make sure that I&#8217;m not assuming anything. That&#8217;s what I&#8217;m going to start walkng through here, explaining next to near everything along the way.</p>
<h2>Starting from Scratch</h2>
<p>Last time, just to make sure our development environment was set-up, we used the OpenGL ES template. But I am more interested in seeing how that is itself built, so I am starting with the most basic iPhone Application possible.</p>
<p><span id="more-25"></span>Start a new Xcode project but this time, pick <code>Window-Based Application</code>.</p>
<div id="attachment_26" class="wp-caption alignnone" style="width: 470px"><img class="size-full wp-image-26" title="01-NewWindowApp" src="http://amberissues.files.wordpress.com/2009/10/01-newwindowapp.png?w=460&#038;h=356" alt="Pick a Window-Based Application, the simplest template available." width="460" height="356" /><p class="wp-caption-text">Pick a Window-Based Application, the simplest template available.</p></div>
<p>Now when you run your app, you get a screen even less exciting than last post, but that&#8217;s the point. Now we&#8217;re going to add the elements we need to enable rendering to an OpenGL Context.</p>
<h2>View Subclasses</h2>
<p>All that is needed Interface-wise is to add a View to the Window. OpenGL is an API that needs to be implemented specifically for hardware, and Apple has done that implementation for us, encapsulated in a class of type <code>EAGLContext</code>. OpenGL is a C-based API so we just call OpenGL functions in the global namespace, not methods of any instance of a class. But internally, Apple&#8217;s implementation of all the OpenGL functions all end up operating on an instance of this class.  OpenGL renders graphics into a variety of blocks of memory, and one of those blocks of memory corresponds directly to the RGBA information of pixels on the screen. As part of their implementation, Apple&#8217;s engineers require this block of memory to be special, and it is our job to provide OpenGL with that memory space, but since it is special, we provide OpenGL that memory indirectly.</p>
<p>To OpenGL, the memory which contains RGBA information for what&#8217;s being drawn to the screen is nothing special. Apple&#8217;s designers and coders are the people that imposed the special requirements for this particular region of memory, encapsulated in an object of type <code>CAEAGLLayer</code>. For other types of memory that OpenGL draws into, we describe the layout of the memory using OpenGL function calls. But for this special memory used to store the framebuffer, we use Objective-C functions. But when in our program&#8217;s lifecycle to we call these Objective-C functions to configure our framebuffer&#8217;s memory? When do we tell OpenGL about this special memory? When do we instantiate the special OpenGL class that all the OpenGL functions operate on? I&#8217;ll talk about that next time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amberissues.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amberissues.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amberissues.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amberissues.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amberissues.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amberissues.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amberissues.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amberissues.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amberissues.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amberissues.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amberissues.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amberissues.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amberissues.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amberissues.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amberissues.wordpress.com&amp;blog=9520761&amp;post=25&amp;subd=amberissues&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amberissues.wordpress.com/2009/10/08/iphone-from-scratch-pt-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39a846803a539e0e8f3ac01576d10e21?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">musi00e0</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/01-newwindowapp.png" medium="image">
			<media:title type="html">01-NewWindowApp</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone From Scratch</title>
		<link>http://amberissues.wordpress.com/2009/10/05/iphone-from-scratch/</link>
		<comments>http://amberissues.wordpress.com/2009/10/05/iphone-from-scratch/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 07:16:30 +0000</pubDate>
		<dc:creator>musi00e0</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://amberissues.wordpress.com/?p=8</guid>
		<description><![CDATA[Announcing iPhone tutorials to help others. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amberissues.wordpress.com&amp;blog=9520761&amp;post=8&amp;subd=amberissues&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So here, I wanted to post some of what I have found out while learning to make iPhone games. My hope is that by posting my results it may help others to get going faster and ultimately make a better community for iPhone coders.</p>
<h2>The Baseline</h2>
<p>I imagine that anyone who may be reading this probably knows how to get started, but for completeness, let&#8217;s start with the absolutely easiest thing. This is equivalent to <code>Hello World</code>, just a proof-of-concept to verify that everything works.</p>
<p><span id="more-8"></span>Start a new Xcode project by going to <code><em><strong>File - New Project</strong></em></code>.</p>
<div id="attachment_16" class="wp-caption alignnone" style="width: 470px"><img class="size-full wp-image-16" title="Starting new project" src="http://amberissues.files.wordpress.com/2009/10/01-chooseproject.png?w=460&#038;h=356" alt="Choose OpenGL ES as a new project" width="460" height="356" /><p class="wp-caption-text">Choose OpenGL ES as a new project</p></div>
<p>Pick a reasonable place to store your project like any other, then click the nice big Build and Go button.</p>
<div id="attachment_20" class="wp-caption alignnone" style="width: 470px"><img class="size-full wp-image-20" title="New Project" src="http://amberissues.files.wordpress.com/2009/10/02-newwindow.png?w=460&#038;h=321" alt="Build the new project and run it in the Simulator." width="460" height="321" /><p class="wp-caption-text">Build the new project and run it in the Simulator.</p></div>
<p>If you click Build and Go (instead of just Building), and if you left everything else as the defaults, then Xcode will run your app in the iPhone Simulator right after it&#8217;s done compiling. You should see something exciting like this:</p>
<div id="attachment_21" class="wp-caption alignnone" style="width: 470px"><img class="size-full wp-image-21" title="Build Results" src="http://amberissues.files.wordpress.com/2009/10/03-buildresults.png?w=460&#038;h=385" alt="Standard output window for seeing compilation results." width="460" height="385" /><p class="wp-caption-text">Standard output window for seeing compilation results.</p></div>
<div id="attachment_22" class="wp-caption alignnone" style="width: 396px"><img class="size-full wp-image-22" title="Results" src="http://amberissues.files.wordpress.com/2009/10/04-results.png?w=386&#038;h=742" alt="Observe the template's content running in the iPhone Simulator" width="386" height="742" /><p class="wp-caption-text">Observe the template&#39;s content running in the iPhone Simulator</p></div>
<p>I know it&#8217;s not too exciting. Mostly this post is for <em>me</em> to build confidence in posting pictures and whatnot to these posts. Interesting (!) stuff starts next time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amberissues.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amberissues.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amberissues.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amberissues.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amberissues.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amberissues.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amberissues.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amberissues.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amberissues.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amberissues.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amberissues.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amberissues.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amberissues.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amberissues.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amberissues.wordpress.com&amp;blog=9520761&amp;post=8&amp;subd=amberissues&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amberissues.wordpress.com/2009/10/05/iphone-from-scratch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39a846803a539e0e8f3ac01576d10e21?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">musi00e0</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/01-chooseproject.png" medium="image">
			<media:title type="html">Starting new project</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/02-newwindow.png" medium="image">
			<media:title type="html">New Project</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/03-buildresults.png" medium="image">
			<media:title type="html">Build Results</media:title>
		</media:content>

		<media:content url="http://amberissues.files.wordpress.com/2009/10/04-results.png" medium="image">
			<media:title type="html">Results</media:title>
		</media:content>
	</item>
	</channel>
</rss>
