Can you please explain what context sharing then means? I recently faced a similar bug in my code when trying to implement context sharing between a hidden window and other visible windows, and I found that I have to bind the texture/shader again after the new (visible) window calls glfwMakeContextCurrent.
If two windows share the context, shouldn’t glfwMakeContextCurrent be a no-op? add placeholder entries for fontRenderer/lineShader init in editorInit · printfdebugging/roots@93fb4c9 · GitHub is the commit where I faced this issue in my code..
Welcome to the GLFW Discourse. I’ve moved your post to a new thread as the question is not directly related to the thread you posted on.
Context object sharing is described in the OpenGL spec in Chapter 5.
The GLFW specifics are in this section of our documentation.
Basically you are sharing OpenGL objects between two contexts, rather than sharing contexts. Thus you still need to make each context current, but now you can use the OpenGL objects you have created in both contexts - note that certain objects such as Vertex Array Objects are container objects of other objects and are not shared. See the above OpenGL spec in Chapter 2.6 for more details.
I see, thanks for sharing that, I wasn’t aware of the “only objects are shared” thing. I will read the chapter you shared (and then the GLFW docs, again) and will ask if I don’t understand anything… Thanks
.