DRW: Refactor: Use DRWCall to accumulate per instance attributes
authorClément Foucault <foucault.clem@gmail.com>
Mon, 13 May 2019 15:56:20 +0000 (17:56 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 14 May 2019 08:57:03 +0000 (10:57 +0200)
commit8bc8a62c57f91326ab3f8850785dce5452b5d703
treec578b9786bc3e519f36f782cd74abd77ad52b344
parent20d9cd3a1fbd763dbe002e9baf2e3ba7fbb66f2f
DRW: Refactor: Use DRWCall to accumulate per instance attributes

This is a big change that cleanup a lot of confusing code.
- The instancing/batching data buffer distribution in draw_instance_data.c.
- The selection & drawing code in draw_manager_exec.c
- Prety much every non-meshes object drawing (object_mode.c).

Most of the changes are just renaming but there still a chance a typo might
have sneek through.

The Batching/Instancing Shading groups are replace by DRWCallBuffers. This
is cleaner and conceptually more in line with what a DRWShadingGroup should
be.

There is still some little confusion in draw_common.c where some function
takes shgroup as input and some don't.
15 files changed:
source/blender/draw/engines/eevee/eevee_lightprobes.c
source/blender/draw/engines/eevee/eevee_private.h
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_armature.c
source/blender/draw/intern/draw_common.c
source/blender/draw/intern/draw_common.h
source/blender/draw/intern/draw_instance_data.c
source/blender/draw/intern/draw_instance_data.h
source/blender/draw/intern/draw_manager.c
source/blender/draw/intern/draw_manager.h
source/blender/draw/intern/draw_manager_data.c
source/blender/draw/intern/draw_manager_exec.c
source/blender/draw/modes/edit_metaball_mode.c
source/blender/draw/modes/edit_text_mode.c
source/blender/draw/modes/object_mode.c