Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_window.c
| Show First 20 Lines • Show All 2,425 Lines • ▼ Show 20 Lines | |||||
| * \{ */ | * \{ */ | ||||
| void *WM_opengl_context_create(void) | void *WM_opengl_context_create(void) | ||||
| { | { | ||||
| /* On Windows there is a problem creating contexts that share lists | /* On Windows there is a problem creating contexts that share lists | ||||
| * from one context that is current in another thread. | * from one context that is current in another thread. | ||||
| * So we should call this function only on the main thread. | * So we should call this function only on the main thread. | ||||
| */ | */ | ||||
| BLI_assert(BLI_thread_is_main()); | /* XXX: Keep the check for Blender's drawing code, but allow render engines to create OpenGL | ||||
| * contexts on demand, even for offline rendering. */ | |||||
| // BLI_assert(BLI_thread_is_main()); | |||||
| BLI_assert(GPU_framebuffer_active_get() == GPU_framebuffer_back_get()); | BLI_assert(GPU_framebuffer_active_get() == GPU_framebuffer_back_get()); | ||||
| GHOST_GLSettings glSettings = {0}; | GHOST_GLSettings glSettings = {0}; | ||||
| if (G.debug & G_DEBUG_GPU) { | if (G.debug & G_DEBUG_GPU) { | ||||
| glSettings.flags |= GHOST_glDebugContext; | glSettings.flags |= GHOST_glDebugContext; | ||||
| } | } | ||||
| return GHOST_CreateOpenGLContext(g_system, glSettings); | return GHOST_CreateOpenGLContext(g_system, glSettings); | ||||
| } | } | ||||
| Show All 30 Lines | |||||