Draw all particles of this emitter

Property definitions

gamnit $ ParticleSystem :: draw
	# Draw all particles of this emitter
	fun draw
	do
		if ots.is_empty then return

		var program = program
		program.use

		var texture = texture
		if texture != null then
			glActiveTexture gl_TEXTURE0
			glBindTexture(gl_TEXTURE_2D, texture.gl_texture)
			program.use_texture.uniform true
			program.texture.uniform 0
		else
			program.use_texture.uniform false
		end

		program.scale.array_enabled = true
		program.scale.array(scales, 1)

		program.center.array_enabled = true
		program.center.array(centers, 3)

		program.color.array_enabled = false
		program.color.uniform(1.0, 1.0, 1.0, 1.0)

		program.ot.array_enabled = true
		program.ot.array(ots, 1)

		program.ttl.array_enabled = true
		program.ttl.array(ttls, 1)

		program.t.uniform clock.total.to_f
		program.mvp.uniform app.world_camera.mvp_matrix

		glDrawArrays(gl_POINTS, 0, ots.length)
	end
lib/gamnit/depth/particles.nit:125,2--162,4