Multiple windows / GL context sharing


can someone help me with application in which I would like to draw objects from the same OpenGL context (let’s say 1 texture) in multiple windows (6) ?FYI I use dual NVidia video cards to have enough outputs on 1 computer.

I already tried to achieve that creating a single window taking the full outputs area and managing the rendering using viewport but I still have a black “glitch” appearing on my render and I hope to make it disappear rendering each output independently (the fact that window is overlapping the 2 video cards render areas could be the cause of this glitch ?) .

I can create 6 windows and a shared GL context but only one of the additionnal window can render, the other stays not rendered (even not cleared !). Should I create a shared context for each window ? Or can I use my shared context for all ?

Hope you can help, Regards

Hi, I need some help, always with the same kind of stuff.
I need to render the same scene in 6 different windows using a different GL configuration but sharing the same objects (VBO/FBO…). I tried creating 1 gl context per window (using context sharing flag) but it does not achieve the job ! Eventually I use the same shared context on all the windows but only 2/6 are rendered.

I tried

  • render & swap in each window but after 2 windows it is stucked in the loop making the app unusable.
  • render in each window and then (when redering is done on all) loop on each window to swap : this method is only swapping the last window but it is running.

Any clue about that ?

did you try reloading your textures for each window? see