![]() |
![]() |
![]() |
Specifies to a performance profiler (such as PIX) that a user-defined event is beginning.
Syntax
int WINAPI D3DPERF_BeginEvent(
D3DCOLOR col, LPCWSTR wszName );
Parameters
- col
- Color that may be used by the profiler to show a graphical representation of the event.
- wszName
- Name of the event.
Return Value
The level of the hierarchy that this event is starting in. If an error occurs, the return value will be negative.
Remarks
User-defined events group together other events in a way that is meaningful to the application so they can be better represented in performance profiling tools. For example, a "Draw Spaceship" event might bracket a number of Microsoft Direct3D calls that handle drawing a spaceship in a game. Events can be nested.
Each D3DPERF_BeginEvent call should have a matching D3DPERF_EndEvent call. Instantaneous events (which do not bracket other events) should be labeled using D3DPERF_SetMarker rather than using D3DPERF_BeginEvent and D3DPERF_EndEvent.
Function Information
Header d3d9.h Import library d3d9.lib Minimum operating systems Windows 98
See Also
Gathering Data in the PIX Basic View