Commit acf25de6 authored by Ken Martin's avatar Ken Martin
Browse files

amother make current fix

parent f759b1f7
......@@ -38,7 +38,7 @@ PURPOSE. See the above copyright notice for more information.
#include <GL/gl.h>
#endif
vtkCxxRevisionMacro(vtkWin32OpenGLRenderWindow, "1.111");
vtkCxxRevisionMacro(vtkWin32OpenGLRenderWindow, "1.112");
vtkStandardNewMacro(vtkWin32OpenGLRenderWindow);
#define VTK_MAX_LIGHTS 8
......@@ -199,9 +199,10 @@ int vtkWin32OpenGLRenderWindow::GetEventPending()
void vtkWin32OpenGLRenderWindow::MakeCurrent()
{
// Try to avoid doing anything (for performance).
if (this->ContextId != wglGetCurrentContext())
HGLRC current = wglGetCurrentContext();
if (this->ContextId != current)
{
if(this->IsPickingOn)
if(this->IsPicking && current)
{
vtkErrorMacro("Attempting to call MakeCurrent for a different window"
" than the one doing the picking, this can causes crashes"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment