|
(0000581)
|
|
Mathieu Malaterre
|
|
2004-01-28 14:23
|
|
Ok this error was also reproducible on python:
http://vtk.org/pipermail/vtkusers/2004-January/021857.html [^]
ello,
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 :
wglMakeCurrent failed in MakeCurrent(), error: Invalid descriptor
wglMakeCurrent failed in Clean(), error: 6
Here is the location :
void vtkWin32OpenGLRenderWindow::MakeCurrent()
{
// Try to avoid doing anything (for performance).
HGLRC current = wglGetCurrentContext();
if (this->ContextId != current)
{
if(this->IsPicking && current)
{
vtkErrorMacro(\"Attempting to call MakeCurrent for a different window\"
\" than the one doing the picking, this can causes crashes\"
\" and/or bad pick results\");
}
else
{
if (wglMakeCurrent(this->DeviceContext, this->ContextId) != TRUE)
{
LPVOID lpMsgBuf;
::FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
vtkErrorMacro(\"wglMakeCurrent failed in MakeCurrent(), error: \"
<< (LPCTSTR)lpMsgBuf);
::LocalFree( lpMsgBuf );
}
}
}
}
called in vtkWin32OpenGLRenderWindow::Clean()
if (wglMakeCurrent(NULL, NULL) != TRUE)
{
vtkErrorMacro(\"wglMakeCurrent failed in Clean(), error: \" << GetLastError());
}
|
|