Exemple #1
0
        /// <summary>
        /// Sets the stream targets.
        /// </summary>
        /// <param name="buffers">The buffers.</param>
        public void SetStreamTargets(params Buffer[] buffers)
        {
            SharpDX.Direct3D11.StreamOutputBufferBinding[] streamOutputBufferBindings;

            if (buffers != null)
            {
                streamOutputBufferBindings = new SharpDX.Direct3D11.StreamOutputBufferBinding[buffers.Length];
                for (int i = 0; i < buffers.Length; ++i)
                {
                    streamOutputBufferBindings[i].Buffer = buffers[i].NativeBuffer;
                }
            }
            else
            {
                streamOutputBufferBindings = null;
            }

            NativeDeviceContext.StreamOutput.SetTargets(streamOutputBufferBindings);
        }
Exemple #2
0
        /// <summary>
        /// Sets the stream targets.
        /// </summary>
        /// <param name="buffers">The buffers.</param>
        public void SetStreamTargets(params Buffer[] buffers)
        {
            SharpDX.Direct3D11.StreamOutputBufferBinding[] streamOutputBufferBindings;

            if (buffers != null)
            {
                streamOutputBufferBindings = new SharpDX.Direct3D11.StreamOutputBufferBinding[buffers.Length];
                for (int i = 0; i < buffers.Length; ++i)
                    streamOutputBufferBindings[i].Buffer = buffers[i].NativeBuffer;
            }
            else
            {
                streamOutputBufferBindings = null;
            }

            NativeDeviceContext.StreamOutput.SetTargets(streamOutputBufferBindings);
        }