GLOW API version 1.0 reference

Back to
Table of contents


class GlowRenderSwitch

General information

type: class
inherits: GlowComponent
module: glowRenderSwitch

GlowRenderSwitch is a simple component that can enable and disable rendering of its children. One common use of GlowRenderSwitch is in conjunction with GlowViewManipulator. You may wish to render a simplified version of the scene while the user is interactively manipulating. One way to do this is to define two components under the manipulator, one for detailed (slow) rendering, and the other for simplified (faster) rendering, and then guard each component by a render switch. You can then turn these switches on and off depending on whether or not the user is interactively manipulating.

                      |--> GlowRenderSwitch --> My_Fast_Component
GlowViewManipulator --|
                      |--> GlowRenderSwitch --> My_Slow_Component

GLOW programs may use GlowRenderSwitch to manage rendering of component subtrees.

Methods

Constructors and destructor

GlowRenderSwitch(GlowComponent* parent)

Creates a new GlowRenderSwitch underneath parent in the component hierarchy.

GlowRenderSwitch(void)

Creates a new GlowRenderSwitch but does not initialize it. A render switch created in this way may not be used until its Init() method is called.

void Init(GlowComponent* parent)

Initializes a new GlowRenderSwitch and places it underneath parent in the component hierarchy.

virtual ~GlowRenderSwitch(void)

The destructor for GlowRenderSwitch also recursively deletes the components's children in the hierarchy.

Render switch methods

void Enable(void)

Enables rendering of the component's children.

void Disable(void)

Disables rendering of the component's children.

void SetEnabled(bool enabled)

Enables or disables rendering of the component's children.

bool IsEnabled(void) const

Returns the enable state.

Inherited methods
These methods are inherited from GlowComponent.

void Close(void)

GlowComponent* Parent(void) const

GlowSubwindow* WhichWindow(void)

GlowSubwindow* ParentWindow(void) const

GlowWindow* ToplevelWindow(void)

bool IsToplevel(void) const

GlowComponent* Next(void) const

GlowComponent* Prev(void) const

int NumChildren(void) const

GlowComponent* FirstChild(void) const

GlowComponent* LastChild(void) const

void ReorderChild(GlowComponent* child, GlowComponent* pos)

void KillChildren(void)

void Activate(void)

void Deactivate(void)

bool IsActive(void)

bool IsInactive(void)

bool IsActiveStandby(void)

void Paint(void)

Overrideable methods

Inherited methods
These methods are inherited from GlowComponent.

virtual void OnActivate(void)

virtual void OnDeactivate(void)

virtual void OnBeginPaint(void)

This method is overridden by GlowRenderSwitch to perform render enabling and disabling. You should not normally override it again.

virtual void OnEndPaint(void)


Back to
Table of contents


The GLOW Toolkit