<?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: Running OpenGL3.0 – part3</title>
	<atom:link href="http://www.flashbang.se/archives/148/feed" rel="self" type="application/rss+xml" />
	<link>http://www.flashbang.se/archives/148</link>
	<description>Exploring the lighter side of graphics</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:15:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Daniel</title>
		<link>http://www.flashbang.se/archives/148/comment-page-1#comment-466</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sat, 12 Feb 2011 04:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://tgb.flashbang.se/?p=148#comment-466</guid>
		<description>I used these at first to learn and get some basic design down for my renderer, but I moved to GLM... and my god is it much *much* faster. I&#039;d say for most, GLM is the better alternative if your not looking to roll your own.</description>
		<content:encoded><![CDATA[<p>I used these at first to learn and get some basic design down for my renderer, but I moved to GLM&#8230; and my god is it much *much* faster. I&#8217;d say for most, GLM is the better alternative if your not looking to roll your own.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Wallström</title>
		<link>http://www.flashbang.se/archives/148/comment-page-1#comment-433</link>
		<dc:creator>Peter Wallström</dc:creator>
		<pubDate>Wed, 05 Jan 2011 13:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://tgb.flashbang.se/?p=148#comment-433</guid>
		<description>no, well it could work that way (and in some game engines with a strongly hierarchal object tree structure its the preferred way), but openGL before 3.0 sure didn&#039;t, it does things the way i have done here, just &quot;under the hood&quot;.</description>
		<content:encoded><![CDATA[<p>no, well it could work that way (and in some game engines with a strongly hierarchal object tree structure its the preferred way), but openGL before 3.0 sure didn&#8217;t, it does things the way i have done here, just &#8220;under the hood&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kryten</title>
		<link>http://www.flashbang.se/archives/148/comment-page-1#comment-325</link>
		<dc:creator>Kryten</dc:creator>
		<pubDate>Tue, 28 Dec 2010 15:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://tgb.flashbang.se/?p=148#comment-325</guid>
		<description>Hm ok, maybe I didn&#039;t understand correctly what these functions do. I thought OpenGL was some how managing a stack of matrices and these were for adding a new (identity) one to apply specific transformation (that how I use them in my current code).

What I started to code is an implementation of what I described above with final coordinates computed by multiplying all matrices in the stack and finally multiplying with the vertex coordinate.

Is it correct ?

Alexandre</description>
		<content:encoded><![CDATA[<p>Hm ok, maybe I didn&#8217;t understand correctly what these functions do. I thought OpenGL was some how managing a stack of matrices and these were for adding a new (identity) one to apply specific transformation (that how I use them in my current code).</p>
<p>What I started to code is an implementation of what I described above with final coordinates computed by multiplying all matrices in the stack and finally multiplying with the vertex coordinate.</p>
<p>Is it correct ?</p>
<p>Alexandre</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Wallström</title>
		<link>http://www.flashbang.se/archives/148/comment-page-1#comment-318</link>
		<dc:creator>Peter Wallström</dc:creator>
		<pubDate>Mon, 27 Dec 2010 21:14:42 +0000</pubDate>
		<guid isPermaLink="false">http://tgb.flashbang.se/?p=148#comment-318</guid>
		<description>glPushMatrix and glPopMatrix is mostly just used either to switch between orthographic and perspective rendering or deal with nested transformations/rotations, in both cases we can actually just temporarily save the matrix in question in an float[16] or make the matrix as a part of the object structure.
if you really like you could create your own versions of these functions but it&#039;s probably harder than just copying an array with memcpy(MatrixA,MatrixB,64);

I guess the absolutely best way would be to make a really object class that whenever you select an object for rendering it automatically creates the right matrix and makes sure it&#039;s used.</description>
		<content:encoded><![CDATA[<p>glPushMatrix and glPopMatrix is mostly just used either to switch between orthographic and perspective rendering or deal with nested transformations/rotations, in both cases we can actually just temporarily save the matrix in question in an float[16] or make the matrix as a part of the object structure.<br />
if you really like you could create your own versions of these functions but it&#8217;s probably harder than just copying an array with memcpy(MatrixA,MatrixB,64);</p>
<p>I guess the absolutely best way would be to make a really object class that whenever you select an object for rendering it automatically creates the right matrix and makes sure it&#8217;s used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kryten</title>
		<link>http://www.flashbang.se/archives/148/comment-page-1#comment-315</link>
		<dc:creator>Kryten</dc:creator>
		<pubDate>Mon, 27 Dec 2010 17:04:40 +0000</pubDate>
		<guid isPermaLink="false">http://tgb.flashbang.se/?p=148#comment-315</guid>
		<description>Hi,

I was just wondering, starting from your code, what would be the best practice to deal with glPushMatrix and glPopMatrix?

Thanks,

Kryten</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I was just wondering, starting from your code, what would be the best practice to deal with glPushMatrix and glPopMatrix?</p>
<p>Thanks,</p>
<p>Kryten</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Wallström</title>
		<link>http://www.flashbang.se/archives/148/comment-page-1#comment-42</link>
		<dc:creator>Peter Wallström</dc:creator>
		<pubDate>Tue, 13 Jul 2010 16:55:42 +0000</pubDate>
		<guid isPermaLink="false">http://tgb.flashbang.se/?p=148#comment-42</guid>
		<description>for a few simple reasons.
1. these tutorials assume that you already know some of this, either trough nehe or other places.
2. it&#039;s written to be as general as possible as i don&#039;t know what kind of codebase or language any one person is running, especially for the last 5 (VAO to Screenshots)
3. for the ones that are missing code i actually don&#039;t have any specific source code, it&#039;s all integrated into other code which i cant release without cleaning it up

Though the next few might be better on the sourcecode area, at least the final one in a series i am planning.</description>
		<content:encoded><![CDATA[<p>for a few simple reasons.<br />
1. these tutorials assume that you already know some of this, either trough nehe or other places.<br />
2. it&#8217;s written to be as general as possible as i don&#8217;t know what kind of codebase or language any one person is running, especially for the last 5 (VAO to Screenshots)<br />
3. for the ones that are missing code i actually don&#8217;t have any specific source code, it&#8217;s all integrated into other code which i cant release without cleaning it up</p>
<p>Though the next few might be better on the sourcecode area, at least the final one in a series i am planning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amir</title>
		<link>http://www.flashbang.se/archives/148/comment-page-1#comment-41</link>
		<dc:creator>amir</dc:creator>
		<pubDate>Tue, 13 Jul 2010 16:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://tgb.flashbang.se/?p=148#comment-41</guid>
		<description>Hey your guides are awesome but one thing is missing and that is the source code i just wonder why you dont publish that ?</description>
		<content:encoded><![CDATA[<p>Hey your guides are awesome but one thing is missing and that is the source code i just wonder why you dont publish that ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Wallström</title>
		<link>http://www.flashbang.se/archives/148/comment-page-1#comment-16</link>
		<dc:creator>Peter Wallström</dc:creator>
		<pubDate>Tue, 04 May 2010 15:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://tgb.flashbang.se/?p=148#comment-16</guid>
		<description>&lt;strong&gt;-old comments-&lt;/strong&gt;

&lt;strong&gt;Comment by Overlord on 2009:10:03 17:37&lt;/strong&gt;
have a gldOrtho here also by popular request


void gldOrtho(float *m, float left, float right, float bottom, float top, float Znear, float Zfar)
{

float m2[16] = {0};

m2[0] = 2/(right-left);
m2[1] = 0;
m2[2] = 0;
m2[3] = -((right+left)/(right-left));

m2[4] = 0;
m2[5] = 2/(top-bottom);
m2[6] = 0;
m2[7] = -((top+bottom)/(top-bottom));

m2[8] = 0;
m2[9] = 0;
m2[10] = 2/(Zfar-Znear);
m2[11] = -((Zfar+Znear)/(Zfar-Znear));

m2[12] = 0;
m2[13] = 0;
m2[14] = 0;
m2[15] = 1;

gldMultMatrix(m,m2);

}

&lt;strong&gt;Comment by Øystein on 2009:10:28 18:07&lt;/strong&gt;
What do you do if you have two objects thath you want to translate/rotate separately? You have only one model/view/projection-matrix, projMat, for the whole scene, right?

&lt;strong&gt;Comment by Overlord on 2009:10:29 07:54&lt;/strong&gt;
no, you make one matrix per object if needed, you upload matrix 1 then draw object 1, then upload matrix 2 then draw object 2 and so on.
Though it would be good to reuse certain base matrices.</description>
		<content:encoded><![CDATA[<p><strong>-old comments-</strong></p>
<p><strong>Comment by Overlord on 2009:10:03 17:37</strong><br />
have a gldOrtho here also by popular request</p>
<p>void gldOrtho(float *m, float left, float right, float bottom, float top, float Znear, float Zfar)<br />
{</p>
<p>float m2[16] = {0};</p>
<p>m2[0] = 2/(right-left);<br />
m2[1] = 0;<br />
m2[2] = 0;<br />
m2[3] = -((right+left)/(right-left));</p>
<p>m2[4] = 0;<br />
m2[5] = 2/(top-bottom);<br />
m2[6] = 0;<br />
m2[7] = -((top+bottom)/(top-bottom));</p>
<p>m2[8] = 0;<br />
m2[9] = 0;<br />
m2[10] = 2/(Zfar-Znear);<br />
m2[11] = -((Zfar+Znear)/(Zfar-Znear));</p>
<p>m2[12] = 0;<br />
m2[13] = 0;<br />
m2[14] = 0;<br />
m2[15] = 1;</p>
<p>gldMultMatrix(m,m2);</p>
<p>}</p>
<p><strong>Comment by Øystein on 2009:10:28 18:07</strong><br />
What do you do if you have two objects thath you want to translate/rotate separately? You have only one model/view/projection-matrix, projMat, for the whole scene, right?</p>
<p><strong>Comment by Overlord on 2009:10:29 07:54</strong><br />
no, you make one matrix per object if needed, you upload matrix 1 then draw object 1, then upload matrix 2 then draw object 2 and so on.<br />
Though it would be good to reuse certain base matrices.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

