diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-21 16:15:41 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-21 16:17:05 +0300 |
commit | 526392ab1637c1c11ebea44c7409bd2bd12e8a5c (patch) | |
tree | 2442524ec5e61447134d2f3a0732750f8a632d26 /source/blender/draw | |
parent | 8534ce93842d848e726e71aead33c77ef975f9bb (diff) |
Workbench: Remove warning
When in forward rendering and Object outline was disabled every render
call created one console warning (uniform objectId not found)
this commit removes this warning
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_forward.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index 6a4737ab8b9..47fcaa0ca66 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -334,7 +334,9 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata) psl->composite_pass = DRW_pass_create("Composite", state); grp = DRW_shgroup_create(wpd->composite_sh, psl->composite_pass); - DRW_shgroup_uniform_texture_ref(grp, "objectId", &e_data.object_id_tx); + if (OBJECT_ID_PASS_ENABLED(wpd)) { + DRW_shgroup_uniform_texture_ref(grp, "objectId", &e_data.object_id_tx); + } DRW_shgroup_uniform_texture_ref(grp, "transparentAccum", &e_data.transparent_accum_tx); DRW_shgroup_uniform_texture_ref(grp, "transparentRevealage", &e_data.transparent_revealage_tx); DRW_shgroup_uniform_block(grp, "world_block", wpd->world_ubo); |