<DIV>
<DIV>Hello,</DIV>
<DIV>I have updated my vtkWin32OpenGLRenderWindow (lines where not the same at all). My app doesn't crash anymore but I have a VTK error instead :</DIV>
<DIV> </DIV>
<DIV>wglMakeCurrent failed in MakeCurrent(), error: Invalid descriptor</DIV>
<DIV>wglMakeCurrent failed in Clean(), error: 6</DIV>
<DIV> </DIV>
<DIV>Here is the location :</DIV>
<DIV> </DIV>
<DIV>void vtkWin32OpenGLRenderWindow::MakeCurrent()<BR>{<BR> // Try to avoid doing anything (for performance).<BR> HGLRC current = wglGetCurrentContext();<BR> if (this->ContextId != current)<BR> {<BR> if(this->IsPicking && current)<BR> {<BR> vtkErrorMacro("Attempting to call MakeCurrent for a different window"<BR> " than the one doing the picking, this can causes crashes"<BR> " and/or bad pick results");<BR> }<BR> else<BR> {<BR> if (wglMakeCurrent(this->DeviceContext, this->ContextId) !=
TRUE)<BR> {<BR> LPVOID lpMsgBuf;<BR> ::FormatMessage(<BR> FORMAT_MESSAGE_ALLOCATE_BUFFER |<BR> FORMAT_MESSAGE_FROM_SYSTEM |<BR> FORMAT_MESSAGE_IGNORE_INSERTS,<BR> NULL,<BR> GetLastError(),<BR> MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language<BR> (LPTSTR) &lpMsgBuf,<BR> 0,<BR> NULL<BR>
);<BR> vtkErrorMacro("wglMakeCurrent failed in MakeCurrent(), error: "<BR> << (LPCTSTR)lpMsgBuf);<BR> ::LocalFree( lpMsgBuf );<BR> }<BR> }<BR> }<BR>}<BR></DIV>
<DIV> </DIV>
<DIV>called in vtkWin32OpenGLRenderWindow::Clean()</DIV>
<DIV> </DIV>
<DIV> if (wglMakeCurrent(NULL, NULL) != TRUE)<BR> {<BR> vtkErrorMacro("wglMakeCurrent failed in Clean(), error: " << GetLastError());<BR> }<BR></DIV><BR><BR><B><I>Mathieu Malaterre <mathieu.malaterre@kitware.com></I></B> wrote:
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Aurélien,<BR><BR>You shouldn't be doing something particular for Windows. I recently <BR>commited a patch for that -or I believe so-. Could you do me a favor, <BR>could you please try it instead of the<BR><BR>'self.renderer.GetProps().RemoveAllItems()'<BR><BR>Go to that web page, it works just like a patch :<BR><BR>http://vtk.org/cgi-bin/cvsweb.cgi/VTK/Rendering/vtkWin32OpenGLRenderWindow.cxx.diff?r1=1.121&r2=1.122<BR><BR>And just apply the same modification to your local VTK build tree. (you <BR>don't need a particular revision of vtkWin32OpenGLRenderWindow.cxx).<BR><BR>Thanks a bunch<BR>Mathieu<BR><BR></BLOCKQUOTE></DIV><p><br><hr size=1><font face=arial size=-1>Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !<br>
<a href=http://fr.mail.yahoo.com>Testez le nouveau Yahoo! Mail</a></font>