# Example of GLMakie sharing GLFW/OpenGL context (for example with CImGui)?

**URL:** <https://discourse.julialang.org/t/example-of-glmakie-sharing-glfw-opengl-context-for-example-with-cimgui/114108>\
**Category:** General Usage\
**Tags:** plotting, makie, glmakie\
**Created:** [May 10, 2024, 2:10pm UTC](https://discourse.julialang.org/t/example-of-glmakie-sharing-glfw-opengl-context-for-example-with-cimgui/114108 "2024-05-10T14:10:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benoit9](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benoit9/32/690_2.png) [@Benoit9](https://discourse.julialang.org/u/Benoit9)\
**Post date:** [May 10, 2024, 2:10pm UTC](https://discourse.julialang.org/t/example-of-glmakie-sharing-glfw-opengl-context-for-example-with-cimgui/114108/1 "2024-05-10T14:10:59Z")

</div>

I found an example from 2020 in this thread [Is it possible to use Makie in CImGui?](https://discourse.julialang.org/t/is-it-possible-to-use-makie-in-cimgui/45844) here: [Modification of Gnimuc's example: https://gist.github.com/Gnimuc/5a1e4942784cfc3558e2ee50b7bee84d · GitHub](https://gist.github.com/SteffenPL/88f65222bf786a6434bc2da3ae02ac74)

But Makie has changed quite a bit since then. Is there a more recent example? I searched Discourse and Github with no luck.

More specfically, what has replaced:  
`GLMakie.global_gl_screen()`  
and  
`AbstractPlotting.backend_display(GLMakie.GLBackend(), scene)`  
and  
`set_window_config` (is it GLMakie.activate! ?)

Any pointer would be appreciated! Thanks!

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [May 10, 2024, 10:52pm UTC](https://discourse.julialang.org/t/example-of-glmakie-sharing-glfw-opengl-context-for-example-with-cimgui/114108/2 "2024-05-10T22:52:29Z")

</div>

For the last two, it is:

```julia
new_screen = display(scene, backend = GLMakie)
GLMakie.activate!(; config_kwargs...)

```

You may want to look at MousetrapMakie.jl or GtkMakie.jl to see what they’re doing!

---

<div class="post-metadata">

**Author:** ![Benoit9](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benoit9/32/690_2.png) [@Benoit9](https://discourse.julialang.org/u/Benoit9)\
**Post date:** [May 11, 2024, 5:33am UTC](https://discourse.julialang.org/t/example-of-glmakie-sharing-glfw-opengl-context-for-example-with-cimgui/114108/3 "2024-05-11T05:33:05Z")

</div>

Thanks! I did not know about Moustrap. I will have a look.

---

<div class="post-metadata">

**Author:** ![Benoit9](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benoit9/32/690_2.png) [@Benoit9](https://discourse.julialang.org/u/Benoit9)\
**Post date:** [May 11, 2024, 2:06pm UTC](https://discourse.julialang.org/t/example-of-glmakie-sharing-glfw-opengl-context-for-example-with-cimgui/114108/4 "2024-05-11T14:06:05Z")

</div>

Unfortunately, I can’t translate what MoustrapMakie does to CImGui and the initialization of the backends. The latter seem much lower level. I’ll try opening an issue on CImGui.jl
