Beispiel #1
0
	void operator()(const Particles& particles)
	{
		gl.Enable(Capability::Blend);
		gl.Bind(vao);
		gl.Use(prog);
		gl.DrawElements(PrimitiveType::Points, particles.Count(), (GLuint*)0);
		gl.Disable(Capability::Blend);
	}
Beispiel #2
0
	void operator()(const Particles& particles)
	{
		gl.Bind(vao);
		gl.Use(prog);
		xfb.BeginPoints();
		gl.DrawArrays(PrimitiveType::Points, 0, particles.Count());
		xfb.End();
	}
Beispiel #3
0
	void operator()(const Particles& particles)
	{
		gl.Bind(vao);
		gl.Use(prog);
		for(GLuint p=0; p!=particles.sort_nw.PassCount(); ++p)
		{
			Buffer::CopySubData(
				BufferTarget::CopyRead,
				BufferTarget::CopyWrite,
				0, 0, particles.Count()*sizeof(GLuint)
			);
			prog.pass.Set(p);

			xfb.BeginPoints();
			gl.DrawArrays(PrimitiveType::Points, 0, particles.Count());
			xfb.End();
		}
		Buffer::CopySubData(
			BufferTarget::CopyRead,
			BufferTarget::CopyWrite,
			0, 0, particles.Count()*sizeof(GLint)
		);
	}