<?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: GL_EXT_framebuffer_object with Multisampling</title>
	<atom:link href="http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/</link>
	<description>I care because you do.</description>
	<lastBuildDate>Thu, 08 Apr 2010 00:18:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Stefan</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-19</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Thu, 08 Apr 2010 00:18:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-19</guid>
		<description>But you can still use that texture like any other texture.</description>
		<content:encoded><![CDATA[<p>But you can still use that texture like any other texture.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-18</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Thu, 08 Apr 2010 00:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-18</guid>
		<description>Once I&#039;ve got data in the fbo and texture, how do I draw the texture to the screen? I mean, yeah, full screen quad, but texture isn&#039;t a texture, it&#039;s a part of the framebuffer fbo.</description>
		<content:encoded><![CDATA[<p>Once I&#8217;ve got data in the fbo and texture, how do I draw the texture to the screen? I mean, yeah, full screen quad, but texture isn&#8217;t a texture, it&#8217;s a part of the framebuffer fbo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-16</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Mon, 05 Apr 2010 11:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-16</guid>
		<description>Hey Tim,

Thanks for your question, it&#039;s a good one. I didn&#039;t really think of that when I wrote this post (I was just copying and pasting code together to get a working example). In general you&#039;re absolutely correct: It would make sense to directly downsample from the mfbo to the OpenGL backbuffer without first binding another FBO.

I got kinda confused since all examples I can find on the internet still do it by using the intermediate FBO. If you read the last section (More info...) of http://www.opengl.org/wiki/GL_EXT_framebuffer_multisample you&#039;ll find a short explanation, the pixel ownership test is explained here: http://www.opentk.com/doc/chapter/2/opengl/fragment-ops/pixel-ownership-test.
So one example I can think of that might go wrong if the intermediate FBO is not used: Let&#039;s say one corner of the OpenGL window is covered by another window. Now when you blit onto the backbuffer from the mbfo the covered area is not written. Now a problem will arise if you try to read the backbuffer into a texture and display it on another area of the OpenGL window that is not covered. The part of the texture that corresponds to the covered are will contain old/undefined data.
(But if you wanted to render to a texture it should be faster with the intermediate FBO anyway.)

I hope this was helpful.

(I&#039;m surprised that people still read this, maybe I should revise the whole post, add some more detailed explanations and source for a complete running example.)</description>
		<content:encoded><![CDATA[<p>Hey Tim,</p>
<p>Thanks for your question, it&#8217;s a good one. I didn&#8217;t really think of that when I wrote this post (I was just copying and pasting code together to get a working example). In general you&#8217;re absolutely correct: It would make sense to directly downsample from the mfbo to the OpenGL backbuffer without first binding another FBO.</p>
<p>I got kinda confused since all examples I can find on the internet still do it by using the intermediate FBO. If you read the last section (More info&#8230;) of <a href="http://www.opengl.org/wiki/GL_EXT_framebuffer_multisample" rel="nofollow">http://www.opengl.org/wiki/GL_EXT_framebuffer_multisample</a> you&#8217;ll find a short explanation, the pixel ownership test is explained here: <a href="http://www.opentk.com/doc/chapter/2/opengl/fragment-ops/pixel-ownership-test" rel="nofollow">http://www.opentk.com/doc/chapter/2/opengl/fragment-ops/pixel-ownership-test</a>.<br />
So one example I can think of that might go wrong if the intermediate FBO is not used: Let&#8217;s say one corner of the OpenGL window is covered by another window. Now when you blit onto the backbuffer from the mbfo the covered area is not written. Now a problem will arise if you try to read the backbuffer into a texture and display it on another area of the OpenGL window that is not covered. The part of the texture that corresponds to the covered are will contain old/undefined data.<br />
(But if you wanted to render to a texture it should be faster with the intermediate FBO anyway.)</p>
<p>I hope this was helpful.</p>
<p>(I&#8217;m surprised that people still read this, maybe I should revise the whole post, add some more detailed explanations and source for a complete running example.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-15</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Mon, 05 Apr 2010 00:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-15</guid>
		<description>I&#039;ve got a question for you -- why do you have fbo as well as mfbo? Why don&#039;t you render from the multisampled buffer straight to the screen?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve got a question for you &#8212; why do you have fbo as well as mfbo? Why don&#8217;t you render from the multisampled buffer straight to the screen?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: onar3d</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-14</link>
		<dc:creator>onar3d</dc:creator>
		<pubDate>Fri, 30 Jan 2009 16:03:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-14</guid>
		<description>Dextha,

Indeed out of all examples on the internet for how to achieve this, the only one that actually worked was yours!

Thank you for publishing this post!</description>
		<content:encoded><![CDATA[<p>Dextha,</p>
<p>Indeed out of all examples on the internet for how to achieve this, the only one that actually worked was yours!</p>
<p>Thank you for publishing this post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-13</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Fri, 03 Oct 2008 21:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-13</guid>
		<description>You&#039;re right, the texture rectangle extension has some cons (no mipmapping, non normalized coords (can also be a pro tho), no borders, less wrap modes... ). I wasn&#039;t

aware of the GL_ARB_texture_non_power_of_two when i wrote this article.
But actually not all hardware that supports framebuffer exts also supports NPOTs (non-power-of-two textures), for example my ATI Mobility Radeon X1400 actually

doesn&#039;t support it. The weird thing is, that it&#039;s still able to render NPOTs, but slower. I tried this example with a NPOT:

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06 It crashes on Linux (using grappy ati fglrx drivers) and crashes also on Windows. I heard some people

telling that it should be possible on their ATI cards even though GL_ARB_texture_non_power_of_two is not supported to get NPOTS running (but with a remarkable performance penalty).
I guess that in those cases it is actually not the hardware that supports NPOTs but only a slow software implementation (that was provided in the driver to keep

things OpenGL 2.0 compliant) what would explain the loss of fps. But anyway, my laptop just crashes :-( it says it&#039;s OpenGL 2.0 compatible... but thanks to you I just found out that it&#039;s not... OpenGL 2.0 is supposed to support this!

Thanks for your remark, good one!</description>
		<content:encoded><![CDATA[<p>You&#8217;re right, the texture rectangle extension has some cons (no mipmapping, non normalized coords (can also be a pro tho), no borders, less wrap modes&#8230; ). I wasn&#8217;t</p>
<p>aware of the GL_ARB_texture_non_power_of_two when i wrote this article.<br />
But actually not all hardware that supports framebuffer exts also supports NPOTs (non-power-of-two textures), for example my ATI Mobility Radeon X1400 actually</p>
<p>doesn&#8217;t support it. The weird thing is, that it&#8217;s still able to render NPOTs, but slower. I tried this example with a NPOT:</p>
<p><a href="http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06" rel="nofollow">http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06</a> It crashes on Linux (using grappy ati fglrx drivers) and crashes also on Windows. I heard some people</p>
<p>telling that it should be possible on their ATI cards even though GL_ARB_texture_non_power_of_two is not supported to get NPOTS running (but with a remarkable performance penalty).<br />
I guess that in those cases it is actually not the hardware that supports NPOTs but only a slow software implementation (that was provided in the driver to keep</p>
<p>things OpenGL 2.0 compliant) what would explain the loss of fps. But anyway, my laptop just crashes <img src='http://www.stefanlienhard.ch/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  it says it&#8217;s OpenGL 2.0 compatible&#8230; but thanks to you I just found out that it&#8217;s not&#8230; OpenGL 2.0 is supposed to support this!</p>
<p>Thanks for your remark, good one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darek Pryczek</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-12</link>
		<dc:creator>Darek Pryczek</dc:creator>
		<pubDate>Fri, 03 Oct 2008 15:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-12</guid>
		<description>Why would I be better off using rectangle textures? All harware supporting framebuffer extensions also supports non-power-of-two textures. Are you suggesting that rectangle textures are much faster? They outght to be in order to justify the hassle with non normalized texture coordinates...</description>
		<content:encoded><![CDATA[<p>Why would I be better off using rectangle textures? All harware supporting framebuffer extensions also supports non-power-of-two textures. Are you suggesting that rectangle textures are much faster? They outght to be in order to justify the hassle with non normalized texture coordinates&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mudlord</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-11</link>
		<dc:creator>mudlord</dc:creator>
		<pubDate>Wed, 03 Sep 2008 04:35:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-11</guid>
		<description>Thanks for your help!

Now my code works perfect. :)</description>
		<content:encoded><![CDATA[<p>Thanks for your help!</p>
<p>Now my code works perfect. <img src='http://www.stefanlienhard.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-10</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 23:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-10</guid>
		<description>hey,

i found the 2 bugs in your code and submitted a working example here: http://pastebin.ca/1192017
i &#039;only&#039; have linux here right now, so i switched over to glew instead of glee and changed some of the header, but it should be working for you as well with little changes.
the mistakes were:
&lt;code&gt;glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, &lt;b&gt;16, GL_DEPTH_COMPONENT&lt;/b&gt;, width, height);&lt;/code&gt;
instead of
&lt;code&gt;glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, &lt;b&gt;GL_DEPTH_COMPONENT, 16&lt;/b&gt;, width, height);&lt;/code&gt; (nasty one... )
and that you have to unbind the currently attached fbo before you can draw to the main window framebuffer. i&#039;ll actually add this to my example code... you might not be the last one to fall into this trap!! thanks ;)

and you might actually also want to add GLUT_DEPTH to the initDisplay call, otherwise it looks strange

I hope I could help, gl :)</description>
		<content:encoded><![CDATA[<p>hey,</p>
<p>i found the 2 bugs in your code and submitted a working example here: <a href="http://pastebin.ca/1192017" rel="nofollow">http://pastebin.ca/1192017</a><br />
i &#8216;only&#8217; have linux here right now, so i switched over to glew instead of glee and changed some of the header, but it should be working for you as well with little changes.<br />
the mistakes were:<br />
<code>glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, <b>16, GL_DEPTH_COMPONENT</b>, width, height);</code><br />
instead of<br />
<code>glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, <b>GL_DEPTH_COMPONENT, 16</b>, width, height);</code> (nasty one&#8230; )<br />
and that you have to unbind the currently attached fbo before you can draw to the main window framebuffer. i&#8217;ll actually add this to my example code&#8230; you might not be the last one to fall into this trap!! thanks <img src='http://www.stefanlienhard.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>and you might actually also want to add GLUT_DEPTH to the initDisplay call, otherwise it looks strange</p>
<p>I hope I could help, gl <img src='http://www.stefanlienhard.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.stefanlienhard.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/comment-page-1/#comment-9</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 21:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/#comment-9</guid>
		<description>hey, i&#039;m pretty busy these days... but i&#039;ll have a look at your code for sure as soon as i&#039;ll get a possibility</description>
		<content:encoded><![CDATA[<p>hey, i&#8217;m pretty busy these days&#8230; but i&#8217;ll have a look at your code for sure as soon as i&#8217;ll get a possibility</p>
]]></content:encoded>
	</item>
</channel>
</rss>
