TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface IGraphicsComponent in Tinman.Engine.Rendering

Base interface for user interface components that interact with an Graphics context.

interface IGraphicsComponent base of Component
  ISceneEntityView
  IWidget
  IWidgetGui
  ObjectList
  SceneView
  ScreenLabelPlacement
  TerrainView

Remarks

The order method calls on an IGraphicsComponent is this:

  1. GraphicsAttach
  2. GraphicsResize
    The first call is made right after attach. Each time the screen size changes, the method is called again once.
  3. GraphicsDetach

Methods

GraphicsAttach

Attaches this component to the given Graphics context.

method GraphicsAttach (Graphics graphics)
params graphics [not-null] The graphics context.

Remarks:

All graphics-related resources should be created here.

Do not use the screen size of graphics here, as it may not be valid (see Graphics for details). Instead, use the screen size that is provided by GraphicsResize.

GraphicsDetach

Detaches this user interface component from its Graphics context.

method GraphicsDetach ()

Remarks:

All graphics-related resources should be disposed here.

GraphicsResize

The screen size has changed.

method GraphicsResize (Vec2I screenSize)
params screenSize The new screen size, in pixels.