[vtkusers] Bug in vtkDataArray.cxx; was: Bug in vtkWin32OpenGLRenderWindow when using own Interactor and windowhandle

Sander Niemeijer niemeijer at science-and-technology.nl
Wed Mar 20 06:10:09 EST 2002


Roland,

On woensdag, maart 20, 2002, at 11:23 , Roland Schwarz wrote:

>> This MFCHandledWindow parameter makes things indeed more complicated.
>> But regretfully your suggestion would not work. If MFCHandledWindow
>> would be true, than the ren->SetRenderWindow(NULL) in the clean routine
>> still wouldn't be called, which was my initial concern.
>>
>
> Hmmm,
> this is what I had in mind. But I am not really sure what the
> MFCHandledWindow is meant for.
>
> As far as I understand, once you have set the DC of the RenderWindow
> manually, you signal that you take responibility for all the things like
> creating a opengl context and the like. (WindowInitialize resp. 
> Initialize
> will not do this for you any more in this case.)
>
> Therefore it seems logically to me that the RenderWindow should keep 
> hands
> off this resources when destroying the window.

Except for the fact that we are in the RenderWindow destructor, which 
means we are destroying the RenderWindow while the Win32 window may stay 
alive. The  ren->SetRenderWindow(NULL) should ALLWAYS be called when the 
RenderWindow gets destroyed.

> I think the vtkWin32OpenGLRenderWindow is a VERY clever implementation.

I totally agree!

Regards,
Sander Niemeijer




More information about the vtkusers mailing list