I need to give the user the possibility to insert some custom geometry, like a point.
He can specify size and color.
Trying to get how the different parameters work, I got these values on my platform:
GL_POINT_SIZE_MIN: 33062
GL_POINT_SIZE_MAX: 33063
GL_POINT_SIZE_RANGE and GL_POINT_SIZE_GRANULARITY are deprecated in GL
versions 1.2 and greater. Their functionality has been replaced by
GL_SMOOTH_POINT_SIZE_RANGE and GL_SMOOTH_POINT_SIZE_GRANULARITY.
GL_SMOOTH_POINT_SIZE_RANGE: 2834
GL_SMOOTH_POINT_SIZE_GRANULARITY: 2835
Could somebody explain to me these strange values? I mean, how can differ the min and max values by just one?
The values above are taken in the following way:
System.out.println("max: "+GL2.GL_POINT_SIZE_MAX+" min: "+GL2.GL_POINT_SIZE_MIN);
System.out.println("range: "+GL2.GL_SMOOTH_POINT_SIZE_RANGE+" granularity: "+GL2.GL_SMOOTH_POINT_SIZE_GRANULARITY);
On the suggestions of datenwolf and Denis Germ I am now retriving parameters as follows:
float ps[] = new float[5];
gl2.glGetFloatv(GL2.GL_POINT_SIZE_MIN, ps, 0);
gl2.glGetFloatv(GL2.GL_POINT_SIZE_MAX, ps, 1);
gl2.glGetFloatv(GL2.GL_SMOOTH_POINT_SIZE_RANGE, ps, 2);
gl2.glGetFloatv(GL2.GL_SMOOTH_POINT_SIZE_GRANULARITY, ps,4);
System.out.println("min: "+ps[0]+" max: "+ps[1]);
System.out.println("range: "+ps[2]+" - "+ps[3]+" granularity: "+ps[4]);
And now I get:
min: 0.0 max: 63.375
range: 1.0 – 63.375 granularity: 0.125
It looks better, but still, if range starts from 1.0, why min is 0.0f?
GL_POINT_SIZE_RANGE: glGet will return two values, where the first is the minimum and the secound is the maximum point size (range from min to max).
GL_POINT_SIZE_GRANULARITY: glGet will return a single value, which describes the granularity, for example, 0.1: you can specify point sizes as 1.1, 1.2, 1.3, but not 1.05, 1.15, etc.