This document is archived and information here might be outdated.  Recommended version.


ISceneGraphEvents.BeforeDraw Event (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > 3DAnalyst > ESRI.ArcGIS.Analyst3D > Interfaces > IS > ISceneGraphEvents Interface > ISceneGraphEvents.BeforeDraw Event
ArcGIS Developer Help

ISceneGraphEvents.BeforeDraw Event

Fired when drawing starts.

[Visual Basic .NET]
Public Event BeforeDraw As BeforeDrawEventHandler
[C#]
public event BeforeDrawEventHandler BeforeDraw
[C++]
HRESULT BeforeDraw(
  ISceneViewer* pViewer
);
[C++]
Parameters
pViewer [in]

pViewer is a parameter of type ISceneViewer*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Remarks

This event method is often used by an OpenGL routine that renders something before the main features in the scene are drawn.  A good example is the scene background, such as sky/sun/moon etc.  Just like the art of painting, one normally needs to draw the background first and then the main feature.  So this method is generally for the background rendering.  It can also be used for executing some routines other than drawing.

The BeforeDraw method returns a boolean value.  When it's set to true, the SceneGraph's drawing is disabled, and you as a developer take control of the drawing (e.g. via OpenGL).  Otherwise, the SceneGraph takes care of drawing as usual.

See Also

ISceneGraphEvents Interface