File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Sources/Rendering/OpenGL/PixelSpaceCallbackMapper Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ function vtkOpenGLPixelSpaceCallbackMapper(publicAPI, model) {
14
14
15
15
publicAPI . opaquePass = ( prepass , renderPass ) => {
16
16
model . openGLRenderer = publicAPI . getFirstAncestorOfType ( 'vtkOpenGLRenderer' ) ;
17
+ model . openGLRenderWindow = model . openGLRenderer . getParent ( ) ;
17
18
const aspectRatio = model . openGLRenderer . getAspectRatio ( ) ;
18
19
const camera = model . openGLRenderer ? model . openGLRenderer . getRenderable ( ) . getActiveCamera ( ) : null ;
19
20
const tsize = model . openGLRenderer . getTiledSizeAndOrigin ( ) ;
@@ -24,7 +25,7 @@ function vtkOpenGLPixelSpaceCallbackMapper(publicAPI, model) {
24
25
const width = Math . floor ( zbt . getWidth ( ) ) ;
25
26
const height = Math . floor ( zbt . getHeight ( ) ) ;
26
27
27
- const gl = zbt . getContext ( ) ;
28
+ const gl = model . openGLRenderWindow . getContext ( ) ;
28
29
zbt . bind ( ) ;
29
30
30
31
// Here we need to use vtkFramebuffer to save current settings (bindings/buffers)
@@ -51,7 +52,6 @@ function vtkOpenGLPixelSpaceCallbackMapper(publicAPI, model) {
51
52
fb . restorePreviousBindingsAndBuffers ( ) ;
52
53
}
53
54
54
- zbt . unBind ( ) ;
55
55
gl . deleteFramebuffer ( framebuffer ) ;
56
56
}
57
57
You can’t perform that action at this time.
0 commit comments