Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Anti-Alias Settings?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Apr 2005
    Location
    Toronto
    Posts
    126

    Anti-Alias Settings?

    So, you know how in your Nvidia or ATI driver setting you always get Anti-Alias options for 2x, 4x, 8x, 16x etc or you can set it to Application controlled?

    Ok, so assuming the driver is set to Application Controlled, how do you control that inside your application?

    I know you enable/disable via GL_MULTISAMPLE, but how can you set it to 8x as opposed to 16x? Is that done by creating a new window/context with more/less AA bits every time? Or is there another way?

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2007
    Posts
    268

    Re: Anti-Alias Settings?

    when you create your context (through wgl on Windows or glx on Linux, or carbon|cocoa|glx interface on Mac) you can specify the desired number of samples per pixel in multisampling mode.

    Also ,if available on your card, you can try extension GL_NV_multisample_filter_hint:

    http://www.opengl.org/registry/spec/...ilter_hint.txt

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,042

    Re: Anti-Alias Settings?

    Or better render to a multisampled FBO, it is very easy to select the number of samples there, and destroying and recreating them with other settings can be done on the fly, without the need to re-create the context.

    Jan.
    GLIM - Immediate Mode Emulation for GL3

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,569

    Re: Anti-Alias Settings?

    Quote Originally Posted by overlay
    when you create your context (through wgl on Windows or glx on Linux, or carbon|cocoa|glx interface on Mac) you can specify the desired number of samples per pixel in multisampling mode.
    Right. On Linux specifically, you can specify a number of samples when you choose which X visual to create your X window in, but that doesn't give you full control. On Linux+NVidia, you can't easily select specific combinations of multisampling, supersampling, coverage sampling, etc. programmatically (e.g. say you want 8xMS+4xSS on a GeForce 8)

    The best way I know of to set a specific mode on NVidia/Linux is the __GL_FSAA_MODE environment variable -- see the /usr/share/doc/NVIDIA_GLX-1.0/README.txt for details. I think this is even the "only" way for some modes.

    This does work! But the unfortunate thing about this vendor-specific scheme is you can't nail your app to a particular antialiasing mode, because what the mode numbers are, and even which modes are available even on the same GPU can and do sometimes vary between driver versions! For instance, 8xMS+4xSS used to be available on NVidia/Linux/GeForce 8, but not with the latest drivers...

    However, since OpenGL doesn't mandate specific AA capabilities for GL windows, a standard query-and-set API would be about as good as we could hope for for setting GL window AA, even if it only worked with strings (ala GL_RENDERER, GL_EXTENSIONS, etc.).

    In contrast, FBOs let you clearly specify what you want (if pure multisampling or pure coverage sampling is sufficient). Maybe someday we'll have framebuffer_multisample++ with an abstract API to support SS or MS+SS+CS mixed formats, and framebuffer_blit which would just do the right thing for these new formats like it does now with MS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •