Switching on/off antialiasing on GeForce2 and GLUT

Hi,

I have a simple problem.
I am writing an application running on GeForce2 and GLUT.
I need to render a frame with no antialising, then do a read pixel, then render another frame with antialising on and swap buffers. Notice that I have only 1 backbuffer and I wish to use it with antialiasing on/off.

I am currently using a
glutInit(GLUT_DOUBLE | GLUT_DEPTH | GLUT_RGBA | GLUT_ALPHA) to init the window (it does not work with GLUT_MULTISAMPLE also).
To turn on/off antialising I use
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
and
glHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST);

It seems that when I am rendering the frame I do not want antialiased, it is actually antialising.

Any idea?

Thanks

              --x

PS: I should also mention that under Win2k I have to set a flag in the driver properties in order to get antialising (not just the GL hint).

Hi,

as you mentionned it ; the driver property enables ‘full-scene’ antialiasing which is different from the gl SMOOTH hint.

I think there’s currently no way to enable/disable this antialiasing (its transparent to the developper) . But we’ll perhaps someday have an extension to control this ?!

There is currently no programmatic way to enable or disable FSAA.

It’s not just a matter of supporting the multisample extension, because there are other features required by the multisample extension that we don’t support.

The polygon smooth hint is completely unrelated to FSAA.

We are looking into better ways to handle this issue.

  • Matt

Originally posted by mcraighead:
There is currently no programmatic way to enable or disable FSAA.

Matt, how about changing the registry settings for FSAA ??? A simple RegSetValueEx does the job quite nicely (at least it did last time I played with it…).

Regards.

Eric

I don’t recommend that. You’re making assumptions about how we store the settings in the registry, and that is liable to change.

Not only is it liable to change, but I’ve already changed it, so I can promise that it will break in a future version.

Also, you have to be really careful on Win9x about getting the right registry key. All those 0000, 0001, … keys are for different devices that have been installed in the system at various times, and you have to query which one to use, and I forget how that’s done. I know my old test system had about 8 of those keys, and I was always getting confused about which card of mine had its settings where…

  • Matt

Hum, yes… That’s something I wanted to mention but I somehow forgot…

I suppose we will be able to do that in an “official” way soon enough… At least I hope so !!!

Regards.

Eric

Thanks guys, it saved me a lot of time.
(even if I could not get what I wanted :frowning: ).

–x