Adjust GL_POINTS size

To adjust GL_POINTS size i’m using command


But the size of it is limited. Is there possibility to increase max possible GL_POINT size?

glEnable( GL_PROGRAM_POINT_SIZE ) and then set gl_PointSize in the vertex shader. On NVidia at least, you can get point sprites the size of the screen with this. The spec says gl_PointSize is clamped to implementation specific limits. Seems on any recent NVidia GPU, if there are any limits, they’re pretty big. Also, they cull as quads, not infinitely small points, which while it violates the spec, is more useful behavior.

Max point size is controlled by your graphics hardware, not by OpenGL or your program, so if your hardware doesn’t support points large enough then you’re going to either (a) buy new hardware, or (b) find an alternative solution that doesn’t involve using points.

In the latter case you could draw textured quads at the appropriate size - just use a texture image of a filled circle, billboard it, and draw. There are many options available for reducing the vertex submission overhead with this approach, but you’ll need to give more info about what you’re trying to do. The fact that you need points at varying sizes some of which may be bigger than the max hardware point size suggests something like a particle system, but that’s just guessing.

I’m trying to make painting app. And opengl draws points wherever mouse is pressed or dragged. Mouse action’s location is being registered and sended to mutable array, then from mutable array its copied to vertex array from witch points are drawn. Vertex array is being redrawed whenever new mouse location is being added to mutable array. So I’m not sure if its even possible to use quads. I tried but try wasn’t successful.


Dark Photon, your suggested solution is not working. I’m programming on mac, and did the fallowing:


(GL_PROGRAM_POINT_SIZE_EXT is being used because Xcode says that GL_PROGRAM_POINT_SIZE doest exist) but point’s size didn’t changed. Stayed like it would be set to:


hockeyman: Dark Photon specifically said you’re supposed to set the point size inside a shader through writing to gl_PointSize. glEnable(GL_PROGRAM_POINT_SIZE) and using glPointSize() won’t get you far. If you’re not using shaders you’re not supposed to enable program point sizes.

How did you try. Show us some code.

GL_PROGRAM_POINT_SIZE should be available in OpenGL 3.2 on the Mac (you’re using a Mac, right? Xcode etc. or are you talking about OpenGL ES?), maybe you have a OpenGL 2.1 context? Or you you want a 2.1 app?

You can only render point sizes from ALIASED_POINT_SIZE_RANGE[0] … ALIASED_POINT_SIZE_RANGE[1].
(Or SMOOTH_POINT_SIZE_RANGE[0] … SMOOTH_POINT_SIZE_RANGE[1], if you enable point smoothing.)

The upper limit is typically around 64, so asking for 1000 is not going to work.
You can see exactly what are all of the limits are across all Macs (across several OS versions) here:

If you want to draw something that looks like a point but larger than the point limit, draw a quad instead.