<?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 GluPerspective Function In iPhone OpenGL ES</title>
	<atom:link href="http://maniacdev.com/2009/05/opengl-gluperspective-function-in-iphone-opengl-es/feed/" rel="self" type="application/rss+xml" />
	<link>http://maniacdev.com/2009/05/opengl-gluperspective-function-in-iphone-opengl-es/</link>
	<description>ManiacDev.Com</description>
	<lastBuildDate>Wed, 08 Feb 2012 08:29:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Sio2interactive</title>
		<link>http://maniacdev.com/2009/05/opengl-gluperspective-function-in-iphone-opengl-es/comment-page-1/#comment-4738</link>
		<dc:creator>Sio2interactive</dc:creator>
		<pubDate>Sun, 15 Aug 2010 22:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=179#comment-4738</guid>
		<description>In SIO2 I got something more simple which do the same thing, and add the _ori parameter that allows you to specify the rotation of the device in degree such as:

Portrait = 0.0f
Flipped = 180.0f
Landscape Rigth = -90.0f
Landscap Left = 90.0f

Here&#039;s the function that I use:

void sio2Perspective( float _fovy, float _aspect, float	_cstart, float _cend, float _ori )
{
	float xmin, xmax, ymin, ymax;

	ymax = _cstart * tanf( _fovy * 3.14159 / 360.0f );
	ymin = -ymax;

	xmin = ymin * _aspect;
	xmax = ymax * _aspect;

	glFrustumf( xmin, xmax, ymin, ymax, _cstart, _cend );
		
	glRotatef( _ori, 0.0f, 0.0f, 1.0f );
}

More info on sio2interactive.com

Cheers,</description>
		<content:encoded><![CDATA[<p>In SIO2 I got something more simple which do the same thing, and add the _ori parameter that allows you to specify the rotation of the device in degree such as:</p>
<p>Portrait = 0.0f<br />
Flipped = 180.0f<br />
Landscape Rigth = -90.0f<br />
Landscap Left = 90.0f</p>
<p>Here&#8217;s the function that I use:</p>
<p>void sio2Perspective( float _fovy, float _aspect, float	_cstart, float _cend, float _ori )<br />
{<br />
	float xmin, xmax, ymin, ymax;</p>
<p>	ymax = _cstart * tanf( _fovy * 3.14159 / 360.0f );<br />
	ymin = -ymax;</p>
<p>	xmin = ymin * _aspect;<br />
	xmax = ymax * _aspect;</p>
<p>	glFrustumf( xmin, xmax, ymin, ymax, _cstart, _cend );</p>
<p>	glRotatef( _ori, 0.0f, 0.0f, 1.0f );<br />
}</p>
<p>More info on sio2interactive.com</p>
<p>Cheers,</p>
]]></content:encoded>
	</item>
</channel>
</rss>

