title: GLUT window turns black "(not responding)" when CPU is busy
body: <p>I'm programming a raytracer and use GLUT to display the result. I render the the image in subblocks and after rendering each subblock i update the view.</p>
  
  <p>What happens is that i see the render progress, but after some seconds, the render window turns black and the window caption reads "(not responding)". the renderprocess however continues to run (at 100% cpu usage) and outputs progressinfo on the console output. once the rendering is finished, the GLUT window turns back to normal and displays the image.</p>
  
  <p>What can I do in order to keep the window responding during the rendering process so that it doesn't turn black?</p>
  
  <p>Thanks!</p>
  
  <p>//edit: I aparently block my mainthread while waiting for the render threads:</p>
  
  <pre><code>while(true){
      if(m_activeRenderThreads==0)
          break;
      ::WaitForSingleObject(updateEvent-&gt;m_hObject, 200);
      notifyObservers(); //inherited from IFunctionObservable
  }
  </code></pre>
  
  <p>notifyObservers() calls:</p>
  
  <pre><code>update(){
      glClear(GL_COLOR_BUFFER_BIT);
      glViewport(0,0,resX,resY);
      glRasterPos2i(-1,-1);
      glDrawPixels(resX, resY, GL_RGB, GL_FLOAT, renderBuffer);
      glutSwapBuffers();
  }
  </code></pre>
  
  <p>this last function works only if I call it from the mainthread. calling it through the renderthreads doesn't update my window</p>