File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Examples/Rendering/Actor2D
Sources/Rendering/OpenGL/PolyDataMapper2D Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -141,5 +141,8 @@ resolutionChange.addEventListener('input', (e) => {
141
141
global . source = coneSource ;
142
142
global . mapper = mapper ;
143
143
global . actor = actor ;
144
+ global . sphereSource = sphereSource ;
145
+ global . mapper2D = mapper2D ;
146
+ global . actor2D = actor2D ;
144
147
global . renderer = renderer ;
145
148
global . renderWindow = renderWindow ;
Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ function vtkOpenGLPolyDataMapper2D(publicAPI, model) {
164
164
const vmtime = model . VBOBuildTime . getMTime ( ) ;
165
165
if (
166
166
vmtime < publicAPI . getMTime ( ) ||
167
+ vmtime < model . _openGLRenderWindow . getMTime ( ) ||
167
168
vmtime < model . renderable . getMTime ( ) ||
168
169
vmtime < actor . getMTime ( ) ||
169
170
vmtime < model . currentInput . getMTime ( ) ||
@@ -209,11 +210,14 @@ function vtkOpenGLPolyDataMapper2D(publicAPI, model) {
209
210
210
211
const transformCoordinate = model . renderable . getTransformCoordinate ( ) ;
211
212
213
+ const view = ren . getRenderWindow ( ) . getViews ( ) [ 0 ] ;
214
+ const vsize = view . getViewportSize ( ren ) ;
212
215
const toString =
213
216
`${ poly . getMTime ( ) } A${ representation } B${ poly . getMTime ( ) } ` +
214
217
`C${ c ? c . getMTime ( ) : 1 } ` +
215
218
`D${ tcoords ? tcoords . getMTime ( ) : 1 } ` +
216
- `E${ transformCoordinate ? ren . getMTime ( ) : 1 } ` ;
219
+ `E${ transformCoordinate ? ren . getMTime ( ) : 1 } ` +
220
+ `F${ vsize } ` ;
217
221
if ( model . VBOBuildString !== toString ) {
218
222
// Build the VBOs
219
223
let points = poly . getPoints ( ) ;
You can’t perform that action at this time.
0 commit comments