Commit 49802a3d authored by Eloi Gaudry's avatar Eloi Gaudry
Browse files

Offscreen rendering segfault [ Win32/OpenGL ]

Attempt to fix the segfault occuring after using offscreen rendering
on Windows using the OpenGL backend.
parent c7023e50
......@@ -155,6 +155,7 @@ void vtkWin32OpenGLRenderWindow::CleanUpRenderers()
(ren = this->Renderers->GetNextRenderer(rsit));)
{
ren->SetRenderWindow(NULL);
ren->SetRenderWindow(this);
}
}
......@@ -1528,14 +1529,7 @@ void vtkWin32OpenGLRenderWindow::CreateOffScreenDC(HBITMAP hbmp, HDC aHdc)
GetObject(hbmp, sizeof(BITMAP), &bm);
// Renderers will need to redraw anything cached in display lists
vtkRenderer *ren;
vtkCollectionSimpleIterator rsit;
this->Renderers->InitTraversal(rsit);
while ((ren = this->Renderers->GetNextRenderer(rsit)))
{
ren->SetRenderWindow(NULL);
ren->SetRenderWindow(this);
}
this->CleanUpRenderers();
this->MemoryBuffer = hbmp;
......@@ -1639,15 +1633,7 @@ void vtkWin32OpenGLRenderWindow::ResumeScreenRendering(void)
if (this->ContextId!=0)
{
this->MakeCurrent();
// Renderers will need to redraw anything cached in display lists
vtkRenderer *ren;
vtkCollectionSimpleIterator rsit;
this->Renderers->InitTraversal(rsit);
while ((ren = this->Renderers->GetNextRenderer(rsit)))
{
ren->SetRenderWindow(NULL);
ren->SetRenderWindow(this);
}
this->CleanUpRenderers();
}
if (this->MemoryBuffer)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment