Hello! It seems as though information on the net is limited about using multiple contexts/multiple windows. What I’m trying to do is use two contexts to draw scenes to different windows, I think I’m not totally clear on what OpenGL calls are affected by which context is made current. This is the pseudo-code of how I thought it should go:
Make Current Window 1
Generate VAO 1
Bind VAO 1
Generate VBO 1 for vertices
Bind VBO 1
Buffer VBO 1
Generate VBO 2 for uvs
Bind VBO 2
Buffer VBO 2
Make Current Window 2
Generate VAO 2
Bind VAO 2
Generate VBO 3 for vertices
Bind VBO 3
Buffer VBO 3
Generate VBO 4 for uvs
Bind VBO 4
Buffer VBO 4
Do shader stuff which gets shared
While True
Make Current Window 1
Clear
Bind VAO 1
Bind VBO 1
VertexAttribPointer VBO 1
Bind VBO 2
VertexAttribPointer VBO 2
glDrawArrays
Make Current Window 2
Clear
Bind VAO 2
Bind VBO 3
VertexAttribPointer VBO 3
Bind VBO 4
VertexAttribPointer VBO 4
glDrawArrays
Loop
But I end up only seeing drawing on one of two windows, if I reverse the order at the top so that the other window is made current at the beginning, then I see drawing on that window. Am I missing something being shared or not shared?