Class DX11Buffer
Represents a DirectX buffer object.
Implements
Inherited Members
Namespace: Evergine.DirectX11
Assembly: Evergine.DirectX11.dll
Syntax
public class DX11Buffer : Buffer, IDisposable
  Constructors
DX11Buffer(DX11GraphicsContext, IntPtr, ref BufferDescription)
Initializes a new instance of the DX11Buffer class.
Declaration
public DX11Buffer(DX11GraphicsContext context, IntPtr data, ref BufferDescription description)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DX11GraphicsContext | context | The graphics context.  | 
      
| IntPtr | data | Data pointer.  | 
      
| BufferDescription | description | The buffer description.  | 
      
Fields
NativeBuffer
The DirectX buffer instance.
Declaration
public ID3D11Buffer NativeBuffer
  Field Value
| Type | Description | 
|---|---|
| ID3D11Buffer | 
Properties
Name
Gets or sets a string identifying this instance. Can be used in graphics debuggers tools.
Declaration
public override string Name { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Overrides
NativePointer
Gets the native pointer.
Declaration
public override IntPtr NativePointer { get; }
  Property Value
| Type | Description | 
|---|---|
| IntPtr | 
Overrides
ShaderResourceView
Gets the shader resource view.
Declaration
public ID3D11ShaderResourceView ShaderResourceView { get; }
  Property Value
| Type | Description | 
|---|---|
| ID3D11ShaderResourceView | 
UnorderedAccessView
Gets the unordered access view.
Declaration
public ID3D11UnorderedAccessView UnorderedAccessView { get; }
  Property Value
| Type | Description | 
|---|---|
| ID3D11UnorderedAccessView | 
Methods
CopyTo(ID3D11DeviceContext, Buffer, uint, uint, uint)
Copy this buffer in the destination buffer.
Declaration
public void CopyTo(ID3D11DeviceContext deviceContext, Buffer destination, uint sizeInBytes, uint sourceOffset = 0, uint destinationOffset = 0)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ID3D11DeviceContext | deviceContext | Device context.  | 
      
| Buffer | destination | The destination buffer.  | 
      
| uint | sizeInBytes | The data size in bytes to copy.  | 
      
| uint | sourceOffset | The source buffer offset in bytes.  | 
      
| uint | destinationOffset | The destination buffer offset in bytes.  | 
      
Dispose()
Dispose this instance.
Declaration
public override void Dispose()
  Overrides
SetData(ID3D11DeviceContext, IntPtr, uint, uint)
Fill the buffer from a pointer.
Declaration
public void SetData(ID3D11DeviceContext deviceContext, IntPtr source, uint sourceSizeInBytes, uint destinationOffsetInBytes = 0)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ID3D11DeviceContext | deviceContext | Device context.  | 
      
| IntPtr | source | The data pointer.  | 
      
| uint | sourceSizeInBytes | The size in bytes.  | 
      
| uint | destinationOffsetInBytes | The offset in bytes.  | 
      
ToStaging()
Return a new Buffer with ResourceUsage set to staging.
Declaration
public DX11Buffer ToStaging()
  Returns
| Type | Description | 
|---|---|
| DX11Buffer | New staging Buffer.  |