Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-31 20:56:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-01 01:30:36 +0300
commit058d29ed9a3e971049c0d9d99f1cf571bfb0efae (patch)
tree04e045feec7bd75728b4e3f49bd978ad5b0e1596 /source/blender/windowmanager
parent13b0a697a07e84abe5a62168ba75f38d325d3f22 (diff)
GHOST: Enable debug context on offscreen context too
This was a long standing TODO. This was also preventing debug callbacks form other context than the main window.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 04d5aeb337d..0e19f79e659 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -2485,7 +2485,12 @@ void *WM_opengl_context_create(void)
*/
BLI_assert(BLI_thread_is_main());
BLI_assert(GPU_framebuffer_active_get() == GPU_framebuffer_back_get());
- return GHOST_CreateOpenGLContext(g_system);
+
+ GHOST_GLSettings glSettings = {0};
+ if (G.debug & G_DEBUG_GPU) {
+ glSettings.flags |= GHOST_glDebugContext;
+ }
+ return GHOST_CreateOpenGLContext(g_system, glSettings);
}
void WM_opengl_context_dispose(void *context)