Multiple OpenGL contexts, multiple windows, multithreading, and vsync

后端 未结 2 1314
一生所求
一生所求 2021-01-30 14:37

I am creating a graphical user interface application using OpenGL in which there can be any number of windows - \"multi-document interface\" style.

If there were one win

2条回答
  •  忘掉有多难
    2021-01-30 15:22

    thanks @andrewrk for all theses research, i personnaly do like that :

    Create first window and his opengl context with double buffer. Active vsync on this window (swapinterval 1)

    Create others windows and attach first context with double buffer. Disable vsync on theses others window (swapinterval 0)

    For each frame For invert each window (the one with vsync enable at the end). wglMakeCurrent(hdc, commonContext);
    draw. SwapBuffer

    In that manner, i achieve the vsync and all window are based on this same vsync.

    But i encoutered problem without aero : tearing...

提交回复
热议问题