Marks the beginning of a user-defined event. PIX can use this event to trigger an action.
int D3DPERF_BeginEvent( D3DCOLOR col, LPCWSTR wszName );
The zero-based level of the hierarchy that this event is starting in. If an error occurs, the return value will be negative.
User-defined events group together other events in a way that is meaningful to the target program so they can be better represented in performance profiling tools. For example, a "Draw Spaceship" event might bracket a number of 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.
Header: Declared in D3d9.h.