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

Method SetContext

Rendering/OpenGL2/vtkOpenGLFramebufferObject.cxx:380–403  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

378
379//------------------------------------------------------------------------------
380void vtkOpenGLFramebufferObject::SetContext(vtkRenderWindow* rw)
381{
382 vtkOpenGLRenderWindow* renWin = static_cast<vtkOpenGLRenderWindow*>(rw);
383
384 // avoid pointless re-assignment
385 if (this->Context == renWin)
386 {
387 return;
388 }
389
390 // all done if assigned null
391 if (!renWin)
392 {
393 return;
394 }
395 // check for support
396 if (!vtkOpenGLFramebufferObject::LoadRequiredExtensions(renWin))
397 {
398 vtkErrorMacro("Context does not support the required extensions");
399 return;
400 }
401 // initialize
402 this->Context = renWin;
403}
404
405//------------------------------------------------------------------------------
406vtkOpenGLRenderWindow* vtkOpenGLFramebufferObject::GetContext()

Callers 3

AddDepthAttachmentMethod · 0.45
DownloadMethod · 0.45
PopulateFramebufferMethod · 0.45

Calls 1

LoadRequiredExtensionsFunction · 0.85

Tested by

no test coverage detected