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 3 of 3

Thread: Best way to get max SAMPLES_ARB (Antialiasing)?

  1. #1
    Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    261

    Best way to get max SAMPLES_ARB (Antialiasing)?

    Hi NG,

    Iīm looking for an easy way to query an OpenGL driver for the maximum supported value of WGL_SAMPLES_ARB.
    This Value is used in the WGL_ARB_pixel_format extension to select the number of samples for doing Antialiasing.

    The only way I see (and I dislike) is to query all available Pixelformats, that support AA and then manually search the maximum value.

    It would be much cooler to be able to do (wouldnīt that be an idea *g*?):

    Code :
     
    glGetFloatv(GL_MAX_SAMPLES_ARB, &fMaxAASamples);
    or
    glGetFloatv(WGL_MAX_SAMPLES_ARB, &fMaxAASamples);
    Anyone knows another (better) way?

    By the way, if Iīve got a maximum number of 4 samples, is it sure, that I will be able to use / find a suitable Pixelformat, that has 2 samples, or canīt I assume this?

    Diapolo

  2. #2
    Intern Contributor
    Join Date
    Jun 2003
    Location
    Burlington VT US
    Posts
    53

    Re: Best way to get max SAMPLES_ARB (Antialiasing)?

    I basically have the same question.

    Even worse: I don't mind querying all the formats but what I'm seeing is that wglChoosePixelFormatARB happily claims to find pixelformats regardless of what I specifiy for WGL_SAMPLES_ARB. Or is WGL_SAMPLES_ARB only checked when I call wglCreatePbufferARB ?

    These attribs pass regardless of value of max:

    Code :
    		addAttrib( iAttributes, WGL_SUPPORT_OPENGL_ARB,	true);
    		addAttrib( iAttributes, WGL_DRAW_TO_WINDOW_ARB, true);
    		addAttrib( iAttributes, WGL_ACCELERATION_ARB,	WGL_FULL_ACCELERATION_ARB);
    		addAttrib( iAttributes, WGL_RED_BITS_ARB,		8);
    		addAttrib( iAttributes, WGL_GREEN_BITS_ARB,		8);
    		addAttrib( iAttributes, WGL_BLUE_BITS_ARB,		8);
    		addAttrib( iAttributes, WGL_ALPHA_BITS_ARB,		8);
    		addAttrib( iAttributes, WGL_DOUBLE_BUFFER_ARB,  true);
    		addAttrib( iAttributes, WGL_DEPTH_BITS_ARB,		16);
    		addAttrib( iAttributes, WGL_SAMPLE_BUFFERS_ARB, true);
    		addAttrib( iAttributes, WGL_SAMPLES_ARB,		max);
    So... how do you guys check for the max number of samples?

    [This message has been edited by vmh5 (edited 02-17-2004).]

  3. #3
    Intern Contributor
    Join Date
    Jun 2003
    Location
    Burlington VT US
    Posts
    53

    Re: Best way to get max SAMPLES_ARB (Antialiasing)?

    OK it was a silly question...

    create a format with wglChoosePixelFormatARB
    with WGL_SAMPLE_BUFFERS_ARB true, then query each of those with wglGetPixelFormatAttribivARB WGL_SAMPLES_ARB

Posting Permissions

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