Skip to content

GenericRenderWindow ​

Introduction ​

vtkGenericRenderWindow provides a skeleton for implementing a render window using one's own OpenGL context and drawable.

Methods ​

delete ​

Release GL context

extend ​

Method used to decorate a given object (publicAPI+model) with vtkGenericRenderWindow characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIGenericRenderWindowInitialValuesNo(default: {})

getApiSpecificRenderWindow ​

Get the render back-end specific render window.

getContainer ​

Get container element

getInteractor ​

Get interactor object

getRenderWindow ​

getRenderer ​

newInstance ​

Method used to create a new instance of vtkGenericRenderWindow

ArgumentTypeRequiredDescription
initialValuesIGenericRenderWindowInitialValuesNofor pre-setting some of its content

onResize ​

Method to register callback when the object is resize().

ArgumentTypeRequiredDescription
callbackYesfunction

Returns ​

TypeDescription
subscription object so you can easily unsubscribe later on

resize ​

Handle window resize

setBackground ​

Set background color

ArgumentTypeRequiredDescription
backgroundRGBColor or RGBAColorYesThe background color.

Returns ​

TypeDescription
true if the background color actually changed, false otherwise

setContainer ​

Set thecontainer element

ArgumentTypeRequiredDescription
elHTMLElementYesThe container element.