internal unsafe DataBuffer(D3D.Blob buffer) { Debug.Assert(buffer.BufferSize > 0); _buffer = (sbyte *)buffer.BufferPointer; _size = buffer.BufferSize; _blob = buffer; }
/// <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; } }