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

Method MakeCurrent

Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:1227–1246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1225// }}
1226
1227void vtkXOpenGLRenderWindow::MakeCurrent()
1228{
1229 // load GLX
1230 if (!this->EnsureGLX())
1231 {
1232 return;
1233 }
1234 // when debugging XErrors uncomment the following lines
1235 // if (this->DisplayId)
1236 // {
1237 // vtkXSynchronize(this->DisplayId,1);
1238 // }
1239 // vtkXSetErrorHandler(vtkXError);
1240 if (this->Internal->ContextId &&
1241 ((this->Internal->ContextId != glXGetCurrentContext()) || this->ForceMakeCurrent))
1242 {
1243 glXMakeCurrent(this->DisplayId, this->WindowId, this->Internal->ContextId);
1244 this->ForceMakeCurrent = 0;
1245 }
1246}
1247
1248void vtkXOpenGLRenderWindow::ReleaseCurrent()
1249{

Callers 5

FrameMethod · 0.95
DestroyWindowMethod · 0.95
WindowInitializeMethod · 0.95
PushContextMethod · 0.95
IsDirectMethod · 0.95

Calls 1

EnsureGLXMethod · 0.95

Tested by

no test coverage detected