Blender Git Commit Log

Git Commits -> Revision 1326130

Revision 1326130 by Clément Foucault (master)
February 26, 2018, 18:41 (GMT)
DRW: Add new Draw Manager OpenGL Context.

This separate context allows two things:
- It allows viewports in multi-windows configuration.
- F12 render can use this context in a separate thread and do a non-blocking render.

The downside is that the context cannot be used while rendering so a request to refresh a viewport will lock the UI. This is something that will be adressed in the future.

Under the hood what does that mean:
- Not adding more mess with VAOs management in gawain.
- Doing depth only draw for operators / selection needs to be done in an offscreen buffer.
- The 3D cursor "autodis" operator is still reading the backbuffer so we need to copy the result to it.
- All FBOs needed by the drawmanager must to be created/destroyed with its context active.
- We cannot use batches created for UI in the DRW context and vice-versa. There is a clear separation of resources that enables the use of safe multi-threading.

Commit Details:

Full Hash: 13261304a331b4cff37de477ddf19c915ed64b2c
Parent Commit: 0940e89
Lines Changed: +347, -22

1 Added Path:

/source/blender/gpu/shaders/gpu_shader_image_depth_copy_frag.glsl (+12, -0) (View)

19 Modified Paths:

/source/blender/draw/DRW_engine.h (+5, -0) (Diff)
/source/blender/draw/intern/draw_cache.c (+5, -2) (Diff)
/source/blender/draw/intern/draw_manager.c (+218, -6) (Diff)
/source/blender/editors/render/render_internal.c (+0, -9) (Diff)
/source/blender/editors/render/render_opengl.c (+8, -0) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+6, -0) (Diff)
/source/blender/editors/space_view3d/view3d_draw.c (+4, -0) (Diff)
/source/blender/editors/space_view3d/view3d_view.c (+11, -1) (Diff)
/source/blender/gpu/CMakeLists.txt (+1, -0) (Diff)
/source/blender/gpu/GPU_batch.h (+2, -0) (Diff)
/source/blender/gpu/GPU_shader.h (+1, -0) (Diff)
/source/blender/gpu/intern/gpu_batch_presets.c (+7, -4) (Diff)
/source/blender/gpu/intern/gpu_shader.c (+3, -0) (Diff)
/source/blender/gpu/intern/gpu_viewport.c (+8, -0) (Diff)
/source/blender/windowmanager/CMakeLists.txt (+1, -0) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+7, -0) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+42, -0) (Diff)
/source/blender/windowmanager/WM_api.h (+5, -0) (Diff)
/source/blender/windowmanager/wm_window.h (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021