Skip to content

Helper ​

Methods ​

drawArrays ​

Update the shaders, bind the vertex array object and issue the draw call.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer being drawn.
actorvtkActorYesThe actor being drawn.
repYesThe representation to draw with.
oglMapperYesThe OpenGL mapper driving this helper.

Returns ​

TypeDescription
numberThe number of primitives drawn.

extend ​

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

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

getAllocatedGPUMemoryInBytes ​

Get the amount of GPU memory this helper's buffers hold, in bytes.

getAttributeUpdateTime ​

Get the time object tracking when the attributes were last bound.

getCABO ​

Get the cell array buffer object holding the packed vertices.

getNeedToRebuildShaders ​

Whether the shader program must be rebuilt before the next draw.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer being drawn.
actorvtkActorYesThe actor being drawn.
oglMapperYesThe OpenGL mapper driving this helper.

getOpenGLMode ​

Get the GL draw mode for this helper's primitive, POINTS while point picking.

ArgumentTypeRequiredDescription
repYesThe representation to draw with.

getPointPicking ​

Whether the helper draws points for hardware point picking.

getPointPickingPrimitiveSize ​

Get the point size in pixels used to make this helper's primitive pickable.

getPrimitiveType ​

Get which of the primTypes this helper draws.

getProgram ​

Get the shader program this helper draws with.

getShaderSourceTime ​

Get the time object tracking when the shader sources were last rebuilt.

getVAO ​

Get the vertex array object.

haveWideLines ​

Whether the lines must be emulated with instanced quads because the hardware does not support the requested line width.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer being drawn.
actorvtkActorYesThe actor being drawn.

newInstance ​

Method used to create a new instance of vtkOpenGLHelper.

ArgumentTypeRequiredDescription
initialValuesIOpenGLHelperInitialValuesNofor pre-setting some of its content

releaseGraphicsResources ​

Release the vertex array object and the buffers.

releasePolyDataMapperResources ​

Release the shared resources of a polydata mapper and invalidate its buffers.

replaceShaderPositionVC ​

Add the point size and, for wide lines, the line widening code to the vertex shader.

ArgumentTypeRequiredDescription
shadersIShaderSourcesYesThe shader sources to substitute into.
renvtkRendererYesThe renderer being drawn.
actorvtkActorYesThe actor being drawn.

setAttributeUpdateTime ​

Set the time object tracking when the attributes were last bound.

ArgumentTypeRequiredDescription
attributeUpdateTimeYesThe time object.

setCABO ​

Set the cell array buffer object holding the packed vertices.

ArgumentTypeRequiredDescription
CABOYesThe cell array buffer object.

setMapperShaderParameters ​

Set the wide line and point size uniforms.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer being drawn.
actorvtkActorYesThe actor being drawn.
sizeITiledSizeAndOriginYesThe pixel extent of the viewport.

setOpenGLRenderWindow ​

Attach this helper, its vertex array object and its buffers to an OpenGL render window.

ArgumentTypeRequiredDescription
winYesThe OpenGL render window.

setPointPicking ​

Set whether the helper draws points for hardware point picking.

ArgumentTypeRequiredDescription
pointPickingYesThe point picking flag.

setPrimitiveType ​

Set which of the primTypes this helper draws.

ArgumentTypeRequiredDescription
primitiveTypeYesThe primitive type.

setProgram ​

Set the shader program this helper draws with.

ArgumentTypeRequiredDescription
programYesThe shader program.

setShaderSourceTime ​

Set the time object tracking when the shader sources were last rebuilt.

ArgumentTypeRequiredDescription
shaderSourceTimeYesThe time object.

setVAO ​

Set the vertex array object.

ArgumentTypeRequiredDescription
VAOYesThe vertex array object.

updateShaders ​

Rebuild the program if needed, bind it and let the mapper set its uniforms.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer being drawn.
actorvtkActorYesThe actor being drawn.
oglMapperYesThe OpenGL mapper driving this helper.