realize-depth #5

Merged
Arye Ramaty merged 43 commits from David-Haver/blender:realize-depth into WIP-realize-depth 2024-03-31 17:22:49 +02:00
Showing only changes of commit 7e2d54e786 - Show all commits

View File

@ -1314,8 +1314,8 @@ bool RE_engine_gpu_context_enable(RenderEngine *engine)
/* Activate RenderEngine System and Blender GPU Context. */ /* Activate RenderEngine System and Blender GPU Context. */
WM_system_gpu_context_activate(engine->system_gpu_context); WM_system_gpu_context_activate(engine->system_gpu_context);
if (engine->blender_gpu_context) { if (engine->blender_gpu_context) {
GPU_context_active_set(engine->blender_gpu_context);
GPU_render_begin(); GPU_render_begin();
GPU_context_active_set(engine->blender_gpu_context);
} }
return true; return true;
} }
@ -1330,8 +1330,8 @@ void RE_engine_gpu_context_disable(RenderEngine *engine)
else { else {
if (engine->system_gpu_context) { if (engine->system_gpu_context) {
if (engine->blender_gpu_context) { if (engine->blender_gpu_context) {
GPU_render_end();
GPU_context_active_set(nullptr); GPU_context_active_set(nullptr);
GPU_render_end();
} }
WM_system_gpu_context_release(engine->system_gpu_context); WM_system_gpu_context_release(engine->system_gpu_context);
/* Restore DRW state context if previously active. */ /* Restore DRW state context if previously active. */