JOGL: How can change GLCapabilities of an existing GLCanvas?

95 Views Asked by At

How can change GLCapabilities of an existing GLCanvas?

I want to do this so that I can change FSAA (antialias) samples without recreating the GLCanvas.

1

There are 1 best solutions below

1
On

You cannot. The nature of the default framebuffer is defined at context-creation time. It cannot be changed without destroying and re-creating the context.

Your best bet is to use FBOs and do your rendering to user-created images, then blit to the default framebuffer. That way, if you want to change your anti-aliasing techniques, you can do so without rebuilding the context.