| 341 | } |
| 342 | |
| 343 | void 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. |
| 360 | void vtkOSOpenGLRenderWindow::WindowInitialize() |
no test coverage detected