Sign in to follow this  

MSAA FBOs and wgl questions

Recommended Posts

Stoic    368
Hi all - Sorry if this is answered somewhere, but I've been Googling around for awhile, and I haven't found an explicit answer anywhere. It doesn't help that I'm still wrapping my head around exactly how MSAA works in the hardware. I'm working on adding support for FBO's to my engine. I know that support for MSAA opens up a pretty big can of worms, especially on windows, where you need to create a dummy window to get the extension function to set up the correct backbuffer format for the main window (yuck). I was wondering if, when using FBO's, you could set up a non-multisampled window(primary backbuffer), then still create MSAA-enabled renderbuffers in external FBO's, then blit them back to the primary buffer? Then you could do post processing, etc, on the resolved buffer (less expensively). Would this prevent the need to do the weird dummy window trick? Even if it is possible, would it completely waste the benefits of MSAA? Thanks for any help!

Share this post

Link to post
Share on other sites
idinev    236
Generally no-one creates a multisampled window. Post-processing passes favour that decision.
So, just:
- create a single-sampled window, just like all GL tutes do;
- create a MSAA FBO,
- clear+render to the FBO,
- resolve the FBO via glBlitFramebufferEXT() onto another FBO (but single-sampled) or to the back-buffer that comes with your window.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this