Jump to content
  • Advertisement
Sign in to follow this  
dc443

OpenGL FBO's and Multisampling

This topic is 3173 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

http://www.opengl.org/wiki/Multisampling This page goes over the standard method of creating a program that detects and enables FSAA under windows, but I can't seem to find any instructions for doing the same on Linux. Can anybody provide me with information on this topic? Also kind of related: what is the difference from FSAA (the type that you force from the driver control panel in windows) vs the ARB Multisample Extension (which i'm hoping one can use to selectively antialias parts of a scene by using glEnable(GL_MULTISAMPLE) or some such)? I've been googling this stuff for hours now and all i've got is a headache. Heres an interesting tidbit: I have a Ubuntu 9.04 VM in Virtualbox on Windows 7 host, and when I put this line
	SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); 
before creating my SDL window, Virtualbox crashes when I run the program. [Edited by - dc443 on November 6, 2009 11:59:45 PM]

Share this post


Link to post
Share on other sites
Advertisement
OK, well first of all, the ARB_multisample extension is a mess. Try to avoid it if possible. A much better alternative is to use a non-FSAA screen format, together with a multisampled FBO. This is much more flexible, powerful and clean. It's also much easier to setup and use.

That said, I'm not sure if you can get any of this on Linux if it is running under a VM.

Share this post


Link to post
Share on other sites

So I take it that you are suggesting I use GL_EXT_framebuffer_multisample and GL_EXT_framebuffer_blit in addition to the GL_EXT_framebuffer_object extension... as described in this page: http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/

(btw how do you do hyperlinks on this forum?)

How does this method compare to "the other ways" of doing multisampling? Is this separate from the settings that you force in the display drivers?

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
OK, well first of all, the ARB_multisample extension is a mess. Try to avoid it if possible. A much better alternative is to use a non-FSAA screen format, together with a multisampled FBO. This is much more flexible, powerful and clean. It's also much easier to setup and use.

That said, I'm not sure if you can get any of this on Linux if it is running under a VM.


VirtualBox has Pretty decent OpenGL support (OpenGL 2.0 was fully supported in VB 3.0 including GLSL support (On Linux, Windows and Solaris guests atleast)

Share this post


Link to post
Share on other sites
Quote:
Original post by dc443
So I take it that you are suggesting I use GL_EXT_framebuffer_multisample and GL_EXT_framebuffer_blit in addition to the GL_EXT_framebuffer_object extension...

Yep. Or use ARB_framebuffer_object, which includes all three extensions in one.

Quote:
Original post by dc443
How does this method compare to "the other ways" of doing multisampling? Is this separate from the settings that you force in the display drivers?

It's separate, since FBOs are independent render targets. You choose the multisampling level and config separately for each FBO (although you can share attachments). You can even have several FBOs with different MS settings in use simultaneously, within the same application.

The settings on the driver page will only change the AA config of your main framebuffer, ie. the one that is eventually displayed on the screen. This one is independent of any FBO you create.

In practice, your screen framebuffer would be non-multisampled. You do all your rendering into a MS FBO, resolve it (possibly using a customized resolve shader, if needed) and copy it onto the non-AA'ed screen framebuffer.

Quote:
Original post by dc443
(btw how do you do hyperlinks on this forum?)

Standard HTML link tags.

Share this post


Link to post
Share on other sites
Thanks for the quick replies! :)

How does the performance of this multisampled FBO method compare with traditional methods?

As I understand it, I need to render to a multisampled FBO, then blit it into another FBO attached to a texture, and then render that texture as a full screen quad. This seems like doing so much extra work. Drawing a full screen texture quad always felt like a big hack to me.

How is support for this from ATI? I saw some Nvidia charts indicating that the FBO extensions are supported for the hardware that is capable of it with recent drivers, but I don't know about ATI.

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
OK, well first of all, the ARB_multisample extension is a mess. Try to avoid it if possible. A much better alternative is to use a non-FSAA screen format, together with a multisampled FBO. This is much more flexible, powerful and clean. It's also much easier to setup and use.

That said, I'm not sure if you can get any of this on Linux if it is running under a VM.


Hehehe. That's an interesting idea.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!