Application controlled anti-alias setting

BlitzMax Forums/BlitzMax Programming/Application controlled anti-alias setting

Kistjes(Posted 2009) [#1]
Hi,

In my NVidia control panel, it's possible to set the anti-aliasing setting to none, 2x, 4x, 8xS or Controlled by Application.

Two questions:
1) Is it possible to retreive the value of this setting from the control panel within BlitzMAX?
2) If the value is "Controlled by Application", how can I set the anti-alias setting from within my BlitzMax application?


ImaginaryHuman(Posted 2009) [#2]
You're talking about full screen antialiasing with sub-pixel supersampling.

I don't know what happens for you when you set it to 2x 4x or 8x - do you see a noticeable attempt at antialiased edges?

For it to be `controlled by application`, usally in order to use FSAA (full-screen anti-aliasing), your application has to request support for it when it creates a screen. Normally you can't do this because it has to be set up properly at a lower level than just `Graphics()`. Mark did not include it as a feature and did not add any commands to switch it in. I think you can't switch it on `after the fact`, you have to set it up as yu are setting up the display.

However, there is code posted in one of the forums, maybe in the code tweaks, for how to set up full-screen antialiasing with OpenGL.

As far as getting this information from the control panel - you'd probably have to use o/s API's to talk to the driver.


Kistjes(Posted 2009) [#3]
I was a bit confused. The only thing I need to have is a command to set the FSAA factor to any available value. If the driver is 'Controlled by Application' this factor is used, otherwise the driver will overrule this command and forces the FSAA-factor to it's driver setting.

It's to bad BlitzMAX doesn't support such a SetAntiAlias() command :(

I don't know what happens for you when you set it to 2x 4x or 8x - do you see a noticeable attempt at antialiased edges?

The BlitzMAX app. shows nice anti-aliased edges. But when I set it to Controlled by Application it chooses not to do any anti-aliasing.


ImaginaryHuman(Posted 2009) [#4]
Yah, well Mark chose not to provide that feature yet. Like I said, if you want to set up FSAA in the application you need to do it as the screen is created, which right now is behind-the-scenes code. There is a way to do it listed in the module tweaks forum.

The reason it has to be set up when you set up the screen is because it has to allocate more memory for the screen storage and set other stuff ready for the subpixel rendering.