Ticket #9085 (reopened enhancement)
[2.8] Full Scene Anti Aliasing for wxGLCanvas.
| Reported by: | olivier_playez | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | OpenGL | Version: | 2.8.9 |
| Keywords: | Cc: | olivier_playez, g00fy | |
| Blocked By: | Patch: | yes | |
| Blocking: |
Description
This patch adds the support for Full Scene Anti Aliasing (FSAA) to the wxGLCanvas widget (using the multisample extension).
It works on mac/carbon, gtk and msw.
It adds two flags (namely WX_GL_SAMPLE_BUFFERS and WX_GL_SAMPLES) allowing for 2x2 or 4x4 hardware accelerated full scene anti aliasing on most recent graphics cards (including nVidia and ATI).
The documentation was updated accordingly.
You might remember this description, it's from the patch [ 1844855 ] Full Scene Anti Aliasing (FSAA) for wxGLCanvas.
I rewrote the patch because it failed to create a valid context if multisample is requested on a card that doesn't support it. It's very platform specific to query for multisample support, so it has to be included in wxGLCanvas.
With this new patch, if multisample is requested but not available, the wxGLCanvas will be created without multisample. You can use wxGLCanvas::IsDisplaySupported() to check if the display you requested is supported (and decide to quit or continue).
I added multisample support in the penguin sample.
This patch is for the following snapshot http://biolpc22.york.ac.uk/pub/Daily_HEAD/files/wxWidgets-2008-03-15.tar.gz
Anti Aliasing is an important feature. As you can read in the nVidia GPU programming guide ( http://developer.download.nvidia.com/GPU_Programming_Guide/GPU_Programming_Guide.pdf), page 31 :
"GeForce FX, GeForce 6 Series, and GeForce 7 Series GPUs all have powerful antialiasing engines. They perform best with antialiasing enabled, so we recommend that you enable your applications for antialiasing."
The multisample extension is supported by most graphics cards, here is a list :
http://www.delphi3d.net/hardware/extsupport.php?extension=GL_ARB_multisample
I tested this patch on :
- WinXP with a GeForce FX 5200 (supports FSAA)
- WinXP with an i915 (doesn't support FSAA).
- Mac OS X 10.4.11 with an ATI Rage 128 (doesn't support FSAA).
- Xubuntu 7.10 with a GeForce FX 5200 (supports FSAA, with nvidia drivers).

