glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE); glDepthMask(GL_FALSE); glBegin(GL_LINES); for (int i=0; i < numParticles_; i++) { glColor3fv(particles_[i].color.vec); glVertex3fv(particles_[i].tailPosition.vec); glVertex3fv(particles_[i].position.vec); } glEnd(); glDepthMask(GL_TRUE); glBlendFunc(GL_ONE, GL_ZERO); glDisable(GL_BLEND);
Example: