<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>newbie iPhone developer</title>
	<atom:link href="http://astronautz.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://astronautz.wordpress.com</link>
	<description>poor Windows coder tries to learn iPhone development</description>
	<lastBuildDate>Wed, 21 Jan 2009 21:30:01 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='astronautz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/80585f0a632369fe2f9e183eb40c9710?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>newbie iPhone developer</title>
		<link>http://astronautz.wordpress.com</link>
	</image>
			<item>
		<title>Visual Studio warnings</title>
		<link>http://astronautz.wordpress.com/2009/01/21/visual-studio-warnings/</link>
		<comments>http://astronautz.wordpress.com/2009/01/21/visual-studio-warnings/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 21:30:01 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=84</guid>
		<description><![CDATA[I found it useful to change some of the warnings generated by Visual Studio.
For instance, this statement:

if (num = 10) { doSomething(); }

Generates a warning, but I cannot see any case where this would not be a bug. So I change this warning and some others to errors: like this:

#pragma warning (error: 4715)
#pragma warning (error: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=84&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I found it useful to change some of the warnings generated by Visual Studio.</p>
<p>For instance, this statement:<br />
<code><br />
if (num = 10) { doSomething(); }<br />
</code><br />
Generates a warning, but I cannot see any case where this would not be a bug. So I change this warning and some others to errors: like this:</p>
<p><code><br />
#pragma warning (error: 4715)<br />
#pragma warning (error: 4706)<br />
#pragma warning (error: 4553)    // '==' : operator has no effect; did you intend '='?<br />
#pragma warning (error: 4150)    // deletion of pointer to incomplete type<br />
#pragma warning (error: 4390)    // empty controlled statement found;<br />
#pragma warning (disable: 4996)  // openf is dangerous (not!)<br />
</code></p>
<p>Now, there&#8217;s no way you can ignore it. By the way, there is a bug in Visual Studio, sometimes it won&#8217;t flag warning mentioned above at all.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=84&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2009/01/21/visual-studio-warnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>Some old performance tricks</title>
		<link>http://astronautz.wordpress.com/2009/01/08/63/</link>
		<comments>http://astronautz.wordpress.com/2009/01/08/63/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 23:25:41 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[iPhone development]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=63</guid>
		<description><![CDATA[The documentation for the iphone&#8217;s VFP processor says that all floating point instructions take 1 cycle, apart from divide and square root, which take 15 cycles.
This leads to a very obvious optimisation, to cache your divide operations.
In other words if you have code like this:
float fl = 1.0007f;
for (i = 0; i &#60; 16; i++)
matrix.Set(i, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=63&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The documentation for the iphone&#8217;s VFP processor says that all floating point instructions take 1 cycle, apart from divide and square root, which take 15 cycles.</p>
<p>This leads to a very obvious optimisation, to cache your divide operations.</p>
<p>In other words if you have code like this:</p>
<p>float fl = 1.0007f;<br />
for (i = 0; i &lt; 16; i++)<br />
matrix.Set(i, matrix[i]/fl);</p>
<p>you can increase performance by doing the divide outside the loop:</p>
<p>float fl = 1.0f/1.0007f;<br />
for (i = 0; i &lt; 16; i++)<br />
matrix.Set(i, matrix[i]*fl);</p>
<p>I measured this and found that it does indeed make a big improvement.</p>
<p>Also, I thought it would be interesting to try out the old <a href="http://http://betterexplained.com/articles/understanding-quakes-fast-inverse-square-root/">Quake inverse square root trick</a>.</p>
<pre><code>float InvSqrt(float x){
   float xhalf = 0.5f * x;
   int i = *(int*)&amp;x; // store floating-point bits in integer
   i = 0x5f3759d5 - (i &gt;&gt; 1); // initial guess for Newton's method
   x = *(float*)&amp;i; // convert new bits into float
   x = x*(1.5f - xhalf*x*x); // One round of Newton's method
   return x;
}
</code></pre>
<p>This code works on the iPhone, but the results are less accurate.</p>
<pre><code>float fl = 2.0f;
result = 1.f / sqrt ( fl );   // gives 0.707106769
result = InvSqrt(fl);   // gives 0.706930041
</code></pre>
<p>the actual value should be 0.70710678</p>
<p>I measured the performance and found that it&#8217;s a touch faster, but not much.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=63&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2009/01/08/63/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenGL Features Removed from iPhone</title>
		<link>http://astronautz.wordpress.com/2009/01/08/opengl-features-removed-from-iphone/</link>
		<comments>http://astronautz.wordpress.com/2009/01/08/opengl-features-removed-from-iphone/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 21:25:40 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[iPhone development]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=59</guid>
		<description><![CDATA[Full screen anti-aliasing is a feature that greatly improves the graphic quality of any game and is supported by the powervr chip. Unfortunately, you don&#8217;t have access to the feature, because the iPhone does not use EGL. Instead it uses the framebuffer extension to bind to a surface and in order to enable anti-aliasing you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=59&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Full screen anti-aliasing is a feature that greatly improves the graphic quality of any game and is supported by the powervr chip. Unfortunately, you don&#8217;t have access to the feature, because the iPhone does not use EGL. Instead it uses the framebuffer extension to bind to a surface and in order to enable anti-aliasing you have to call eglChooseConfig with the EGL_SAMPLE_BUFFERS parameter and this is not possible.</p>
<p>Funnily, enough I found a project that appears to use EGL with the iPhone: <a href="http://http://code.google.com/p/iphone-dj/">http://code.google.com/p/iphone-dj/</a></p>
<p>However, looking a bit close I see that the egl.h file does not even exist in the SDK, so the code in that project should not even compile (pretty wierd that).</p>
<p>This also means that the pbuffer isn&#8217;t supported, as that is enabled via eglChooseConfig as well. And to top this off I also heard that the GL_IMG_vertex_program extension is disabled (I think this prevents you from using bump mapping and cartoon rendering &#8211; as demoed in the powervr sdk)</p>
<p><strong>Edit:</strong></p>
<p>I reciently discovered that there exists an <a href="http://code.google.com/p/iphone-dev/">unofficial iPhone SDK</a>, which includes egl. This is probably what iphone-dj was using. So, you probably can get anti-aliasing working if you don&#8217;t mind using an unofficial SDK.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=59&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2009/01/08/opengl-features-removed-from-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>Rendering models with transparent textures</title>
		<link>http://astronautz.wordpress.com/2009/01/08/rendering-models-with-transpaent-textures/</link>
		<comments>http://astronautz.wordpress.com/2009/01/08/rendering-models-with-transpaent-textures/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 17:57:24 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=54</guid>
		<description><![CDATA[I was having problems rending low polygon trees in my scene. It was because they used transparent textures which are always problemic. I found this artical that helped me greatly:
http://www.sjbaker.org/steve/omniv/alpha_sorting.html
The solution was to render all opaque objects first, then do:
glAlphaFunc(GL_GREATER, 0.1f);
glEnable(GL_ALPHA_TEST);
and now every thing renders perfectly
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=54&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was having problems rending low polygon trees in my scene. It was because they used transparent textures which are always problemic. I found this artical that helped me greatly:</p>
<p><a href="http://http://www.sjbaker.org/steve/omniv/alpha_sorting.html">http://www.sjbaker.org/steve/omniv/alpha_sorting.html</a></p>
<p>The solution was to render all opaque objects first, then do:</p>
<p>glAlphaFunc(GL_GREATER, 0.1f);<br />
glEnable(GL_ALPHA_TEST);<br />
and now every thing renders perfectly</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=54&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2009/01/08/rendering-models-with-transpaent-textures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>Developing iPhone apps with Visual Studio</title>
		<link>http://astronautz.wordpress.com/2008/12/05/developing-iphone-apps-with-visual-studio/</link>
		<comments>http://astronautz.wordpress.com/2008/12/05/developing-iphone-apps-with-visual-studio/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 20:01:39 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iPhone development Visual Studio]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=46</guid>
		<description><![CDATA[Origonally I thought XCode was pretty good, indeed it does do somethings better than Visual Studio. However, the support for c++ is lacking, especially if you use templates. XCode can&#8217;t display template variables in the debugger window, nor does &#8220;Intelisense&#8221; work. One of my  projects has a tonne of template based classes, so that&#8217;s what [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=46&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Origonally I thought XCode was pretty good, indeed it does do somethings better than Visual Studio. However, the support for c++ is lacking, especially if you use templates. XCode can&#8217;t display template variables in the debugger window, nor does &#8220;Intelisense&#8221; work. One of my  projects has a tonne of template based classes, so that&#8217;s what pushed me to see if I could do the work on Windows instead.</p>
<p>The PowerVR SDK comes with a Windows OpenGL ES emulator. It didn&#8217;t take me long to get my code working with that, because all my code is portable: c++, stl and OpenGL. Straightaway my productivity doubled. So, now I do the implementation and debugging on Visual Studio and periodically switch to Mac to make device builds.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=46&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2008/12/05/developing-iphone-apps-with-visual-studio/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>more improvements</title>
		<link>http://astronautz.wordpress.com/2008/12/01/more-improvements/</link>
		<comments>http://astronautz.wordpress.com/2008/12/01/more-improvements/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 00:06:59 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=44</guid>
		<description><![CDATA[I did some more work on my engine.
Implemented redundant node removal and made the class hierarchy more logical and added compressed textures.
The result was that I reduced the frame time to 53ms from 63ms (presume that&#8217;s mainly because of reduced nodes)
Also discovered, that just by building on Mac that my character&#8217;s face renders correctly (I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=44&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I did some more work on my engine.</p>
<p>Implemented redundant node removal and made the class hierarchy more logical and added compressed textures.</p>
<p>The result was that I reduced the frame time to 53ms from 63ms (presume that&#8217;s mainly because of reduced nodes)</p>
<p>Also discovered, that just by building on Mac that my character&#8217;s face renders correctly (I could have sworn that it wasn&#8217;t like that on Windows)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=44&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2008/12/01/more-improvements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>Image handling on iPhone</title>
		<link>http://astronautz.wordpress.com/2008/10/07/image-handling-on-iphone/</link>
		<comments>http://astronautz.wordpress.com/2008/10/07/image-handling-on-iphone/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 22:36:40 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[iPhone development]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=18</guid>
		<description><![CDATA[At first it looks good&#8230; but (like most things) when you get into the details, you realize there are some klunky bits. So, I was just looking how to open a png file and it&#8217;s dead easy and you can do all sorts of sophisticated transformations, but if &#8211; for any reason, you need a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=18&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>At first it looks good&#8230; but (like most things) when you get into the details, you realize there are some klunky bits. So, I was just looking how to open a png file and it&#8217;s dead easy and you can do all sorts of sophisticated transformations, but if &#8211; for any reason, you need a simple pointer to the pixel data &#8211; you&#8217;re boned. It requires you to go around in hoops. And to load a texture you need the pixel data. So, how does Apple do it in their examples? Have a look:</p>
<p><a href="http://read.pudn.com/downloads120/sourcecode/macos/510268/CrashLanding/Classes/Texture2D.m__.htm">http://read.pudn.com/downloads120/sourcecode/macos/510268/CrashLanding/Classes/Texture2D.m__.htm</a></p>
<p>yep, they&#8217;re pretty much forced to go around in hoops themselves. This must be some pretty inefficient code, though because you have to copy the data twice, once from the file, then from the UIImage to some sort of wierd memory bitmap and then uploading with glTexImage2D.</p>
<p>I already have a tga class, so I&#8217;ll just store my images as tga for the time being. It looks like it&#8217;ll work a lot better than using the cocoa classes.</p>
<p>Anyways, In the final game I should use powervr compressed images. I have to look into that more, but I assume the data is just dumped into glTexImage2D as it&#8217;s read from the file. Powervr compressed images are a dark art. They can only be created via a windows tool and can&#8217;t be displayed in the emulator. Quite, ironic that Apple says in their guidlines  &#8220;use PVRTC&#8221;, and yet there&#8217;s no mac tool to create it.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=18&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2008/10/07/image-handling-on-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>Now it fully works</title>
		<link>http://astronautz.wordpress.com/2008/10/06/now-it-fully-works/</link>
		<comments>http://astronautz.wordpress.com/2008/10/06/now-it-fully-works/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 19:54:19 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[iPhone development]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=16</guid>
		<description><![CDATA[Arrgh. Finally got it working. The whole problem was because my c++ class was a member of an objective c class and objective c clases don&#8217;t call constructors. Next stop is to try out a skinned mesh.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=16&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Arrgh. Finally got it working. The whole problem was because my c++ class was a member of an objective c class and objective c clases don&#8217;t call constructors. Next stop is to try out a skinned mesh.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=16&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2008/10/06/now-it-fully-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>Xcode</title>
		<link>http://astronautz.wordpress.com/2008/10/04/xcode/</link>
		<comments>http://astronautz.wordpress.com/2008/10/04/xcode/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 17:27:09 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[iPhone development]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=12</guid>
		<description><![CDATA[So far, xcode looks really nice. It uses gcc and gdb, however it still manages to be user friendly. The debugger doesn&#8217;t handle stl properly by default, but it can be customised.
Right click variable and select &#8220;edit summary format&#8221;, then whatever you paste in their will be stored and remebered for all variable of same [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=12&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So far, xcode looks really nice. It uses gcc and gdb, however it still manages to be user friendly. The debugger doesn&#8217;t handle stl properly by default, but it can be customised.</p>
<p>Right click variable and select &#8220;edit summary format&#8221;, then whatever you paste in their will be stored and remebered for all variable of same type. For instance, this is for stl:string:</p>
<p>size={(int)$VAR.size()} &#8220;{(char *)$VAR.c_str()}:s&#8221;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=12&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2008/10/04/xcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
		<item>
		<title>Urrrgh!</title>
		<link>http://astronautz.wordpress.com/2008/10/04/urrrgh/</link>
		<comments>http://astronautz.wordpress.com/2008/10/04/urrrgh/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 16:55:56 +0000</pubDate>
		<dc:creator>lefty3</dc:creator>
				<category><![CDATA[iPhone development]]></category>

		<guid isPermaLink="false">http://astronautz.wordpress.com/?p=9</guid>
		<description><![CDATA[After spending ages trying to get stlport to compile, I found that the stl was already in the iPhone SDK&#8230; but why does it complain &#8220;file not found&#8221; when you #include string? For some reason all the .m files have to be renamed .mm (even though I was using stl from a .cpp file), otherwise [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=9&subd=astronautz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3>After spending ages trying to get stlport to compile, I found that the stl was already in the iPhone SDK&#8230; but why does it complain &#8220;file not found&#8221; when you #include string? For some reason all the .m files have to be renamed .mm (even though I was using stl from a .cpp file), otherwise it pretends that stl does not exist.</h3>
<h3>Mac development for Windows coders is simply horrible. Everything is different and the worse thing by far is the keyboard. Apparently, Spanish Mac keyboards are totally different to Spanish Windows keyboards&#8230; apart from all the usual differences, the key that the angle bracket is on is non-existant, the windows key is used instead of the Alt-gr key&#8230; except for some characters like the tilda, which is with the ñ key.</h3>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astronautz.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astronautz.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astronautz.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astronautz.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astronautz.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astronautz.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astronautz.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astronautz.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astronautz.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astronautz.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astronautz.wordpress.com&blog=5062339&post=9&subd=astronautz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://astronautz.wordpress.com/2008/10/04/urrrgh/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d7c4628f64ed7e0c891e601b6d0b46a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lefty3</media:title>
		</media:content>
	</item>
	</channel>
</rss>