<?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>Freya.no &#187; accumulation buffer</title>
	<atom:link href="http://wp.freya.no/tag/accumulation-buffer/feed/" rel="self" type="application/rss+xml" />
	<link>http://wp.freya.no</link>
	<description>Knowledge is power</description>
	<lastBuildDate>Wed, 28 Jul 2010 16:50:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>OpenGL Accumulation Buffer</title>
		<link>http://wp.freya.no/2007/05/opengl-accumulation-buffer/</link>
		<comments>http://wp.freya.no/2007/05/opengl-accumulation-buffer/#comments</comments>
		<pubDate>Mon, 07 May 2007 21:05:26 +0000</pubDate>
		<dc:creator>kent</dc:creator>
				<category><![CDATA[Ikke interessant]]></category>
		<category><![CDATA[accumulation buffer]]></category>
		<category><![CDATA[opengl]]></category>

		<guid isPermaLink="false">http://wp.freya.no:8081/opengl-accumulation-buffer/</guid>
		<description><![CDATA[void Display() { now = GetTickCount(); dt = (now - last) / 1000.0; elapsed = (now - start) / 1000.0; lookAt = Point3(0,0,0); lookFrom.x = (10)*cos(elapsed); lookFrom.y = 2; lookFrom.z = (10)*sin(elapsed); lookVec = lookFrom - lookAt; lookUp = lookVec.cross(lookRight); lookUp.normalize(); lookRight = lookVec.cross(lookUp); lookRight.normalize(); float passes = 5.0f; glClear(GL_ACCUM_BUFFER_BIT); for (int n=0; n&#38;lt;passes; n++) [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush: cpp;">void Display()
{
now = GetTickCount();
dt = (now - last) / 1000.0;
elapsed = (now - start) / 1000.0;

lookAt = Point3(0,0,0);

lookFrom.x = (10)*cos(elapsed);
lookFrom.y = 2;
lookFrom.z = (10)*sin(elapsed);

lookVec = lookFrom - lookAt;

lookUp = lookVec.cross(lookRight);
lookUp.normalize();
lookRight = lookVec.cross(lookUp);
lookRight.normalize();

float passes = 5.0f;

glClear(GL_ACCUM_BUFFER_BIT);

for (int n=0; n&amp;lt;passes; n++)
{

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glLoadIdentity();

// FOKUS
gluLookAt(
lookFrom[0]+n*lookVec[0]/passes/20,
lookFrom[1]+n*lookVec[1]/passes/20,
lookFrom[2]+n*lookVec[2]/passes/20,

lookAt[0], lookAt[1], lookAt[2],
up[0], up[1], up[2]);
//*/

glPushMatrix();
GLDebug::drawCoords();
glPopMatrix();

scene.display();

glAccum(GL_ACCUM, 1.0/passes);
}

glAccum(GL_RETURN, 1.0);

SwapBuffers(hDC);

last = now;
}</pre>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=75" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2007/05/opengl-accumulation-buffer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
