diff --git a/Sources/Rendering/Core/Glyph3DMapper/example/index.js b/Sources/Rendering/Core/Glyph3DMapper/example/index.js index 294fde11b65..c14c02f09c3 100644 --- a/Sources/Rendering/Core/Glyph3DMapper/example/index.js +++ b/Sources/Rendering/Core/Glyph3DMapper/example/index.js @@ -62,6 +62,7 @@ simpleFilter.setFormula({ press[(i * 3) + 2] = (((coords[3 * i] - 0.5) * (coords[3 * i] - 0.5)) + ((coords[(3 * i) + 1] - 0.5) * (coords[(3 * i) + 1] - 0.5)) + 0.125) * 0.1; temp[i] = coords[(3 * i) + 1] * 0.1; } + // Mark the output vtkDataArray as modified arraysOut.forEach(x => x.modified()); }, diff --git a/Sources/Rendering/Core/Glyph3DMapper/index.js b/Sources/Rendering/Core/Glyph3DMapper/index.js index 11ab72dbe57..079ccf05d23 100644 --- a/Sources/Rendering/Core/Glyph3DMapper/index.js +++ b/Sources/Rendering/Core/Glyph3DMapper/index.js @@ -256,7 +256,7 @@ function vtkGlyph3DMapper(publicAPI, model) { model.colorArray = null; const lut = publicAPI.getLookupTable(); - if (lut) { + if (lut && scalars) { // Ensure that the lookup table is built lut.build(); model.colorArray = lut.mapScalars(scalars, model.colorMode, 0); diff --git a/Sources/Rendering/OpenGL/Glyph3DMapper/index.js b/Sources/Rendering/OpenGL/Glyph3DMapper/index.js index 0fcfb149276..f8e94555f0f 100644 --- a/Sources/Rendering/OpenGL/Glyph3DMapper/index.js +++ b/Sources/Rendering/OpenGL/Glyph3DMapper/index.js @@ -436,7 +436,11 @@ function vtkOpenGLGlyph3DMapper(publicAPI, model) { if (model.renderable.getBuildTime().getMTime() > model.glyphBOBuildTime.getMTime()) { model.matrixBuffer.upload(garray, ObjectType.ARRAY_BUFFER); model.normalBuffer.upload(narray, ObjectType.ARRAY_BUFFER); - model.colorBuffer.upload(carray.getData(), ObjectType.ARRAY_BUFFER); + if (carray) { + model.colorBuffer.upload(carray.getData(), ObjectType.ARRAY_BUFFER); + } else { + model.colorBuffer.releaseGraphicResources(); + } model.glyphBOBuildTime.modified(); } }