示例#1
0
        internal unsafe DataBuffer(D3D.Blob buffer)
        {
            Debug.Assert(buffer.BufferSize > 0);

            _buffer = (sbyte *)buffer.BufferPointer;
            _size   = buffer.BufferSize;
            _blob   = buffer;
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DataStream"/> class from a Blob buffer.
        /// </summary>
        /// <param name="buffer">The buffer.</param>
        public DataStream(D3D.Blob buffer)
        {
            unsafe
            {
                Debug.Assert(buffer.BufferSize > 0);

                _buffer   = (byte *)buffer.BufferPointer;
                _size     = buffer.BufferSize;
                _canRead  = true;
                _canWrite = true;
                _blob     = buffer;
            }
        }