Skip to content

TextureUnitManager ​

Methods ​

allocate ​

Reserve the first free texture unit.

Returns ​

TypeDescription
numberThe unit number, or -1 when none is free.

allocateUnit ​

Reserve a specific texture unit.

ArgumentTypeRequiredDescription
unitYesThe unit to reserve.

Returns ​

TypeDescription
numberThe unit number, or -1 when it was already allocated.

deleteTable ​

Drop the allocation table, reporting any unit that was not released.

extend ​

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

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

free ​

Release a texture unit.

ArgumentTypeRequiredDescription
valYesThe unit to release.

freeAll ​

Release every texture unit.

getContext ​

Get the WebGL context.

getNumberOfTextureUnits ​

Get the number of texture units the context exposes.

isAllocated ​

Whether the given texture unit is allocated.

ArgumentTypeRequiredDescription
textureUnitIdYesThe unit to test.

newInstance ​

Method used to create a new instance of vtkOpenGLTextureUnitManager.

ArgumentTypeRequiredDescription
initialValuesIOpenGLTextureUnitManagerInitialValuesNofor pre-setting some of its content

setContext ​

Set the WebGL context and size the allocation table from MAX_TEXTURE_IMAGE_UNITS.

ArgumentTypeRequiredDescription
contextYesThe WebGL context.