[vtkusers] A bug in vtkWin32OpenGLRenderWindow

wwyang wwyang at cad.zju.edu.cn
Fri Jul 14 02:12:36 EDT 2006

In a MFC project, I build a mfc view with opengl support and attach the created opengl render dc to m_pRenWnd which pointers to an instance of vtkWin32OpenGLRenderWindow.

Based on o-o programming principle, i want to delete this opengl render dc in the class of mfc view rather than the class of vtkWin32OpenGLRenderWindow, so i do it as follows:
because if we do not set contexID to 0, the attached opengl render dc will be deleted by vtkWin32OpenGLRenderWindow.

Then error occurs in m_pRenWnd->Delete() because some invoked sub-procedure in it will fail if the contexID is 0, and windows will give a prompt dlg, say something like"Debug error, R6025 pure virtual function call".

So in current program, i have to retain the opengl render dc to vtkWin32OpenGLRenderWindow and leave the opengl render dc not being deleted by its creation class"mfc view", which makes me feel some sense of "not clean".

Is there any need to fix it?



More information about the vtkusers mailing list