# How to make shared gl context debuggable?

**URL:** https://discourse.libcinder.org/t/how-to-make-shared-gl-context-debuggable/2107
**Category:** Uncategorized
**Created:** [July 13, 2024, 8:04am UTC](https://discourse.libcinder.org/t/how-to-make-shared-gl-context-debuggable/2107 "2024-07-13T08:04:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Stefan\_Monov](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/stefan_monov/32/476_2.png) [@Stefan\_Monov](https://discourse.libcinder.org/u/Stefan_Monov)
#### Post date: [July 13, 2024, 8:04am UTC](https://discourse.libcinder.org/t/how-to-make-shared-gl-context-debuggable/2107/1 "2024-07-13T08:04:05Z")

</div>

In my main thread, I’ve told cinder to give me a debug context (via RendererGl::debug()) and this works. But when I create a new shared context for my worker thread (`auto backgroundGlCtx = gl::Context::create(gl::context());`), I get a non-debug context.

I verified the above 2 statements via:

```auto
GLint isDebug;
glGetIntegerv(GL_CONTEXT_FLAGS, &isDebug);
cout << "isDebug" << (isDebug & GL_CONTEXT_FLAG_DEBUG_BIT) << endl;

```

Any idea how to fix this?
