Results 1 to 5 of 5

Thread: Strange value from GL_POINT_SIZE_RANGE

  1. #1
    Member Contributor
    Join Date
    Oct 2011
    Posts
    60

    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

  2. #2
    Member Contributor
    Join Date
    Jul 2014
    Location
    Italy, Lissone
    Posts
    80
    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
    Member Contributor
    Join Date
    Oct 2011
    Posts
    60
    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
    Member Contributor
    Join Date
    Jul 2014
    Location
    Italy, Lissone
    Posts
    80
    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

  5. #5
    Member Contributor
    Join Date
    Oct 2011
    Posts
    60
    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."

Similar Threads

  1. Very Strange possible Bug
    By Proterus in forum Vulkan
    Replies: 5
    Last Post: 06-21-2018, 04:15 PM
  2. Strange Bug
    By PantheraOnca in forum OpenCL
    Replies: 3
    Last Post: 12-10-2010, 12:45 AM
  3. something strange
    By jide in forum OpenGL: Linux
    Replies: 0
    Last Post: 08-12-2003, 03:49 AM
  4. Something strange
    By Orzech in forum OpenGL: Basic Coding
    Replies: 45
    Last Post: 02-24-2003, 11:48 AM
  5. Very Strange!
    By INDICATOR in forum OpenGL: User Software
    Replies: 3
    Last Post: 12-12-2000, 02:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean