Esempio n. 1
0
        public void Update(DX11RenderContext context,int defaultvertexcount, int defaultinstancecount)
        {
            if (this.indbuffer != null) { this.indbuffer.Dispose(); }

            DrawInstancedArgs args = new DrawInstancedArgs();
            args.InstanceCount = defaultinstancecount;
            args.StartInstanceLocation = 0;
            args.StartVertexLocation = 0;
            args.VertexCount = defaultvertexcount;

            this.indbuffer = new InstancedIndirectBuffer(context, args);

        }
        public void Update(DxDevice device, int defaultvertexcount, int defaultinstancecount)
        {
            if (this.indbuffer != null)
            {
                this.indbuffer.Dispose();
            }

            DrawInstancedArgs args = new DrawInstancedArgs();

            args.InstanceCount         = defaultinstancecount;
            args.StartInstanceLocation = 0;
            args.StartVertexLocation   = 0;
            args.VertexCount           = defaultvertexcount;

            this.indbuffer = new InstancedIndirectBuffer(device, args);
        }
Esempio n. 3
0
        public void Update(DX11RenderContext context, int defaultinstancecount)
        {
            if (this.indbuffer != null)
            {
                this.indbuffer.Dispose();
            }

            DrawInstancedArgs args = new DrawInstancedArgs();

            args.InstanceCount         = defaultinstancecount;
            args.StartInstanceLocation = 0;
            args.StartVertexLocation   = 0;
            args.VertexCount           = this.geom.VerticesCount;

            this.indbuffer = new InstancedIndirectBuffer(context, args);
        }