protected String getPointVertexShader()
{
// Define a simple shader program for our points.
final String vertexShader =
"uniform mat4 u_MVPMatrix; \n"
+ "uniform vec2 u_pointSize; \n"
+ "attribute vec4 a_Position; \n"
+ "attribute vec2 a_TexCoordinate; \n" // Per-vertex texture coordinate information we will pass in.
+ "varying vec2 v_TexCoordinate; \n" // This will be passed into the fragment shader.
+ "void main() \n"
+ "{ \n"
//+ " v_TexCoordinate = a_TexCoordinate; \n" // Pass through the texture coordinate.
+ " v_TexCoordinate = a_TexCoordinate.st * vec2(1.0, -1.0);\n"// Pass through the texture coordinate.
+ " gl_Position = u_MVPMatrix * a_Position; \n" // gl_Position is a special variable used to store the final position.
+ " gl_Position += vec4(gl_Position.w * u_pointSize * (a_TexCoordinate - vec2(0.5,0.5)), 0, 0);\n"
+ "} \n";
return vertexShader;
}