Point Size Mode with GLSL shaders

There is another thread about rendering various size of points with GLSL shader


My request for new feature is that you could enable Point Size Mode for shaders in jME and not need to do it from LWJGL.

In OpenGL Shading Language book it is said to be done with:



Ran across this again…  Being lazy here, but does anyone know if it's just a matter of enabling the flag (and then the point size is read from the values set in normal fixed function calls?)

The idea was to set the size of the point for each point in vertex shader. This is how I do it in my program (vertex shader):

void main()
   gl_PointSize = pointSize;

If no value is set in vertex shader, then the fixed function value is used intead.

This is how I enable the point size mode for the vertex program in Java-code:


    GL14.glPointParameterf(GL14.GL_POINT_SIZE_MIN, 3.5f);
    GL14.glPointParameterf(GL14.GL_POINT_SIZE_MAX, 7.0f);
    GL14.glPointParameterf(GL14.GL_POINT_FADE_THRESHOLD_SIZE, 4.0f);

Setting of those point parameters would be nice to have also..  :)

Could you also enable Point Sprites?  :wink: