Hello,
im new here in this forum.
I want to build a particle system in opengl, and i fount the extension GL_POINT_SPRITE_ARB. Now, i want the particles in specific sizes related to the viewing distance.
If i call glPointSize (…) betwenn the glBegin (GL_POINTS) and glEnd() i got an runtime-error. If i call the glPointSize befor the glBegin, the it runs fine.
The problem is that if i have to call for every point glBegin and glEnd, i do min. 3 funktion calls per point, e.g.
glBegin (GL_POINTS);
glVertex3f (x,y,z);
glEnd();
I am looking for a trick, so i can adjust the pointsize more easy, and effizient.
Another Problem is, that in this way i also have to calculate the point size on the cpu, perhaps it is also possible to do that on the gpu!?
At this time, i get the GL_MODELVIEW_MATRIX, and multiply every Point whith this matrix to get the z-distance.
Sorry for my bad english, i hope you understand my problem. If you have problems understanding my thread, please ask me!
Greez from germany,
Timo