PDA

View Full Version : Switching on/off antialiasing on GeForce2 and GLUT



Xelatihy
11-27-2000, 05:15 PM
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).

Nicolas Lelong
11-27-2000, 11:54 PM
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 ?!

mcraighead
11-28-2000, 12:49 AM
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

Eric
11-28-2000, 01:24 AM
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

mcraighead
11-28-2000, 02:14 AM
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. http://www.opengl.org/discussion_boards/ubb/smile.gif

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

Eric
11-28-2000, 02:42 AM
Hum, yes... That's something I wanted to mention but I somehow forgot... http://www.opengl.org/discussion_boards/ubb/smile.gif

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

Regards.

Eric

Xelatihy
11-28-2000, 06:50 PM
Thanks guys, it saved me a lot of time.
(even if I could not get what I wanted :-( ).

--x