<?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>FlexiCoder Blog &#187; OpenGL ES</title>
	<atom:link href="http://www.flexicoder.com/blog/index.php/category/iphone-development/opengl-es/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexicoder.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 15:11:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPhone mipmaps</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/11/iphone-mipmaps/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/11/iphone-mipmaps/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 11:49:50 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=250</guid>
		<description><![CDATA[Here is some code that shows the glTexParameterf values that need to be set to automatically generate mipmaps and to get OpenGL to use them


glBindTexture(GL_TEXTURE_2D, texture[0]);

//Next 2 lines are required if not mipmap
//glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
//glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

//Next 3 lines required if mipmap
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D,GL_GENERATE_MIPMAP, GL_TRUE);

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texWidth, texHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, textureData);

 
Social [...]]]></description>
			<content:encoded><![CDATA[<p>Here is some code that shows the glTexParameterf values that need to be set to automatically generate mipmaps and to get OpenGL to use them</p>
<p><code></p>
<pre class="brush:c#">
glBindTexture(GL_TEXTURE_2D, texture[0]);

//Next 2 lines are required if not mipmap
//glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
//glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

//Next 3 lines required if mipmap
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D,GL_GENERATE_MIPMAP, GL_TRUE);

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texWidth, texHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, textureData);
</pre>
<p></code> </p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/11/iphone-mipmaps/&title=iPhone+mipmaps&text=Here+is+some+code+that+shows+the+glTexParameterf+values+that+need+to+be+set+to+automatically+generate+mipmaps+and+to+get+OpenGL+to+use+them+++glBindTexture%28GL_TEXTURE_2D%2C+texture%5B0%5D%29%3B++%2F%2FNext+2+lines...&tags=gltexparameterf+gl_texture_2d%2C+gl_texture_2d%2C+gltexparameterf" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2009/11/iphone-mipmaps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
