# Can you please explain what context sharing then means?

**URL:** https://discourse.glfw.org/t/can-you-please-explain-what-context-sharing-then-means/3023
**Category:** support
**Created:** [September 6, 2026, 3:02pm UTC](https://discourse.glfw.org/t/can-you-please-explain-what-context-sharing-then-means/3023 "2026-09-06T15:02:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![printfdebugging](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/printfdebugging/32/1089_2.png) [@printfdebugging](https://discourse.glfw.org/u/printfdebugging)
#### Post date: [September 6, 2026, 3:02pm UTC](https://discourse.glfw.org/t/can-you-please-explain-what-context-sharing-then-means/3023/1 "2026-09-06T15:02:48Z")

</div>

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](https://github.com/printfdebugging/roots/commit/93fb4c951ad37a6c6487651ab30fb7df3ace3452) is the commit where I faced this issue in my code..

---

<div class="post-metadata">

### Author: ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)
#### Post date: [September 6, 2026, 6:16pm UTC](https://discourse.glfw.org/t/can-you-please-explain-what-context-sharing-then-means/3023/2 "2026-09-06T18:16:50Z")

</div>

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](https://registry.khronos.org/OpenGL/specs/gl/glspec46.core.pdf).

The [GLFW specifics are in this section of our documentation](https://www.glfw.org/docs/latest/context_guide.html#context_sharing).

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.

---

<div class="post-metadata">

### Author: ![printfdebugging](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/printfdebugging/32/1089_2.png) [@printfdebugging](https://discourse.glfw.org/u/printfdebugging)
#### Post date: [September 6, 2026, 6:23pm UTC](https://discourse.glfw.org/t/can-you-please-explain-what-context-sharing-then-means/3023/3 "2026-09-06T18:23:28Z")

</div>

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 🙂.
