AW: [vtkusers] Bug in SetRenderWindow(NULL) ?!
de Boer Ingo
I.deBoer at polytec.de
Tue Oct 21 11:04:58 EDT 2003
Hi,
I traced more into VTK and found out that
> pvtkWin32OpenGLRW->SetParentId(::GetParent(m_hWnd));
> pvtkWin32OpenGLRW->SetWindowId(m_hWnd);
is needed, because otherwise [case: pvtkWin32OpenGLRW->SetParentId(m_hWnd)]
Messages are not really parsed to the parent, which is needed ofcourse...
When using this in the end (which is needed when using SetParentId
and SetWindowId)
> if (pvtkRenderer) pvtkRenderer->SetRenderWindow(NULL);
one gets memory leaks...
This is because the destructor in vtkWin32OpenGLRenderWindow has
Line84: if (this->WindowId && this->OwnWindow)
BUT OwnWindow is 0, so there is no cleaning up and no freeing the
memory... When you remove this->OwnWindow to
Line84: if (this->WindowId)
the memory is free, but you get the error
"wglMakeCurrent failed in MakeCurrent()"
in vtkWin32OpenGLRenderWindow::MakeCurrent()
So, I guess there is definitly a bug in there. But I haven't found it
yet...
greets
Ingo
---
Dr.-Ing. Ingo H. de Boer
Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax : ++49 7243 604 255
More information about the vtkusers
mailing list