Using OpenGL & Multithreading under Windows Vista

The use-case if the following:

  1. We create a thread which renders an image using OpenGL. There are no visible artifacts during window resizing.
  2. We switch the rendering mode, OpenGL thread is completely deleted and render with Win GDI.
  3. We switch back to OpenGL rendering, creating a new thread and a new OpenGL context.
  4. We resize window, and artifacts appear. The client area moves out of the correct limits though HWND, passed to OpenGL renderer still has correct client area coordinates.
    There is no actual OpenGL rendering simultaneously from several threads.
    After first OpenGL rendering:
    After second OpenGL rendering:
    There is no such a problem under Windows XP.
    Does anyone has any idea what this could be linked with?

Maybe it is a different OpenGL renderer, have you checked the PixelFormat? Are they the same?

To me it looks like you forgot to adjust viewport size. OpenGL host control on second shot is bigger than viewport in same shot, and viewports are exactly same size on both shots.

Its a common error to catch size events and update viewport (glViewPort), but at that time there is no active gl contexts.