MCPcopy Create free account
hub / github.com/Kitware/VTK / ResizeOffScreenWindow

Method ResizeOffScreenWindow

Rendering/OpenGL2/vtkOSOpenGLRenderWindow.cxx:343–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343void vtkOSOpenGLRenderWindow::ResizeOffScreenWindow(int width, int height)
344{
345 auto& internal = (*this->Internal);
346 if (internal.OffScreenContextId)
347 {
348 // in past, we used to destroy the context and recreate one on resize. this
349 // is totally unnecessary; we just recreate the buffer and make it current.
350 vtkOSMesaDestroyWindow(internal.OffScreenWindow);
351 internal.OffScreenWindow = vtkOSMesaCreateWindow(width, height);
352
353 // Call MakeCurrent to ensure that we're no longer using the old memory
354 // buffer.
355 this->MakeCurrent();
356 }
357}
358
359// Initialize the window for rendering.
360void vtkOSOpenGLRenderWindow::WindowInitialize()

Callers 1

SetSizeMethod · 0.95

Calls 3

MakeCurrentMethod · 0.95
vtkOSMesaDestroyWindowFunction · 0.85
vtkOSMesaCreateWindowFunction · 0.85

Tested by

no test coverage detected