Fix missing action zones and emboss in the 3D viewport.
Not really happy with the fix, but it works. With the new window draw method we are no longer storing the 3D viewport in 4 buffers, by having the GPU viewport function directly as the 3rd buffer. This means we need to draw the action zones into it, and so we need to keep the framebuffer bound a little longer.
This commit is contained in:
@@ -1295,7 +1295,14 @@ void DRW_draw_render_loop_ex(
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
GPU_framebuffer_restore();
|
||||
if (WM_draw_region_get_bound_viewport(ar)) {
|
||||
/* Don't unbind the framebuffer yet in this case and let
|
||||
* GPU_viewport_unbind do it, so that we can still do further
|
||||
* drawing of action zones on top. */
|
||||
}
|
||||
else {
|
||||
GPU_framebuffer_restore();
|
||||
}
|
||||
|
||||
DRW_state_reset();
|
||||
drw_engines_disable();
|
||||
|
||||
@@ -548,6 +548,7 @@ void GPU_viewport_draw_to_screen(GPUViewport *viewport, const rcti *rect)
|
||||
|
||||
void GPU_viewport_unbind(GPUViewport *UNUSED(viewport))
|
||||
{
|
||||
GPU_framebuffer_restore();
|
||||
DRW_opengl_context_disable();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user