IDisplayCallback Class Reference
 
 
 
IDisplayCallback Class Reference

This reference page is linked to from the following overview topics: Nitrous Graphics SDK Extensions.


#include <IDisplayCallback.h>

Inheritance diagram for IDisplayCallback:
ARefObject IDisposable IRefObject MaxHeapOperators MaxHeapOperators ChildObjectDisplayCallback

Class Description

A developer would implement this interface to allow immediate mode drawing of primitives, text and markers.

The display system will query for this interface and the Display method will be called.

Remarks:
The pointer to the IPrimitiveRenderer should not be stored as its life time is managed by the graphics driver A callback used to render items using IPrimitiveRenderer.

Public Member Functions

GraphicsDriverAPI  IDisplayCallback ()
virtual GraphicsDriverAPI  ~IDisplayCallback ()
GraphicsDriverAPI void  Display (TimeValue t, IPrimitiveRenderer &renderer, const DisplayCallbackContext &displayContext)
  A wrapper of DoDisplay() function.

Protected Member Functions

virtual void  DoDisplay (TimeValue t, IPrimitiveRenderer &renderer, const DisplayCallbackContext &displayContext)=0
  Prototype of user defined render procedure.

Constructor & Destructor Documentation

GraphicsDriverAPI IDisplayCallback ( )
virtual GraphicsDriverAPI ~IDisplayCallback ( ) [virtual]

Member Function Documentation

GraphicsDriverAPI void Display ( TimeValue  t,
IPrimitiveRenderer renderer,
const DisplayCallbackContext displayContext 
)

A wrapper of DoDisplay() function.

This function additional checks if current object is disposed.

virtual void DoDisplay ( TimeValue  t,
IPrimitiveRenderer renderer,
const DisplayCallbackContext displayContext 
) [protected, pure virtual]

Prototype of user defined render procedure.

User should implement this method, and this method is called when rendering. Note: this interface has reference counter, after creation you need to call AcquireInterface, when you want to release it, call ReleaseInterface.

Parameters:
[in] t Current time
[in] renderer Instance of IPrimitiveRender. User can use this class to draw geometries, markers, and texts.
[in] displayContext The display context.