Crystal Space 2.0.0: 4.4.4 Frame phase events

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 4.4.4 Frame phase events

To handle events during different points of frame processing, handlers of `‘csevFrame’` can use simple helper macros to classify themselves as belonging to any of six “phases” of frame creation.

- Logic - game logic to be performed before any rendering is done. Use the `‘CS_EVENTHANDLER_PHASE_LOGIC(x)’` macro.
- 3D - rendering of the 3D view, after the logic phase and before the 2D phase. Use the `‘CS_EVENTHANDLER_PHASE_3D(x)’` macro.
- 2D - rendering of 2D overlays; after the 3D phase and before the console phase. Use the `‘CS_EVENTHANDLER_PHASE_2D(x)’` macro.
- Console - used primarily by the Crystal Entity Layer (CEL), after the 2D phase and before the Debug phase. Use the `‘CS_EVENTHANDLER_PHASE_CONSOLE(x)’` macro.
- Debug - used primarily by the `‘bugplug’` plugin, after the console phase and before the frame phase. Use the `‘CS_EVENTHANDLER_PHASE_DEBUG(x)’` macro.
- Frame - final rendering to the screen, after the debug phase. Use the `‘CS_EVENTHANDLER_PHASE_FRAME(x)’` macro.

These macros, included in the declaration of an event handler class, provide all of the naming and constraint methods to make instances of that handler class schedule their subscriptions to `‘csevFrame’` within the appropriate phase. (You will not be able to use these macros if you need to subscribe the handler to events besides `‘csevFrame’` and apply ordering constraints for those events.)

This document was generated using texi2html 1.76.