<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: OpenGL ES Tutorial for Android – Part IV &#8211; Adding colors</title>
	<atom:link href="http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Thu, 09 Sep 2010 16:49:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: vinpa</title>
		<link>http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/comment-page-1/#comment-30836</link>
		<dc:creator>vinpa</dc:creator>
		<pubDate>Wed, 17 Mar 2010 15:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-30836</guid>
		<description>Per-Erik:

Very nice tutorials; I have followed all of them up to this point.  I just wanted to say thanks for the nice documentation on the fundamentals of 3D programming using OpenGL.  The illustrations are a very nice touch to understanding the whole idea of a matrix.

One thing I found helpful when completing this tutorial was the use of glPushMatrix() and glPopMatrix() to make both squares appear:

&lt;code&gt;
@Override
	public void onDrawFrame(GL10 gl) {
		// Clear the screen and depth buffer.
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT &#124; GL10.GL_DEPTH_BUFFER_BIT);
		// Replace current matrix with the identity matrix.
		gl.glLoadIdentity();
		
		// FLAT SQUARE
		// Save current matrix.
		gl.glPushMatrix();
		// Translate -10 units into screen, 1.5 units up.
		gl.glTranslatef(0, 1.5f, depth);
		// Draw our flat square.
		flatSquare.draw(gl);
		// ...then restore previous matrix.
		gl.glPopMatrix();
		
		// SMOOTH SQUARE
		// Save current matrix.
		gl.glPushMatrix();
		// Translate smoothSquare to end up under flatSquare.
		gl.glTranslatef(0, -1.5f, depth);
		// Draw our smooth square.
		smoothSquare.draw(gl);
		// ...then restore previous matrix.
		gl.glPopMatrix();
		
	}
&lt;/code&gt;

Again, many thanks!  I will continue to read through the rest of your posts and look forward to many more! : )


VP.</description>
		<content:encoded><![CDATA[<p>Per-Erik:</p>
<p>Very nice tutorials; I have followed all of them up to this point.  I just wanted to say thanks for the nice documentation on the fundamentals of 3D programming using OpenGL.  The illustrations are a very nice touch to understanding the whole idea of a matrix.</p>
<p>One thing I found helpful when completing this tutorial was the use of glPushMatrix() and glPopMatrix() to make both squares appear:</p>
<p><code><br />
@Override<br />
	public void onDrawFrame(GL10 gl) {<br />
		// Clear the screen and depth buffer.<br />
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);<br />
		// Replace current matrix with the identity matrix.<br />
		gl.glLoadIdentity();</p>
<p>		// FLAT SQUARE<br />
		// Save current matrix.<br />
		gl.glPushMatrix();<br />
		// Translate -10 units into screen, 1.5 units up.<br />
		gl.glTranslatef(0, 1.5f, depth);<br />
		// Draw our flat square.<br />
		flatSquare.draw(gl);<br />
		// ...then restore previous matrix.<br />
		gl.glPopMatrix();</p>
<p>		// SMOOTH SQUARE<br />
		// Save current matrix.<br />
		gl.glPushMatrix();<br />
		// Translate smoothSquare to end up under flatSquare.<br />
		gl.glTranslatef(0, -1.5f, depth);<br />
		// Draw our smooth square.<br />
		smoothSquare.draw(gl);<br />
		// ...then restore previous matrix.<br />
		gl.glPopMatrix();</p>
<p>	}<br />
</code></p>
<p>Again, many thanks!  I will continue to read through the rest of your posts and look forward to many more! : )</p>
<p>VP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per-Erik Bergman</title>
		<link>http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/comment-page-1/#comment-23942</link>
		<dc:creator>Per-Erik Bergman</dc:creator>
		<pubDate>Thu, 28 Jan 2010 21:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-23942</guid>
		<description>Yes, I have started on the next tutorial. It will be about more meshes, but 3D meshes so that we get some real 3D objects on the screen.</description>
		<content:encoded><![CDATA[<p>Yes, I have started on the next tutorial. It will be about more meshes, but 3D meshes so that we get some real 3D objects on the screen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/comment-page-1/#comment-23917</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Thu, 28 Jan 2010 06:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-23917</guid>
		<description>All tutorials are really awesome.By now you must have started preparing the next tutorial, can you please tell which topics will be covered in next tutorial.
thanks.</description>
		<content:encoded><![CDATA[<p>All tutorials are really awesome.By now you must have started preparing the next tutorial, can you please tell which topics will be covered in next tutorial.<br />
thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arn.zhan</title>
		<link>http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/comment-page-1/#comment-23669</link>
		<dc:creator>arn.zhan</dc:creator>
		<pubDate>Tue, 26 Jan 2010 07:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-23669</guid>
		<description>Mr Bergman , after seeing your tutorials I want to say , this is the best I have ever seen , even better than NeHe&#039;s. If some day you&#039;ve written a book , I will certainly buy one .</description>
		<content:encoded><![CDATA[<p>Mr Bergman , after seeing your tutorials I want to say , this is the best I have ever seen , even better than NeHe&#8217;s. If some day you&#8217;ve written a book , I will certainly buy one .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/comment-page-1/#comment-23364</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Sat, 23 Jan 2010 20:12:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-23364</guid>
		<description>Excellent tutorials, they have explained a lot of things for me, looking forward to the next one!</description>
		<content:encoded><![CDATA[<p>Excellent tutorials, they have explained a lot of things for me, looking forward to the next one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per-Erik Bergman</title>
		<link>http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/comment-page-1/#comment-22842</link>
		<dc:creator>Per-Erik Bergman</dc:creator>
		<pubDate>Tue, 19 Jan 2010 06:25:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-22842</guid>
		<description>Jen: Glad you like my tutorial. About face picking or mesh picking it&#039;s a bit much to share as a comment. But there is two basic ways of doing this; 
1. Sending a ray into the screen and calculate which mesh you clicked on, 
2. Rendering all meshes with a unique color and when you pick just check for the color. I recommend for beginners since it&#039;s a bit easier.</description>
		<content:encoded><![CDATA[<p>Jen: Glad you like my tutorial. About face picking or mesh picking it&#8217;s a bit much to share as a comment. But there is two basic ways of doing this;<br />
1. Sending a ray into the screen and calculate which mesh you clicked on,<br />
2. Rendering all meshes with a unique color and when you pick just check for the color. I recommend for beginners since it&#8217;s a bit easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jen</title>
		<link>http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%e2%80%93-part-iv-adding-colors/comment-page-1/#comment-22634</link>
		<dc:creator>jen</dc:creator>
		<pubDate>Sun, 17 Jan 2010 15:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-22634</guid>
		<description>Thank you verry much. This is the best 3d tutorials I’ve found.

There&#039;s something I would like to know. Hope you will help me.

 Is there any way to capture touch events on 3D objects drawn in a space?

I just want to select a object or know where I have clicked.

Is it possible?

Thanks.</description>
		<content:encoded><![CDATA[<p>Thank you verry much. This is the best 3d tutorials I’ve found.</p>
<p>There&#8217;s something I would like to know. Hope you will help me.</p>
<p> Is there any way to capture touch events on 3D objects drawn in a space?</p>
<p>I just want to select a object or know where I have clicked.</p>
<p>Is it possible?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
