Skip to content

Commit

Permalink
fix(OpenGL/ImageMapper): Reset texture format for pwf
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Aug 10, 2020
1 parent 65b81ec commit d6c2fa8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/Rendering/OpenGL/ImageMapper/index.js
Expand Up @@ -716,6 +716,8 @@ function vtkOpenGLImageMapper(publicAPI, model) {
const pwfSize = pwfWidth * textureHeight;
const pwfTable = new Uint8Array(pwfSize);
let pwfun = actorProperty.getPiecewiseFunction();
// support case where pwfun is added/removed
model.pwfTexture.resetFormatAndType();
if (pwfun) {
const pwfFloatTable = new Float32Array(pwfSize);
const tmpTable = new Float32Array(pwfWidth);
Expand Down

0 comments on commit d6c2fa8

Please sign in to comment.