<?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>Sun, 12 Feb 2012 05:23:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: OpenGL ES Tutorial for Android – Part IV &#8211; Adding colors &#124; 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-79469</link>
		<dc:creator>OpenGL ES Tutorial for Android – Part IV &#8211; Adding colors &#124; Per-Erik Bergman</dc:creator>
		<pubDate>Wed, 01 Feb 2012 09:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-79469</guid>
		<description>[...] (function() { var s = document.createElement(&#039;SCRIPT&#039;), s1 = document.getElementsByTagName(&#039;SCRIPT&#039;)[0]; s.type = &#039;text/javascript&#039;; s.async = true; s.src = &#039;http://widgets.digg.com/buttons.js&#039;; s1.parentNode.insertBefore(s, s1); })(); TweetThis tutorial is original posted at Jayway&#8217;s Developer Blog and can be found here: Jayway&#8217;s Developer Blog [...]</description>
		<content:encoded><![CDATA[<p>[...] (function() { var s = document.createElement(&#039;SCRIPT&#039;), s1 = document.getElementsByTagName(&#039;SCRIPT&#039;)[0]; s.type = &#039;text/javascript&#039;; s.async = true; s.src = &#039;<a href="http://widgets.digg.com/buttons.js&#039;" rel="nofollow">http://widgets.digg.com/buttons.js&#039;</a>; s1.parentNode.insertBefore(s, s1); })(); TweetThis tutorial is original posted at Jayway&#8217;s Developer Blog and can be found here: Jayway&#8217;s Developer Blog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karthik</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-79226</link>
		<dc:creator>Karthik</dc:creator>
		<pubDate>Sun, 04 Dec 2011 10:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-79226</guid>
		<description>Excellent tutorial, read line by line and understood like a teacher teaching the content in person. Hats off!</description>
		<content:encoded><![CDATA[<p>Excellent tutorial, read line by line and understood like a teacher teaching the content in person. Hats off!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry</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-79110</link>
		<dc:creator>Harry</dc:creator>
		<pubDate>Wed, 09 Nov 2011 13:23:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-79110</guid>
		<description>You must disable color array to apply colors to all vertex with &quot;glColor4f&quot;
like this:
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glDisableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);</description>
		<content:encoded><![CDATA[<p>You must disable color array to apply colors to all vertex with &#8220;glColor4f&#8221;<br />
like this:<br />
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);<br />
glDisableClientState(GL_COLOR_ARRAY);<br />
glEnableClientState(GL_VERTEX_ARRAY);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky</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-78976</link>
		<dc:creator>Ricky</dc:creator>
		<pubDate>Thu, 13 Oct 2011 11:35:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-78976</guid>
		<description>A Great Tutorial!
Thank you so much!!!!</description>
		<content:encoded><![CDATA[<p>A Great Tutorial!<br />
Thank you so much!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Research (Done by Lai Chin Wang) &#171; ifyp</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-78707</link>
		<dc:creator>Research (Done by Lai Chin Wang) &#171; ifyp</dc:creator>
		<pubDate>Fri, 16 Sep 2011 11:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-78707</guid>
		<description>[...] http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%E2%80%93-part-iv-adding-colors/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%E2%80%93-part-iv-adding-colors/" rel="nofollow">http://blog.jayway.com/2010/01/14/opengl-es-tutorial-for-android-%E2%80%93-part-iv-adding-colors/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</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-78615</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 29 Aug 2011 17:05:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-78615</guid>
		<description>Question is how do I use the previous sample where the 3 boxes are rotating around but make square A a Square(), square B a FlatColoredSquare() and square c a SmoothColoredSquare()?  I tried just initiating the classes and then replace square.draw(gl) with flatSquare.draw(gl) and smoothSquare.draw(gl)...only problem is all the squares end up being rainbow colored.</description>
		<content:encoded><![CDATA[<p>Question is how do I use the previous sample where the 3 boxes are rotating around but make square A a Square(), square B a FlatColoredSquare() and square c a SmoothColoredSquare()?  I tried just initiating the classes and then replace square.draw(gl) with flatSquare.draw(gl) and smoothSquare.draw(gl)&#8230;only problem is all the squares end up being rainbow colored.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CP Gangstaz</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-78354</link>
		<dc:creator>CP Gangstaz</dc:creator>
		<pubDate>Tue, 14 Jun 2011 15:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-78354</guid>
		<description>Now I&#039;ve got colors in tha hood! CP Gangstaz represening the red ones, aight. No flue trespass here. Them crabs better stay away...</description>
		<content:encoded><![CDATA[<p>Now I&#8217;ve got colors in tha hood! CP Gangstaz represening the red ones, aight. No flue trespass here. Them crabs better stay away&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lattimore</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-78137</link>
		<dc:creator>lattimore</dc:creator>
		<pubDate>Thu, 14 Apr 2011 06:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-78137</guid>
		<description>Great Tutorial!</description>
		<content:encoded><![CDATA[<p>Great Tutorial!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dirhem</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-76763</link>
		<dc:creator>dirhem</dc:creator>
		<pubDate>Tue, 15 Feb 2011 15:02:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-76763</guid>
		<description>Thanks for great tutorials, i have a question , how can i color different faces of a cube with different colors ?</description>
		<content:encoded><![CDATA[<p>Thanks for great tutorials, i have a question , how can i color different faces of a cube with different colors ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</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-76676</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 28 Jan 2011 23:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-76676</guid>
		<description>Great tutorial. Have you any plans on one for 2d collision detection with opengl es or do you have any advice on how I would try this?</description>
		<content:encoded><![CDATA[<p>Great tutorial. Have you any plans on one for 2d collision detection with opengl es or do you have any advice on how I would try this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OpenGL ES Tutorial for Android – Part III – Transformations &#124; Jayway Team Blog - Sharing Experience</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-76609</link>
		<dc:creator>OpenGL ES Tutorial for Android – Part III – Transformations &#124; Jayway Team Blog - Sharing Experience</dc:creator>
		<pubDate>Thu, 13 Jan 2011 17:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-76609</guid>
		<description>[...] Previous tutorial: OpenGL ES Tutorial for Android – Part II – Building a polygon Next tutorial: OpenGL ES Tutorial for Android – Part IV – Adding colors [...]</description>
		<content:encoded><![CDATA[<p>[...] Previous tutorial: OpenGL ES Tutorial for Android – Part II – Building a polygon Next tutorial: OpenGL ES Tutorial for Android – Part IV – Adding colors [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RGB</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-71678</link>
		<dc:creator>RGB</dc:creator>
		<pubDate>Wed, 15 Dec 2010 00:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-71678</guid>
		<description>I&#039;m enjoying and learning your tutorials, Per-Erik.

Reading this article regarding colors, I got an idea that I&#039;d like to share with all of you, since you might find it useful. I added a new functionality to my site www.rgbtool.com, so now it is possible to get float RGB colors from the color picker.

I really don&#039;t want to do SPAM with this. But if we need to use float colors in OpenGL ES, my conversion tool will be useful for you.</description>
		<content:encoded><![CDATA[<p>I&#8217;m enjoying and learning your tutorials, Per-Erik.</p>
<p>Reading this article regarding colors, I got an idea that I&#8217;d like to share with all of you, since you might find it useful. I added a new functionality to my site <a href="http://www.rgbtool.com" rel="nofollow">http://www.rgbtool.com</a>, so now it is possible to get float RGB colors from the color picker.</p>
<p>I really don&#8217;t want to do SPAM with this. But if we need to use float colors in OpenGL ES, my conversion tool will be useful for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian</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-65757</link>
		<dc:creator>Adrian</dc:creator>
		<pubDate>Sat, 13 Nov 2010 23:10:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-65757</guid>
		<description>Great Tutorial,
When can we expect the 2d texturing tutorial?</description>
		<content:encoded><![CDATA[<p>Great Tutorial,<br />
When can we expect the 2d texturing tutorial?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernard Segonnes</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-60903</link>
		<dc:creator>Bernard Segonnes</dc:creator>
		<pubDate>Mon, 18 Oct 2010 09:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2587#comment-60903</guid>
		<description>Great tutorial pages !

Could you add another tutorial : how to display bitmaps ?  as texture, or  (for me needs :-) as 2D bitmap displayed only once, without stretching.  For instance to display something in 2D for an AR application.

Thanks.</description>
		<content:encoded><![CDATA[<p>Great tutorial pages !</p>
<p>Could you add another tutorial : how to display bitmaps ?  as texture, or  (for me needs <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  as 2D bitmap displayed only once, without stretching.  For instance to display something in 2D for an AR application.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<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>

