public static void render( GL2 gl ){
        Particle particle;

        for(ParticleGenerator<? extends Particle> event : events)
            event.update();
        events.clear();
        if(fountainsEnabled)
            for(ParticleGenerator<? extends Particle> fountain : generators)
                fountain.update();

        // Check for new particles
        while ((particle = newParticles.poll())!= null)
            particles.add(particle);


        // Particles are transparent.
        gl.glDisable(GL2.GL_LIGHTING);
        gl.glEnable( GL2.GL_BLEND );
        gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE);
        gl.glDepthMask( false );

        gl.glEnable(GL2.GL_POINT_SMOOTH);
        //gl.glPointSize(size);
        gl.glBegin(GL2.GL_POINTS);

        // Loop over particles.
        Iterator<Particle> it = particles.iterator();
        while(it.hasNext()){
            particle = it.next();
            if (particle.isAlive()) {
                particle.update();
                particle.draw(gl);
            } else {
                it.remove();
            }
        }

        gl.glEnd();
        gl.glDepthMask( true );
        gl.glDisable( GL2.GL_BLEND );
        gl.glEnable(GL2.GL_LIGHTING);

    }