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

Thread: Strange value from GL_POINT_SIZE_RANGE

  1. #1
    Intern Contributor
    Join Date
    Oct 2011
    Posts
    52

    Strange value from GL_POINT_SIZE_RANGE

    Im trying to get the maximum allowed size for points.

    Code :
    float sizes[2];
    glGetFloatv( GL_POINT_SIZE_RANGE, sizes);

    It says 1.0 and 63.375. Now thats not true, I can set it to 500 and it works. Why Im I getting 63? Thanks
    Last edited by Aliii; 08-18-2014 at 03:20 AM.

  2. #2
    Intern Contributor
    Join Date
    Jul 2014
    Location
    Italy, Lissone
    Posts
    50
    ok i found it in microsoft references:
    Not all sizes are supported when point antialiasing is enabled. If an unsupported size is requested, the nearest supported size is used. Only size 1.0 is guaranteed to be supported; others depend on the implementation. The range of supported sizes and the size difference between supported sizes within the range can be queried by calling glGet with arguments GL_POINT_SIZE_RANGE and GL_POINT_SIZE_GRANULARITY.
    so if you set 500 the program uses 63 value because is the nearest supported size, hope you learnd

  3. #3
    Intern Contributor
    Join Date
    Oct 2011
    Posts
    52
    I dont really get it. I set it to 500 with glPointSize( 500) ...if I querry the current size, it says 500. Also it draws it 500 pixels wide. It just says that the range is from 1 to 63.

  4. #4
    Intern Contributor
    Join Date
    Jul 2014
    Location
    Italy, Lissone
    Posts
    50
    Quote Originally Posted by Aliii View Post
    I dont really get it. I set it to 500 with glPointSize( 500) ...if I querry the current size, it says 500. Also it draws it 500 pixels wide. It just says that the range is from 1 to 63.
    i tried to do what your code have to do and the result is that if i set glPointSize(500.0f) i get i max size of about 189 from glGetFloatv(GL_POINT_SIZE_RANGE, sizes);
    so i think the point is that you should not set a size grater then your max size, i suppose. i can't really think an other way to interpret it

    ok i fugured out, i read again the reference and i found that GL_POINT_SIZE_RANGE works only when anti-aliasing is applied, so if you want to apply anti_alising, your point' size will be maximum about 63
    Last edited by Ruggero Visitnin; 08-22-2014 at 05:23 AM.

  5. #5
    Intern Contributor
    Join Date
    Oct 2011
    Posts
    52
    Thanks! Thats OK then, Im using shaders. It was just strange.

    Im putting it here if anybody else runs into this:
    "Non-antialiased point size may be clamped to an implementation-dependent maximum. Although this maximum cannot be queried, it must be no less than the maximum value for antialiased points, rounded to the nearest integer value."

Posting Permissions

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