<?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>Notes of a Developer &#187; OpenGL</title>
	<atom:link href="http://www.developers-life.com/tag/opengl/feed" rel="self" type="application/rss+xml" />
	<link>http://www.developers-life.com</link>
	<description>Develop on Objective-C, UIKit, C, OpenGL for  iPhone, iPad, Mac OS X</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:49:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GLKit and MSAA</title>
		<link>http://www.developers-life.com/glkit-and-msaa.html</link>
		<comments>http://www.developers-life.com/glkit-and-msaa.html#comments</comments>
		<pubDate>Wed, 04 Jan 2012 13:03:58 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Anti-Aliasing]]></category>
		<category><![CDATA[GLKit]]></category>
		<category><![CDATA[GLKView]]></category>
		<category><![CDATA[MSAA]]></category>
		<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1356</guid>
		<description><![CDATA[Enable MSAA Anti-Aliasing in GLKit. Just enable: 12GLKView *view = &#40;GLKView *&#41;self.view; view.drawableMultisample = GLKViewDrawableMultisample4X; Without MSAA: &#160; With MSAA: GLKit_MSAA_Sample]]></description>
			<content:encoded><![CDATA[<p>Enable MSAA Anti-Aliasing in GLKit.</p>
<p>Just enable:</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">GLKView <span style="color: #002200;">*</span>view <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>GLKView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>self.view;<br />
view.drawableMultisample <span style="color: #002200;">=</span> GLKViewDrawableMultisample4X;</div></td></tr></tbody></table></div>
<p>Without MSAA:<br />
<a href="http://www.developers-life.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-04-at-2.56.51-PM.png"><img class="alignnone size-full wp-image-1357" title="GLKit without anti-aliasing" src="http://www.developers-life.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-04-at-2.56.51-PM.png" alt="" width="493" height="408" /></a></p>
<p>&nbsp;</p>
<p>With MSAA:<br />
<a href="http://www.developers-life.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-04-at-2.57.13-PM.png"><img class="alignnone size-full wp-image-1358" title="GLKit with anti-aliasing" src="http://www.developers-life.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-04-at-2.57.13-PM.png" alt="" width="589" height="399" /></a></p>
<p><a href='http://www.developers-life.com/wp-content/uploads/2012/01/MSAA_Sample.zip' target="_blank">GLKit_MSAA_Sample</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/glkit-and-msaa.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distance between vertices and magnitude of a vector</title>
		<link>http://www.developers-life.com/distance-between-vertices-and-magnitude-of-a-vector.html</link>
		<comments>http://www.developers-life.com/distance-between-vertices-and-magnitude-of-a-vector.html#comments</comments>
		<pubDate>Thu, 22 Dec 2011 19:30:05 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Vector]]></category>
		<category><![CDATA[Vertex]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1349</guid>
		<description><![CDATA[Distance between vertices: 12345678910111213static inline GLfloat Vertex3DDistanceBetweenVertices &#40;Vertex3D vertex1, Vertex3D vertex2&#41; &#123; &#160; &#160; GLfloat deltaX, deltaY, deltaZ; &#160; &#160; deltaX = vertex2.x - vertex1.x; &#160; &#160; deltaY = vertex2.y - vertex1.y; &#160; &#160; deltaZ = vertex2.z - vertex1.z; &#160; &#160; return sqrtf&#40;&#40;deltaX * deltaX&#41; + &#160; &#160; &#160; &#160; &#40;deltaY * deltaY&#41; + &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Distance between vertices:</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #a61390;">static</span> inline GLfloat Vertex3DDistanceBetweenVertices<br />
<span style="color: #002200;">&#40;</span>Vertex3D vertex1, Vertex3D vertex2<span style="color: #002200;">&#41;</span><br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; GLfloat deltaX, deltaY, deltaZ;<br />
<br />
&nbsp; &nbsp; deltaX <span style="color: #002200;">=</span> vertex2.x <span style="color: #002200;">-</span> vertex1.x;<br />
&nbsp; &nbsp; deltaY <span style="color: #002200;">=</span> vertex2.y <span style="color: #002200;">-</span> vertex1.y; <br />
&nbsp; &nbsp; deltaZ <span style="color: #002200;">=</span> vertex2.z <span style="color: #002200;">-</span> vertex1.z;<br />
<br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> sqrtf<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span>deltaX <span style="color: #002200;">*</span> deltaX<span style="color: #002200;">&#41;</span> <span style="color: #002200;">+</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#40;</span>deltaY <span style="color: #002200;">*</span> deltaY<span style="color: #002200;">&#41;</span> <span style="color: #002200;">+</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#40;</span>deltaZ <span style="color: #002200;">*</span> deltaZ<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>Magnitude of a vector:</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #a61390;">static</span> inline GLfloat Vector3DMagnitude<span style="color: #002200;">&#40;</span>Vector3D vector<span style="color: #002200;">&#41;</span><br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> sqrtf<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span>vector.x <span style="color: #002200;">*</span> vector.x<span style="color: #002200;">&#41;</span> <span style="color: #002200;">+</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#40;</span>vector.y <span style="color: #002200;">*</span> vector.y<span style="color: #002200;">&#41;</span> <span style="color: #002200;">+</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#40;</span>vector.z <span style="color: #002200;">*</span> vector.z<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>; <br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/distance-between-vertices-and-magnitude-of-a-vector.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone 3D Samples from &#8220;iPhone 3D Programming&#8221; book</title>
		<link>http://www.developers-life.com/iphone-3d-samples.html</link>
		<comments>http://www.developers-life.com/iphone-3d-samples.html#comments</comments>
		<pubDate>Wed, 09 Jun 2010 13:35:34 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[ES 2.0]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1010</guid>
		<description><![CDATA[iPhone 3D Samples from &#8220;iPhone 3D Programming Developing Graphical Applications with OpenGL ES&#8221; book. Thanks Frank and Doris Rideout and O&#8217;REILLY 31 iPhone 3D Samples OpenGL ES 1.1 and 2.0 All links direct to http://examples.oreilly.com/ All Samples HelloArrow HelloCone TouchCone ModelViewer.SimpleWireframe ModelViewer.VertexLighting ModelViewer.PixelLighting ModelViewer.ToonLighting ModelViewer.FancyWireframe ModelViewer.ObjViewer ModelViewer.Textured TextureFilters TextureFormats CameraTexture TextureAlpha Trefoil.Stencil Trefoil.FakeStencil Trefoil.Antialiasing Trefoil.Jitter [...]]]></description>
			<content:encoded><![CDATA[<p>iPhone 3D Samples from &#8220;iPhone 3D Programming Developing Graphical Applications with OpenGL ES&#8221; book.<br />
Thanks Frank and Doris Rideout and O&#8217;REILLY</p>
<p>31 iPhone 3D Samples OpenGL ES 1.1 and 2.0</p>
<p><noindex><br />
All links direct to http://examples.oreilly.com/</p>
<p><a href="http://depositfiles.com/files/8cy4ofx7u" target="blank">All Samples</a></p>
<h2>HelloArrow<a href="http://examples.oreilly.com/9780596804831/HelloArrow" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/HelloArrow/Screenshot.png" alt="" /></a></h2>
<p><span id="more-1010"></span></p>
<h2>HelloCone<a href="http://examples.oreilly.com/9780596804831/HelloCone" target="blank"></p>
<p><img src="http://examples.oreilly.com/9780596804831/HelloCone/Screenshot.png" alt="" /></a></h2>
<h2 id="TouchCone">TouchCone<a href="http://examples.oreilly.com/9780596804831/TouchCone" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/TouchCone/Screenshot.png" alt="" /></a></h2>
<h2 id="ModelViewer.SimpleWireframe">ModelViewer.SimpleWireframe<a href="http://examples.oreilly.com/9780596804831/ModelViewer.SimpleWireframe" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/ModelViewer.SimpleWireframe/Screenshot.png" alt="" /></a></h2>
<h2 id="ModelViewer.VertexLighting">ModelViewer.VertexLighting<a href="http://examples.oreilly.com/9780596804831/ModelViewer.VertexLighting" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/ModelViewer.VertexLighting/Screenshot.png" alt="" /></a></h2>
<h2 id="ModelViewer.PixelLighting">ModelViewer.PixelLighting<a href="http://examples.oreilly.com/9780596804831/ModelViewer.PixelLighting" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/ModelViewer.PixelLighting/Screenshot.png" alt="" /></a></h2>
<h2 id="ModelViewer.ToonLighting">ModelViewer.ToonLighting<a href="http://examples.oreilly.com/9780596804831/ModelViewer.ToonLighting" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/ModelViewer.ToonLighting/Screenshot.png" alt="" /></a></h2>
<h2 id="ModelViewer.FancyWireframe">ModelViewer.FancyWireframe<a href="http://examples.oreilly.com/9780596804831/ModelViewer.FancyWireframe" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/ModelViewer.FancyWireframe/Screenshot.png" alt="" /></a></h2>
<h2>ModelViewer.ObjViewer<a href="http://examples.oreilly.com/9780596804831/ModelViewer.ObjViewer" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/ModelViewer.ObjViewer/Screenshot.png" alt="" /></a></h2>
<h2 id="ModelViewer.Textured">ModelViewer.Textured<a href="http://examples.oreilly.com/9780596804831/ModelViewer.Textured" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/ModelViewer.Textured/Screenshot.png" alt="" /></a></h2>
<h2 id="TextureFilters">TextureFilters<a href="http://examples.oreilly.com/9780596804831/TextureFilters" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/TextureFilters/Screenshot.png" alt="" /></a></h2>
<h2 id="TextureFormats">TextureFormats<a href="http://examples.oreilly.com/9780596804831/TextureFormats" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/TextureFormats/Screenshot.png" alt="" /></a></h2>
<h2 id="CameraTexture">CameraTexture<a href="http://examples.oreilly.com/9780596804831/CameraTexture" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/CameraTexture/Screenshot.png" alt="" /></a></h2>
<h2 id="TextureAlpha">TextureAlpha<a href="http://examples.oreilly.com/9780596804831/TextureAlpha" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/TextureAlpha/Screenshot.png" alt="" /></a></h2>
<h2 id="Trefoil.Stencil">Trefoil.Stencil<a href="http://examples.oreilly.com/9780596804831/Trefoil.Stencil" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/Trefoil.Stencil/Screenshot.png" alt="" /></a></h2>
<h2 id="Trefoil.FakeStencil">Trefoil.FakeStencil<a href="http://examples.oreilly.com/9780596804831/Trefoil.FakeStencil" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/Trefoil.FakeStencil/Screenshot.png" alt="" /></a></h2>
<h2 id="Trefoil.Antialiasing">Trefoil.Antialiasing<a href="http://examples.oreilly.com/9780596804831/Trefoil.Antialiasing" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/Trefoil.Antialiasing/Screenshot.png" alt="" /></a></h2>
<h2 id="Trefoil.Jitter">Trefoil.Jitter<a href="http://examples.oreilly.com/9780596804831/Trefoil.Jitter" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/Trefoil.Jitter/Screenshot.png" alt="" /></a></h2>
<h2 id="AaLines">AaLines<a href="http://examples.oreilly.com/9780596804831/AaLines" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/AaLines/Screenshot.png" alt="" /></a></h2>
<h2 id="Holodeck.Clouds">Holodeck.Clouds<a href="http://examples.oreilly.com/9780596804831/Holodeck.Clouds" target="blank"><br />
<img style="width: 240px;" src="http://examples.oreilly.com/9780596804831/Holodeck.Clouds/Screenshot.png" alt="" /></a></h2>
<h2 id="Holodeck.Camera">Holodeck.Camera<a href="http://examples.oreilly.com/9780596804831/Holodeck.Camera" target="blank"><br />
<img style="width: 240px;" src="http://examples.oreilly.com/9780596804831/Holodeck.Camera/Screenshot.png" alt="" /></a></h2>
<h2 id="Klein.Fps">Klein.Fps<a href="http://examples.oreilly.com/9780596804831/Klein.Fps" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/Klein.Fps/Screenshot.png" alt="" /></a></h2>
<h2 id="Haiku">Haiku<a href="http://examples.oreilly.com/9780596804831/Haiku" target="blank"><br />
<img style="width: 240px;" src="http://examples.oreilly.com/9780596804831/Haiku/Screenshot.png" alt="" /></a></h2>
<h2 id="DistanceField">DistanceField<a href="http://examples.oreilly.com/9780596804831/DistanceField" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/DistanceField/Screenshot.png" alt="" /></a></h2>
<h2 id="SpriteSheet">SpriteSheet<a href="http://examples.oreilly.com/9780596804831/SpriteSheet" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/SpriteSheet/Screenshot.png" alt="" /></a></h2>
<h2 id="SpringyStars">SpringyStars<a href="http://examples.oreilly.com/9780596804831/SpringyStars" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/SpringyStars/Screenshot.png" alt="" /></a></h2>
<h2 id="Klein.Bumpy">Klein.Bumpy<a href="http://examples.oreilly.com/9780596804831/Klein.Bumpy" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/Klein.Bumpy/Screenshot.png" alt="" /></a></h2>
<h2 id="Klein.Cubemap">Klein.Cubemap<a href="http://examples.oreilly.com/9780596804831/Klein.Cubemap" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/Klein.Cubemap/Screenshot.png" alt="" /></a></h2>
<h2 id="CrudeBloom">CrudeBloom<a href="http://examples.oreilly.com/9780596804831/CrudeBloom" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/CrudeBloom/Screenshot.png" alt="" /></a></h2>
<h2 id="GaussianBloom">GaussianBloom<a href="http://examples.oreilly.com/9780596804831/GaussianBloom" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/GaussianBloom/Screenshot.png" alt="" /></a></h2>
<h2 id="VertexSkinning">VertexSkinning<a href="http://examples.oreilly.com/9780596804831/VertexSkinning" target="blank"><br />
<img src="http://examples.oreilly.com/9780596804831/VertexSkinning/Screenshot.png" alt="" /></a></h2>
<p></noindex></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/iphone-3d-samples.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Good book!</title>
		<link>http://www.developers-life.com/good-book.html</link>
		<comments>http://www.developers-life.com/good-book.html#comments</comments>
		<pubDate>Tue, 08 Jun 2010 21:04:05 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=999</guid>
		<description><![CDATA[Do you have a great idea for a graphics-intensive iPhone or iPad application, but don&#8217;t know how to bring it to life? This book offers the perfect solution: a crash course on the OpenGL graphics library with an overview of iPhone 3D development. Whether you&#8217;re an experienced OpenGL developer looking to build iPhone apps for [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://covers.oreilly.com/images/9780596804831/cat.gif" alt="" width="180" height="236" />Do you have a great idea for a graphics-intensive iPhone or iPad application, but don&#8217;t know how to bring it to life? This book offers the perfect solution: a crash course on the OpenGL graphics library with an overview of iPhone 3D development. Whether you&#8217;re an experienced OpenGL developer looking to build iPhone apps for the first time, or an iPhone developer wanting to learn sophisticated graphics, iPhone 3D Programming addresses both in one concise, easy-to-use guide.</p>
<p>What does it take to build an iPhone app with stunning 3D graphics? This book will show you how to apply OpenGL graphics programming techniques to any device running the iPhone OS &#8212; including the iPad and iPod Touch &#8212; with no iPhone development or 3D graphics experience required. iPhone 3D Programming provides clear step-by-step instructions, as well as lots of practical advice, for using the iPhone SDK and OpenGL.<br />
<span id="more-999"></span><br />
You&#8217;ll build several graphics programs &#8212; progressing from simple to more complex examples &#8212; that focus on lighting, textures, blending, augmented reality, optimization for performance and speed, and much more. All you need to get started is a solid understanding of C++ and a great idea for an app.</p>
<p>    * Learn fundamental graphics concepts, including transformation matrices, quaternions, and more<br />
    * Get set up for iPhone development with the Xcode environment<br />
    * Become familiar with versions 1.1 and 2.0 of the OpenGL ES API, and learn to use vertex buffer objects, lighting, texturing, and shaders<br />
    * Use the iPhone&#8217;s touch screen, compass, and accelerometer to build interactivity into graphics applications<br />
    * Build iPhone graphics applications such as a 3D wireframe viewer, a simple augmented reality application, a spring system simulation, and more</p>
<p>This book received valuable community input through O&#8217;Reilly&#8217;s Open Feedback Publishing System (OFPS). Learn more at </p>
<p><noindex><a href="http://oreilly.com/catalog/9780596804831" target="blank">Buy Book</a></p>
<p><a href="http://iphone-3d-programming.labs.oreilly.com/" target="blank">Free for online read</a></p>
<p></noindex></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/good-book.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Particles samples OpenGL ES</title>
		<link>http://www.developers-life.com/iphone-particles-samples-opengl-es.html</link>
		<comments>http://www.developers-life.com/iphone-particles-samples-opengl-es.html#comments</comments>
		<pubDate>Wed, 14 Oct 2009 17:23:47 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=588</guid>
		<description><![CDATA[This is just one possible configuration &#8211; one of the simpler ones, actually, as it is only using point rendering and simple gravity &#8211; no textures, no wind, no transparency, etc. I call this configuration &#8220;fountain&#8221;, and it&#8217;s can be created in one line of code: ParticleEmitter3D *fountain = [ParticleEmitter3D fountain]; then, you just need [...]]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Xo9sJCtzFko&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/Xo9sJCtzFko&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><img class="alignleft size-medium wp-image-589" title="Screen shot 2009-10-14 at 8.09.27 PM" src="http://www.developers-life.com/wp-content/uploads/2009/10/Screen-shot-2009-10-14-at-8.09.27-PM-199x300.png" alt="Screen shot 2009-10-14 at 8.09.27 PM" width="179" height="270" /></p>
<blockquote><p>
<span style="background-color: #ffffff;">This is just one possible configuration &#8211; one of the simpler ones, actually, as it is only using point rendering and simple gravity &#8211; no textures, no wind, no transparency, etc. I call this configuration &#8220;fountain&#8221;, and it&#8217;s can be created in one line of code:</span></p>
<p>ParticleEmitter3D *fountain = [ParticleEmitter3D fountain];<br />
then, you just need to tell the fountain to draw itself each time through your draw loop or callback&#8230;<br />
[fountain drawSelf];<br />
It&#8217;s probably going to be a few days before I get the first version of the code posted &#8211; it&#8217;s got some rough edges still, plus a few more bits of functionality I feel are needed before it can survive public scrutiny.</p>
<p>The above movie was taken on the simulator. The code does work on my first generation iPhone but I have to reduce the number of points emitted per second to get it to look good with no hiccups. I haven&#8217;t yet tested it on my second generation iPod Touch to see how much of a difference the new processor and FPU make. I&#8217;m also hoping that pooling and reusing the particles, rather than constantly allocating and freeing them will help a fair amount.</p></blockquote>
<p><noindex><a href="http://code.google.com/p/iphoneparticles/" target="_blank">Google Site</a></noindex></p>
<p>This is a particle generator wrote to help learn OpenGL ES 1.1 better. This project is intended for use on the iPhone, though imagine large chunks of it could be ported to other embedded devices that support OpenGL ES 1.1 or higher.</p>
<p><a href="http://depositfiles.com/files/x7i6ixven">iPhone Particles samples</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/iphone-particles-samples-opengl-es.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Saving screenshot of OpenGL ES content to the Photo Album</title>
		<link>http://www.developers-life.com/saving-screenshot-of-opengl-es-content-to-the-photo-album.html</link>
		<comments>http://www.developers-life.com/saving-screenshot-of-opengl-es-content-to-the-photo-album.html#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:22:01 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=572</guid>
		<description><![CDATA[Very interesting article: Anyway, for an app I&#8217;m working on, I needed to take a screenshot of OpenGL ES rendered content. I assumed there was some built in function for that, but much searching led me to the conclusion that it&#8217;s a roll-your-own kind of thing. So, after a couple of days, I was finally [...]]]></description>
			<content:encoded><![CDATA[<p>Very interesting article:</p>
<blockquote><p>Anyway, for an app I&#8217;m working on, I needed to take a screenshot of OpenGL ES rendered content. I assumed there was some built in function for that, but much searching led me to the conclusion that it&#8217;s a roll-your-own kind of thing. So, after a couple of days, I was finally able to piece together at least three or four different semi-working solutions from various forums and mailing lists, combined with some hacking about, to come up with a solution that actually works.</p>
<p>The first and last steps are easy.</p>
<p>First step, you read the GL data into a raw byte array with glReadPixels. Simple enough.</p>
<p>Last step, you save a UIImage to the Photo Album with UIImageWriteToSavedPhotosAlbum.</p>
<p>The tough part is getting that byte array into a UIImage. My first attempt was to use [UIImage imageFromData:data]. But the problem with that is that that method expects data to be in a file format of one of the supported image types of UIImage, whereas glReadPixels is just raw pixel data.</p>
<p>Digging around some more, I found [UIImage imageWithCGImage:imageRef]. You can get a CGImageRef with CGImageCreate.</p>
<p>CGImageCreate requires a CGDataProviderRef. And you can create one of those with CGDataProviderCreateWithData, using the results from glReadPixels! Finally, a path from one end to the other.</p>
<p>glReadPixels -> CGDataProviderCreateWithData -> CGImageCreate -> [UIImage imageWithCGImage:] -> UIImageWriteToSavedPhotosAlbum</p>
<p>Yay!</p>
<p>But wait. One more snag. OpenGL uses standard Cartesian coordinates. In other words, +Y is up, -Y is down. So the byte array you get with glReadPixels (and thus your final image) will be upside down. A bit of fancy bit-twiddling fixed that up. Here are the final methods, meant to be used within a UIView with a CAEAGLLayer class (just like the EAGL class in the OpenGL ES template file).
</p></blockquote>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span>UIImage <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> glToUIImage <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; NSInteger myDataLength <span style="color: #002200;">=</span> <span style="color: #2400d9;">320</span> <span style="color: #002200;">*</span> <span style="color: #2400d9;">480</span> <span style="color: #002200;">*</span> <span style="color: #2400d9;">4</span>;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// allocate array and read pixels into it.</span><br />
&nbsp; &nbsp; GLubyte <span style="color: #002200;">*</span>buffer <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>GLubyte <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> <a href="http://www.opengroup.org/onlinepubs/009695399/functions/malloc.html"><span style="color: #a61390;">malloc</span></a><span style="color: #002200;">&#40;</span>myDataLength<span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; glReadPixels<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">320</span>, <span style="color: #2400d9;">480</span>, GL_RGBA, GL_UNSIGNED_BYTE, buffer<span style="color: #002200;">&#41;</span>;<br />
&nbsp;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// gl renders &quot;upside down&quot; so swap top to bottom into new array.</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// there's gotta be a better way, but this works.</span><br />
&nbsp; &nbsp; GLubyte <span style="color: #002200;">*</span>buffer2 <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>GLubyte <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> <a href="http://www.opengroup.org/onlinepubs/009695399/functions/malloc.html"><span style="color: #a61390;">malloc</span></a><span style="color: #002200;">&#40;</span>myDataLength<span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #a61390;">for</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span> y <span style="color: #002200;">=</span> <span style="color: #2400d9;">0</span>; y &lt;<span style="color: #2400d9;">480</span>; y<span style="color: #002200;">++</span><span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #a61390;">for</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span> x <span style="color: #002200;">=</span> <span style="color: #2400d9;">0</span>; x &lt;<span style="color: #2400d9;">320</span> <span style="color: #002200;">*</span> <span style="color: #2400d9;">4</span>; x<span style="color: #002200;">++</span><span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buffer2<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#40;</span><span style="color: #2400d9;">479</span> <span style="color: #002200;">-</span> y<span style="color: #002200;">&#41;</span> <span style="color: #002200;">*</span> <span style="color: #2400d9;">320</span> <span style="color: #002200;">*</span> <span style="color: #2400d9;">4</span> <span style="color: #002200;">+</span> x<span style="color: #002200;">&#93;</span> <span style="color: #002200;">=</span> buffer<span style="color: #002200;">&#91;</span>y <span style="color: #002200;">*</span> <span style="color: #2400d9;">4</span> <span style="color: #002200;">*</span> <span style="color: #2400d9;">320</span> <span style="color: #002200;">+</span> x<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// make data provider with data.</span><br />
&nbsp; &nbsp; CGDataProviderRef provider <span style="color: #002200;">=</span> CGDataProviderCreateWithData<span style="color: #002200;">&#40;</span><span style="color: #a61390;">NULL</span>, buffer2, myDataLength, <span style="color: #a61390;">NULL</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// prep the ingredients</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">int</span> bitsPerComponent <span style="color: #002200;">=</span> <span style="color: #2400d9;">8</span>;<br />
&nbsp; &nbsp; <span style="color: #a61390;">int</span> bitsPerPixel <span style="color: #002200;">=</span> <span style="color: #2400d9;">32</span>;<br />
&nbsp; &nbsp; <span style="color: #a61390;">int</span> bytesPerRow <span style="color: #002200;">=</span> <span style="color: #2400d9;">4</span> <span style="color: #002200;">*</span> <span style="color: #2400d9;">320</span>;<br />
&nbsp; &nbsp; CGColorSpaceRef colorSpaceRef <span style="color: #002200;">=</span> CGColorSpaceCreateDeviceRGB<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; CGBitmapInfo bitmapInfo <span style="color: #002200;">=</span> kCGBitmapByteOrderDefault;<br />
&nbsp; &nbsp; CGColorRenderingIntent renderingIntent <span style="color: #002200;">=</span> kCGRenderingIntentDefault;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// make the cgimage</span><br />
&nbsp; &nbsp; CGImageRef imageRef <span style="color: #002200;">=</span> CGImageCreate<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">320</span>, <span style="color: #2400d9;">480</span>, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, bitmapInfo, provider, <span style="color: #a61390;">NULL</span>, <span style="color: #a61390;">NO</span>, renderingIntent<span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// then make the uiimage from that</span><br />
&nbsp; &nbsp; UIImage <span style="color: #002200;">*</span>myImage <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageWithCGImage<span style="color: #002200;">:</span>imageRef<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> myImage;<br />
<span style="color: #002200;">&#125;</span><br />
&nbsp;<br />
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>captureToPhotoAlbum <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; UIImage <span style="color: #002200;">*</span>image <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self glToUIImage<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; UIImageWriteToSavedPhotosAlbum<span style="color: #002200;">&#40;</span>image, self, <span style="color: #a61390;">nil</span>, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span>; <br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p><noindex><a href="http://www.bit-101.com/blog/?p=1861" target="_blank">Source</a> </noindex></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/saving-screenshot-of-opengl-es-content-to-the-photo-album.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PVRTexture &amp; Texture2D</title>
		<link>http://www.developers-life.com/pvrtexture-vs-other-texture.html</link>
		<comments>http://www.developers-life.com/pvrtexture-vs-other-texture.html#comments</comments>
		<pubDate>Wed, 29 Jul 2009 21:12:44 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Macros]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Texture]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=506</guid>
		<description><![CDATA[Hi guys! Расскажу о приимуществах и недостатках о разных видах текстурирования. Начну с текстурирования не PVR, более простое. Простота заключается в следуещих удобствах: - Возможность использовать любое расширения картинки с неодинаковой высотой и шириной (желательно до 1024&#215;1024). - Можно использовать картинки TGA, PNG, JPG, etc. - Один из значительных плюсов является простота размещения. Создается bound [...]]]></description>
			<content:encoded><![CDATA[<p>Hi guys!</p>
<p>Расскажу о приимуществах и недостатках о разных видах текстурирования.</p>
<p>Начну с текстурирования не PVR, более простое. Простота заключается в следуещих удобствах:<br />
- Возможность использовать любое расширения картинки с неодинаковой высотой и шириной (желательно до 1024&#215;1024).<br />
- Можно использовать картинки TGA, PNG, JPG, etc.<br />
- Один из значительных плюсов является простота размещения. Создается bound в который всталяется картинка.<br />
- Использование картинок с прозрачностью.</p>
<p>Примеры текстурирования приведены ниже</p>
<p><a href="http://www.developers-life.com/wp-content/uploads/2009/07/picture-12.png"><img class="alignnone size-medium wp-image-508" title="picture-12" src="http://www.developers-life.com/wp-content/uploads/2009/07/picture-12-164x300.png" alt="" width="164" height="300" /></a> <a href="http://www.developers-life.com/wp-content/uploads/2009/07/picture-2.png"><img class="alignnone size-medium wp-image-509" title="picture-2" src="http://www.developers-life.com/wp-content/uploads/2009/07/picture-2-162x300.png" alt="" width="162" height="300" /></a><br />
<span id="more-506"></span><br />
Пример исходного кода <a title="OpenGL Texture2D iPhone" href="http://depositfiles.com/files/2ac172y9u">OpenGL Texture2D</a></p>
<p>Минусы заключаются в том, что загружается долго, если текстур много и памяти много занимает.</p>
<p>Рассказывать про PVR не буду подробно, т.к. можно посмотреть пример apple <a title="PVRTextureLoader iPhone" href="http://depositfiles.com/ru/files/dq3n9f0be">PVRTextureLoader</a> (где он находится на сайте apple не помню, поэтому выложил на deposit).  Скажу вкратце, что с текстурированием такого типа работает в N раз быстрее. Порекомендую писать sh скрипты для преобразования рисунков.</p>
<p>Пример:</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #007800;">TEXTURE_TOOL</span>=<span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>Platforms<span style="color: #000000; font-weight: bold;">/</span>iPhoneOS.platform<span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>texturetool<br />
<br />
<span style="color: #007800;">$TEXTURE_TOOL</span> <span style="color: #660033;">-m</span> <span style="color: #660033;">-e</span> PVRTC &nbsp;<span style="color: #660033;">--bits-per-pixel-2</span> <span style="color: #660033;">-o</span> <span style="color: #ff0000;">&quot;$1.pvr&quot;</span> <span style="color: #660033;">-f</span> PVR <span style="color: #007800;">$1</span></div></td></tr></tbody></table></div>
<p>Пример вызова:<br />
./Script.sh fire.png</p>
<p>И еще один нюанс! PVR только квадратное расширение: 64&#215;64, 128&#215;128, etc.</p>
<p><a href="http://www.developers-life.com/wp-content/uploads/2009/07/picture-3.png"><img class="alignnone size-medium wp-image-510" title="picture-3" src="http://www.developers-life.com/wp-content/uploads/2009/07/picture-3-158x300.png" alt="" width="158" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/pvrtexture-vs-other-texture.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenGL and gif &#8211; gifPlayer for iPhone</title>
		<link>http://www.developers-life.com/opengl-and-gif-gifplayer-for-iphone.html</link>
		<comments>http://www.developers-life.com/opengl-and-gif-gifplayer-for-iphone.html#comments</comments>
		<pubDate>Mon, 27 Jul 2009 11:44:43 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[GIF]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Texture]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=498</guid>
		<description><![CDATA[It&#8217;s really easy! If you have this source code :) OpenGL GIF Player iPhone P.S.: I&#8217;ve returned!]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s really easy! If you have this source code :)</p>
<p><a style="text-decoration: none;" href="http://www.developers-life.com/wp-content/uploads/2009/07/picture-11.png"><img class="size-full wp-image-499 alignnone" title="picture-11" src="http://www.developers-life.com/wp-content/uploads/2009/07/picture-11.png" alt="" width="307" height="581" /> </a> <a href="http://www.developers-life.com/wp-content/uploads/2009/07/38351245449941a6a12277.gif"><img class="size-medium wp-image-501 alignnone" title="38351245449941a6a12277" src="http://www.developers-life.com/wp-content/uploads/2009/07/38351245449941a6a12277.gif" alt="" width="100" height="100" /></a></p>
<p><a href="http://www.developers-life.com/wp-content/plugins/download_counter/redirect.php?id=7" target="_blank"><img class="alignleft" src="http://www.developers-life.com/wp-content/plugins/download_counter/redirect.php?pid=7" border="0" alt="OpenGL GIF Player iPhone" />OpenGL GIF Player iPhone</a></p>
<p>P.S.: I&#8217;ve returned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/opengl-and-gif-gifplayer-for-iphone.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SIO2 answers on questions from forum sio2</title>
		<link>http://www.developers-life.com/sio2-answers-on-questions-from-forum-sio2.html</link>
		<comments>http://www.developers-life.com/sio2-answers-on-questions-from-forum-sio2.html#comments</comments>
		<pubDate>Sat, 30 May 2009 01:14:41 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[others]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[SIO2]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=435</guid>
		<description><![CDATA[Center of object from 12345678910111213141516171819SIO2object *tmp = sio2ResourceGetObject&#40; sio2-&#62;_SIO2resource, &#34;name of your object&#34; &#41;; &#160; &#160; &#160; &#160; &#160;tmp-&#62;buf = &#40; unsigned char * &#41;sio2MapBuffer&#40; tmp-&#62;vbo, GL_ARRAY_BUFFER &#41;; &#160; &#160; &#160; &#160; &#160;unsigned int i = 0, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; n_vert = sio2ObjectGetNumVert&#40; tmp &#41;; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Center of object</strong> <a href="http://sio2interactive.forumotion.net/sio2-engine-f3/geometric-object-center-t332.htm?highlight=center"><em>from</em></a></p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SIO2object <span style="color: #002200;">*</span>tmp <span style="color: #002200;">=</span> sio2ResourceGetObject<span style="color: #002200;">&#40;</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2resource, <span style="color: #bf1d1a;">&quot;name of your object&quot;</span> <span style="color: #002200;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tmp<span style="color: #002200;">-</span>&gt;buf <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span> <span style="color: #a61390;">unsigned</span> <span style="color: #a61390;">char</span> <span style="color: #002200;">*</span> <span style="color: #002200;">&#41;</span>sio2MapBuffer<span style="color: #002200;">&#40;</span> tmp<span style="color: #002200;">-</span>&gt;vbo, GL_ARRAY_BUFFER <span style="color: #002200;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #a61390;">unsigned</span> <span style="color: #a61390;">int</span> i <span style="color: #002200;">=</span> <span style="color: #2400d9;">0</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n_vert <span style="color: #002200;">=</span> sio2ObjectGetNumVert<span style="color: #002200;">&#40;</span> tmp <span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #a61390;">while</span><span style="color: #002200;">&#40;</span> i <span style="color: #002200;">!=</span> n_vert <span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vec3 v;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.opengroup.org/onlinepubs/009695399/functions/memcpy.html"><span style="color: #a61390;">memcpy</span></a><span style="color: #002200;">&#40;</span> <span style="color: #002200;">&amp;</span>v, <span style="color: #002200;">&amp;</span>tmp<span style="color: #002200;">-</span>&gt;buf<span style="color: #002200;">&#91;</span> i <span style="color: #002200;">*</span> <span style="color: #2400d9;">12</span> <span style="color: #002200;">&#93;</span>, <span style="color: #2400d9;">12</span> <span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #a61390;">printf</span></a><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;%f %f %f<span style="color: #2400d9;">\n</span>&quot;</span>, v.x, v.y, v.z<span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">++</span>i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tmp<span style="color: #002200;">-</span>&gt;buf <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span> <span style="color: #a61390;">unsigned</span> <span style="color: #a61390;">char</span> <span style="color: #002200;">*</span> <span style="color: #002200;">&#41;</span>sio2UnmapBuffer<span style="color: #002200;">&#40;</span> GL_ARRAY_BUFFER <span style="color: #002200;">&#41;</span>;</div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p> <strong>duplicate object</strong> <em>my version</em></p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SIO2object <span style="color: #002200;">*</span>object <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span> SIO2object <span style="color: #002200;">*</span> <span style="color: #002200;">&#41;</span>sio2ResourceGet<span style="color: #002200;">&#40;</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2resource,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SIO2_OBJECT,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #bf1d1a;">&quot;name object for duplicate&quot;</span> <span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
SIO2object &nbsp;<span style="color: #002200;">*</span>new <span style="color: #002200;">=</span> sio2ObjectDuplicate<span style="color: #002200;">&#40;</span>object, object<span style="color: #002200;">-</span>&gt;_SIO2transform, <span style="color: #bf1d1a;">&quot; name by new object&quot;</span>, <span style="color: #2400d9;">1</span><span style="color: #002200;">&#41;</span>;</div></td></tr></tbody></table></div>
<p><a href="http://www.developers-life.com/wp-content/uploads/2009/05/picture-51.png"><img src="http://www.developers-life.com/wp-content/uploads/2009/05/picture-51-300x158.png" alt="" title="picture-51" width="300" height="158" class="aligncenter size-medium wp-image-444" /></a></p>
<p>&nbsp;</p>
<p><strong>handle parent to child</strong>   <em>my version</em></p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SIO2object <span style="color: #002200;">*</span>parent <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span> SIO2object <span style="color: #002200;">*</span> <span style="color: #002200;">&#41;</span>sio2ResourceGet<span style="color: #002200;">&#40;</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2resource,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SIO2_OBJECT,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #bf1d1a;">&quot;name parent&quot;</span> <span style="color: #002200;">&#41;</span>;<br />
SIO2object <span style="color: #002200;">*</span>child <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span> SIO2object <span style="color: #002200;">*</span> <span style="color: #002200;">&#41;</span>sio2ResourceGet<span style="color: #002200;">&#40;</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2resource,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SIO2_OBJECT,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #bf1d1a;">&quot;name child&quot;</span> <span style="color: #002200;">&#41;</span>;<br />
<br />
child<span style="color: #002200;">-</span>&gt;_SIO2transform<span style="color: #002200;">-</span>&gt;_SIO2parent <span style="color: #002200;">=</span> parent<span style="color: #002200;">-</span>&gt;_SIO2transform;</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/sio2-answers-on-questions-from-forum-sio2.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create 3d earth for SIO2 project</title>
		<link>http://www.developers-life.com/create-3d-earth.html</link>
		<comments>http://www.developers-life.com/create-3d-earth.html#comments</comments>
		<pubDate>Sun, 15 Mar 2009 17:35:23 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[others]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[SIO2]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=351</guid>
		<description><![CDATA[Припомощи SIO2 мне захотелось сделать землю. Другими словами просто создать шар и наложить на него текстуру. В процессе этих действий столкнулся с некоторыми проблемками: - Это какой тип шара можно использовать в SIO2. - Размер текстуры. - Накладывание текстуры. Сейчас пошагово опишу как я это сделал: Открываем Blender. Удаляем стандартный куб. Нажимаем пробел и в [...]]]></description>
			<content:encoded><![CDATA[<p>Припомощи SIO2 мне захотелось сделать землю. Другими словами просто создать шар и наложить на него текстуру.</p>
<p>В процессе этих действий столкнулся с некоторыми проблемками:<br />
- Это какой тип шара можно использовать в SIO2.<br />
- Размер текстуры.<br />
- Накладывание текстуры.</p>
<p>Сейчас пошагово опишу как я это сделал:</p>
<p>Открываем Blender. Удаляем стандартный куб. Нажимаем пробел и в меню выбираем Add -&gt; Mesh -&gt; IcoSphere. Выставляем subdivision на 5, а радиус на 2 к примеру. В низу на панели &#8220;Link and Materials&#8221; нажимаем &#8220;Set Smooth&#8221;, а в &#8220;Mesh&#8221; создаем новую UV Texture, если ее там нету, нажав на кнопку &#8220;New&#8221;.</p>
<p><img class="aligncenter" title="Create sphere" src="http://www.developers-life.com/wp-content/uploads/2009/03/sphere.jpg" alt="" width="481" height="585" /></p>
<p><span id="more-351"></span><br />
Переходим в Shading (Нажать F5), если не создан &#8220;Link to Object&#8221;, то жмем на кнопку &#8220;Add New&#8221;. Наводим на шар и нажимаем Tab, он должен подсветиться. Переходим в текстурирование (или нажать F6) и создаем новую текстуру с типом &#8220;Image&#8221; и в настройке &#8220;Image&#8221; загружаем картинку нажав на кнопку &#8220;Load&#8221;. У текстуры ширина должна быть ровна высоте, и не более 1024 пикселов. Вот моя текстура планеты <a href="http://www.developers-life.com/wp-content/uploads/2009/03/globe_boundaries.jpg">земля</a>.</p>
<p><img class="aligncenter" title="Texture for sphere SIO2" src="http://www.developers-life.com/wp-content/uploads/2009/03/texture.jpg" alt="" width="490" height="468" /><br />
Разделим экран (нажмите на верхнюю грань и выберите &#8220;Split Area&#8221;) и в новой областе выберем &#8220;UV/Image Editor&#8221; и берем нашу текстуру. Наводим на шар нажимаем Tab, далее нажимаем D и выбираем &#8220;Textured Solid&#8221; мы наблюдаем результат ниже на картинке, текстура наложилась не правильно.</p>
<p><img class="aligncenter" src="http://www.developers-life.com/wp-content/uploads/2009/03/texturing.jpg" alt="" width="482" height="469" /></p>
<p>Текстура наложилась неправильно т.к. она по умолчанию накладывается на каждую поверхность. Выбираем шар, нажимаем Tab, нажимаем U и выбираем &#8220;Sphere form View&#8221;. Можно подкорректировать сетку наложения.</p>
<p><img class="aligncenter" title="SIO2 texturing sphere" src="http://www.developers-life.com/wp-content/uploads/2009/03/noramal_texturing.png" alt="" width="469" height="469" /><br />
Экспортируем нашу планету по примерам SIO2 (можно скачать мою <a href="http://www.developers-life.com/wp-content/plugins/download_counter/redirect.php?id=5" target="_blank"><img src="http://www.developers-life.com/wp-content/plugins/download_counter/redirect.php?pid=5" border="0" alt="" width="0" height="0" />землю</a>) и закидываем в проект (желательно использовать пример 3), в template.mm прописуем ее имя, компилируем и смотрим на результат:</p>
<p><img class="aligncenter" title="Earth for project SIO2" src="http://www.developers-life.com/wp-content/uploads/2009/03/earth.jpg" alt="" width="467" height="250" /><br />
Чтоб можно было вращать планету добавим немного кода в template.mm</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vec2 start;<br />
<span style="color: #a61390;">void</span> templateScreenTap<span style="color: #002200;">&#40;</span> <span style="color: #a61390;">void</span> <span style="color: #002200;">*</span>_ptr, <span style="color: #a61390;">unsigned</span> <span style="color: #a61390;">char</span> _state <span style="color: #002200;">&#41;</span><br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2window<span style="color: #002200;">-</span>&gt;n_touch <span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start.x <span style="color: #002200;">=</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2window<span style="color: #002200;">-</span>&gt;touch<span style="color: #002200;">&#91;</span> <span style="color: #2400d9;">0</span> <span style="color: #002200;">&#93;</span>.x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start.y <span style="color: #002200;">=</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2window<span style="color: #002200;">-</span>&gt;touch<span style="color: #002200;">&#91;</span> <span style="color: #2400d9;">0</span> <span style="color: #002200;">&#93;</span>.y;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<br />
<span style="color: #a61390;">void</span> templateScreenTouchMove<span style="color: #002200;">&#40;</span> <span style="color: #a61390;">void</span> <span style="color: #002200;">*</span>_ptr <span style="color: #002200;">&#41;</span><br />
<span style="color: #002200;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2window<span style="color: #002200;">-</span>&gt;n_touch <span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #a61390;">float</span> d1 <span style="color: #002200;">=</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2window<span style="color: #002200;">-</span>&gt;touch<span style="color: #002200;">&#91;</span> <span style="color: #2400d9;">0</span> <span style="color: #002200;">&#93;</span>.x <span style="color: #002200;">-</span> start.x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #a61390;">float</span> d2 <span style="color: #002200;">=</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2window<span style="color: #002200;">-</span>&gt;touch<span style="color: #002200;">&#91;</span> <span style="color: #2400d9;">0</span> <span style="color: #002200;">&#93;</span>.y <span style="color: #002200;">-</span> start.y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Get the object Suzanne located inside our resources.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIO2object <span style="color: #002200;">*</span>_SIO2object <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span> SIO2object <span style="color: #002200;">*</span> <span style="color: #002200;">&#41;</span>sio2ResourceGet<span style="color: #002200;">&#40;</span> sio2<span style="color: #002200;">-</span>&gt;_SIO2resource,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIO2_OBJECT,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #bf1d1a;">&quot;object/Sphere&quot;</span> <span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Check if we get a pointer.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span> _SIO2object <span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// Apply a rotation based on the</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// touch movement.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span> d1 &gt; 5.0f || d1 &lt; <span style="color: #002200;">-</span>5.0f <span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#123;</span> _SIO2object<span style="color: #002200;">-</span>&gt;_SIO2transform<span style="color: #002200;">-</span>&gt;rot<span style="color: #002200;">-</span>&gt;z <span style="color: #002200;">+=</span> <span style="color: #002200;">&#40;</span> d1 <span style="color: #002200;">*</span> 0.025f <span style="color: #002200;">&#41;</span>; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span> d2 &gt; 5.0f || d2 &lt; <span style="color: #002200;">-</span>5.0f <span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#123;</span> _SIO2object<span style="color: #002200;">-</span>&gt;_SIO2transform<span style="color: #002200;">-</span>&gt;rot<span style="color: #002200;">-</span>&gt;x <span style="color: #002200;">+=</span> <span style="color: #002200;">&#40;</span> d2 <span style="color: #002200;">*</span> 0.025f <span style="color: #002200;">&#41;</span>; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// Update the OpenGL matrix and apply the</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// new rotation specified above.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sio2TransformBindMatrix<span style="color: #002200;">&#40;</span> _SIO2object<span style="color: #002200;">-</span>&gt;_SIO2transform <span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/create-3d-earth.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

