Skip to content

Latest commit

 

History

History
80 lines (63 loc) · 5.25 KB

nn-d3d11_1-id3duserdefinedannotation.md

File metadata and controls

80 lines (63 loc) · 5.25 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NN:d3d11_1.ID3DUserDefinedAnnotation
ID3DUserDefinedAnnotation (d3d11_1.h)
The ID3DUserDefinedAnnotation interface enables an application to describe conceptual sections and markers within the application's code flow.
ID3DUserDefinedAnnotation
ID3DUserDefinedAnnotation interface [Direct3D 11]
ID3DUserDefinedAnnotation interface [Direct3D 11]
described
d3d11_1/ID3DUserDefinedAnnotation
direct3d11.id3duserdefinedannotation
direct3d11\id3duserdefinedannotation.htm
direct3d11
255DE24B-3D6D-49D9-B6A8-D296AB99B4C9
12/05/2018
ID3DUserDefinedAnnotation, ID3DUserDefinedAnnotation interface [Direct3D 11], ID3DUserDefinedAnnotation interface [Direct3D 11],described, d3d11_1/ID3DUserDefinedAnnotation, direct3d11.id3duserdefinedannotation
d3d11_1.h
Windows
Windows 8 and Platform Update for Windows 7 [desktop apps \| UWP apps]
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps \| UWP apps]
D3D11.lib
Windows
19H1
ID3DUserDefinedAnnotation
d3d11_1/ID3DUserDefinedAnnotation
c++
APIRef
kbSyntax
COM
D3D11.lib
D3D11.dll
ID3DUserDefinedAnnotation

ID3DUserDefinedAnnotation interface

-description

The ID3DUserDefinedAnnotation interface enables an application to describe conceptual sections and markers within the application's code flow. An appropriately enabled tool, such as Microsoft Visual Studio Ultimate 2012, can display these sections and markers visually along the tool's Microsoft Direct3D time line, while the tool debugs the application. These visual notes allow users of such a tool to navigate to parts of the time line that are of interest, or to understand what set of Direct3D calls are produced by certain sections of the application's code.

-inheritance

The ID3DUserDefinedAnnotation interface inherits from the IUnknown interface. ID3DUserDefinedAnnotation also has these types of members:

-remarks

The methods of ID3DUserDefinedAnnotation have no effect when the calling application is not running under a Direct3D-specific profiling tool like Visual Studio Ultimate 2012.

The ID3DUserDefinedAnnotation interface is published by Microsoft Direct3D 11 device contexts. Therefore, ID3DUserDefinedAnnotation has the same threading rules as the ID3D11DeviceContext interface, or any other context interface. For more information about Direct3D threading, see MultiThreading. To retrieve the ID3DUserDefinedAnnotation interface for the context, call the QueryInterface method for the context (for example, ID3D11DeviceContext::QueryInterface). In this call, you must pass the identifier of ID3DUserDefinedAnnotation.

The ID3DUserDefinedAnnotation interface is the Microsoft Direct3D 10 and later equivalent of the Direct3D 9 PIX functions (D3DPERF_* functions).

Note  Setting the D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY flag in your app replaces calling D3DPerf_SetOptions(1). But, to prevent Direct3D debugging tools from hooking your app, your app can also call ID3DUserDefinedAnnotation::GetStatus to determine whether it is running under a Direct3D debugging tool and then exit accordingly.
 
You must call the BeginEvent and EndEvent methods in pairs; pairs of calls to these methods can nest within pairs of calls to these methods at a higher level in the application's call stack. In other words, a "Draw World" section can entirely contain another section named "Draw Trees," which can in turn entirely contain a section called "Draw Oaks." You can only associate an EndEvent method with the most recent BeginEvent method, that is, pairs cannot overlap. You cannot call an EndEvent for any BeginEvent that preceded the most recent BeginEvent. In fact, the runtime interprets the first EndEvent as ending the second BeginEvent.

-see-also

Common Version Interfaces

IUnknown