public ParticleSystem(IGraphicsContext context,int maxParticleCount, ParticleSettings settings)
        {
            this.settings = settings;
            this.queue = new Particle[maxParticleCount * 4];

            this.vertexBuffer = new VertexBuffer<Particle>(context, OpenTK.Graphics.OpenGL.BufferUsageHint.StreamDraw);
            this.indecies = new IntIndexBuffer(context, OpenTK.Graphics.OpenGL.BufferUsageHint.StaticDraw);

            this.SetIndexBufferSize(maxParticleCount);

            this.vertexBuffer.Bind();
            this.vertexBuffer.SetData(this.queue);

            GL.GenVertexArrays(1, out vba);
        }
Exemplo n.º 2
0
        public ParticleSystem(IGraphicsContext context, int maxParticleCount, ParticleSettings settings)
        {
            this.settings = settings;
            this.queue    = new Particle[maxParticleCount * 4];

            this.vertexBuffer = new VertexBuffer <Particle>(context, OpenTK.Graphics.OpenGL.BufferUsageHint.StreamDraw);
            this.indecies     = new IntIndexBuffer(context, OpenTK.Graphics.OpenGL.BufferUsageHint.StaticDraw);

            this.SetIndexBufferSize(maxParticleCount);

            this.vertexBuffer.Bind();
            this.vertexBuffer.SetData(this.queue);



            GL.GenVertexArrays(1, out vba);
        }