Class DxgiSurface
The IDXGISurface interface implements methods for image-data objects.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.Dxgi
Assembly: JeremyAnsel.DirectX.Dxgi.dll
Syntax
[SecurityCritical]
public class DxgiSurface : DxgiDeviceSubObject, IDisposable
Constructors
| Edit this page View SourceDxgiSurface(nint)
Initializes a new instance of the DxgiSurface class.
Declaration
public DxgiSurface(nint comPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | comPtr |
Fields
| Edit this page View SourceDxgiSurfaceGuid
The interface GUID.
Declaration
public static readonly Guid DxgiSurfaceGuid
Field Value
| Type | Description |
|---|---|
| Guid |
Properties
| Edit this page View SourceDescription
Gets a description of the surface.
Declaration
public DxgiSurfaceDesc Description { get; }
Property Value
| Type | Description |
|---|---|
| DxgiSurfaceDesc |
Methods
| Edit this page View SourceCreateSurfaceFromResource(DXComObject)
Initializes a new instance of the DxgiSurface class.
Declaration
public static DxgiSurface CreateSurfaceFromResource(DXComObject resource)
Parameters
| Type | Name | Description |
|---|---|---|
| DXComObject | resource | A resource interface which implements the |
Returns
| Type | Description |
|---|---|
| DxgiSurface |
CreateSurfaceFromResource(nint)
Initializes a new instance of the DxgiSurface class.
Declaration
public static DxgiSurface CreateSurfaceFromResource(nint resource)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | resource | A resource interface which implements the |
Returns
| Type | Description |
|---|---|
| DxgiSurface |
Map(DxgiMapOptions)
Get a pointer to the data contained in the surface, and deny GPU access to the surface.
Declaration
public DxgiMappedRect Map(DxgiMapOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiMapOptions | options | CPU read-write flags. These flags can be combined with a logical OR. |
Returns
| Type | Description |
|---|---|
| DxgiMappedRect | The surface data. |
Unmap()
Invalidate the pointer to the surface retrieved by IDXGISurface::Map and re-enable GPU access to the resource.
Declaration
public void Unmap()