point sprites, help please...

hi, i have been struggling with point sprites for a long time here are my vertex and fragment shaders

	const char *fshader =

	        "#version 430 core
"
	        "uniform sampler2D tex1;
"
	        "out vec4 color;
"
	        "void main(void)
"
	        "{
"
	        "    color = texture2D(tex1, gl_PointCoord);
"
	        "}";


	const char *vshader =
	        "#version 430 core
"
	        "layout (location = 0) in vec4 vertices;
"
	        "void main(void)
"
	        "{
"
		"    gl_PointSize = 60;
"
	        "    gl_Position = vertices;
"
	        "}";

i set up the texture by loading it with SOIL. then i use glUniform1i to set the sampler2D variable to 1 and then i make the activetexture unit 1 by glActiveTexture(GL_TEXTURE1) and bind the image to it.
heres my display function

void display ()
{
	glClear (GL_COLOR_BUFFER_BIT);

	glEnable(GL_PROGRAM_POINT_SIZE);
	
	glBindVertexArray (vao);
	glDrawArrays (GL_POINTS, 0, 4);
	
	glDisable(GL_PROGRAM_POINT_SIZE);
}

thanks much in advance :slight_smile:

Have a look at the shader at the top of ClanLib/app.cpp at master · sphair/ClanLib · GitHub
Remember to set
glPointSize(point_size);
glPointParameterf(GL_POINT_FADE_THRESHOLD_SIZE, point_fade_treshold_size);
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);