Point Size Mode with GLSL shaders

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

http://www.jmonkeyengine.com/jmeforum/index.php?topic=6744.0



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:


glEnable(GL_VERTEX_PROGRAM_POINT_SIZE_ARB)




-Lauri

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:


    GL11.glEnable(GL20.GL_VERTEX_PROGRAM_POINT_SIZE);

    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:


    GL11.glEnable(GL20.GL_POINT_SPRITE);