|
|
#1 | |
|
Registered User
Join Date: Feb 2003
Location: St. Petersburg, Russia
Posts: 20
|
Hello!
I guess this is not quite the exact forum to post this kind of questions, but first it's Linux-driver-specific, and second, the programmer forum seems quite empty and I guess nobody reads it ![]() I'm trying to programmatically enable antialiasing in my program, and can't find any way to do it. The 'glxinfo' program displays GLX_ARB_multisample as a supported extension, however, if I pass "GLX_SAMPLE_BUFFERS_ARB, GL_TRUE" to glXChooseFBConfig(), it always returns an empty list of fbconfigs. However, if I do "export __GL_FSAA_MODE=4" before launching my program, antialiasing works! And even if I call putenv ("__GL_FSAA_MODE=4") before creating the GLX context, it doesn't work, I guess nvidia driver's looking at some other environment. So what's the matter here? It seems the required support is built into the driver, but for some reason it doesn't provide any FSAA-capable visuals? Is there any way to enable antialiasing, other than modifying the environment variable before launching the program? The reason I need this is that I would like to change this setting from a setup dialog in my program. |
|
|
|
|
|
|
#2 | |
|
Registered User
Join Date: Dec 2006
Location: Greenbelt, MD
Posts: 33
|
the columns 'ns' and 'b' under 'ms' in glxinfo are the number of samples and buffers with multisample visuals. On Quadro FX 5500 cards I get ones like 16 1 and 8 1, for 'ms' and 'b' respectively. However, you point is right, even if you get a multisample visual with fbconfig, that's not enough like it was on the older SGI/IRIX system, you also need the environment variable set telling it which type of multisample you want to use (I prefer 7, 4x supersample, 4x multi).
So....there seem to be no way to toggle multi sample on/off programatically like on older systems that I've found. The OpenGL call, glEnable( GL_MULTISAMPLE ) also seems to have no effect, nor does glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST) that I've detected. I found it an odd mechanism as well. And again, there's also a global override in the nvidia-settings control panel as well. I don't recall which of those two takes precedence. Seems like the method was created to cater to applications (especially games) which might not have considered multisample when they were created. Hope that helps. |
|
|
|
|
|
|
#3 |
|
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
|
From my experience multisampling works fine as long as both the GLX context and the drawable you use have multisampling support. Though not all modes advertised in nvidia-settings are offered but it still works.
|
|
|
|
|
|
#4 | |||
|
Registered User
Join Date: Feb 2003
Location: St. Petersburg, Russia
Posts: 20
|
Quote:
The type of multisample you're talking about should be, as far as I understand, the 'ms' parameter. In the specs for the GLX_ARB_multisample extension it's said that "GLX_SAMPLES_ARB" is a vendor-specific parameter, so I assume it's the same as the __GL_FSAA_MODE env var. Quote:
Quote:
Last edited by zap; 01-15-07 at 12:39 PM. |
|||
|
|
|
|
|
#5 | |||
|
Registered User
Join Date: Dec 2006
Location: Greenbelt, MD
Posts: 33
|
Quote:
Quote:
Quote:
|
|||
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| High resolution versus antialiasing | JemyM | NVIDIA GeForce 7, 8, And 9 Series | 43 | 10-06-02 03:28 PM |
| Antialiasing bug in 31.00 drivers? | Mark_fox | NVIDIA Windows Graphics Drivers | 7 | 08-26-02 02:48 PM |
| How do you get the 10% antialiasing and anisotropy increase with the 30.30 drivers? | imtim83 | NVIDIA Windows Graphics Drivers | 12 | 08-25-02 10:01 AM |