Fix #112867: Workbench: Final render fails to render hair
Add missing calls to the old draw manager functions.
This commit is contained in:
@@ -753,16 +753,18 @@ static void workbench_render_to_image(void *vedata,
|
||||
RE_GetCameraModelMatrix(engine->re, camera_ob, viewinv.ptr());
|
||||
viewmat = math::invert(viewinv);
|
||||
|
||||
DRWView *view = DRW_view_create(viewmat.ptr(), winmat.ptr(), nullptr, nullptr, nullptr);
|
||||
DRW_view_default_set(view);
|
||||
DRW_view_set_active(view);
|
||||
|
||||
/* Render */
|
||||
do {
|
||||
if (RE_engine_test_break(engine)) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: Remove old draw manager calls. */
|
||||
DRW_cache_restart();
|
||||
DRWView *view = DRW_view_create(viewmat.ptr(), winmat.ptr(), nullptr, nullptr, nullptr);
|
||||
DRW_view_default_set(view);
|
||||
DRW_view_set_active(view);
|
||||
|
||||
ved->instance->init(camera_ob);
|
||||
|
||||
DRW_manager_get()->begin_sync();
|
||||
@@ -777,9 +779,9 @@ static void workbench_render_to_image(void *vedata,
|
||||
|
||||
DRW_manager_get()->end_sync();
|
||||
|
||||
/* Also we weed to have a correct FBO bound for #DRW_curves_update */
|
||||
// GPU_framebuffer_bind(dfbl->default_fb);
|
||||
// DRW_curves_update(); /* TODO(@pragma37): Check this once curves are implemented */
|
||||
/* TODO: Remove old draw manager calls. */
|
||||
DRW_render_instance_buffer_finish();
|
||||
DRW_curves_update();
|
||||
|
||||
workbench_draw_scene(vedata);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user