Class DxgiSurface3
The IDXGISurface2
interface extends the IDXGISurface1
interface by adding support for sub-resource surfaces and getting a handle to a shared resource.
Inherited Members
Namespace: JeremyAnsel.DirectX.Dxgi
Assembly: JeremyAnsel.DirectX.Dxgi.dll
Syntax
public sealed class DxgiSurface3 : DxgiDeviceSubObject, IDisposable, IDxgiReleasable
Constructors
| Edit this page View SourceDxgiSurface3(object)
Initializes a new instance of the DxgiSurface3 class.
Declaration
public DxgiSurface3(object resource)
Parameters
Type | Name | Description |
---|---|---|
object | resource | A resource interface which implements the |
Fields
| Edit this page View SourceInterfaceGuid
The interface GUID.
Declaration
public static readonly Guid InterfaceGuid
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 |
Handle
Gets an handle representing the DXGI object interface.
Declaration
public override object Handle { get; }
Property Value
Type | Description |
---|---|
object |
Overrides
Methods
| Edit this page View SourceGetDC(bool)
Returns a device context (DC) that allows you to render to a Microsoft DirectX Graphics Infrastructure (DXGI) surface using Windows Graphics Device Interface (GDI).
Declaration
public nint GetDC(bool discard)
Parameters
Type | Name | Description |
---|---|---|
bool | discard | A value indicating whether to preserve Direct3D contents in the GDI DC. |
Returns
Type | Description |
---|---|
nint | An HDC handle that represents the current device context for GDI rendering. |
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. |
ReleaseDC(DxgiRect)
Releases the GDI device context (DC) that is associated with the current surface and allows you to use Direct3D to render.
Declaration
public void ReleaseDC(DxgiRect dirtyRect)
Parameters
Type | Name | Description |
---|---|---|
DxgiRect | dirtyRect | A RECT structure that identifies the dirty region of the surface. A dirty region is any part of the surface that you used for GDI rendering and that you want to preserve. This area is used as a performance hint to graphics subsystem in certain scenarios. Do not use this parameter to restrict rendering to the specified rectangular region. |
Unmap()
Invalidate the pointer to the surface retrieved by IDXGISurface::Map
and re-enable GPU access to the resource.
Declaration
public void Unmap()