Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDXGISurface::Map method

Get a pointer to the data contained in the surface, and deny GPU access to the surface.

Syntax


HRESULT Map(
  [out] DXGI_MAPPED_RECT *pLockedRect,
        UINT             MapFlags
);

Parameters

pLockedRect [out]

Type: DXGI_MAPPED_RECT*

A pointer to the surface data (see DXGI_MAPPED_RECT).

MapFlags

Type: UINT

CPU read-write flags. These flags can be combined with a logical OR.

  • DXGI_MAP_READ - Allow CPU read access.
  • DXGI_MAP_WRITE - Allow CPU write access.
  • DXGI_MAP_DISCARD - Discard the previous contents of a resource when it is mapped.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns one of the error codes that are described in the DXGI_ERROR topic.

Remarks

Use IDXGISurface::Map to access a surface from the CPU. To release a mapped surface (and allow GPU access) call IDXGISurface::Unmap.

Requirements

Header

DXGI.h

Library

DXGI.lib

See also

IDXGISurface

 

 

Show:
© 2017 Microsoft