DRW: Add unit_state to avoid lots of DRWCallState duplication
authorClément Foucault <foucault.clem@gmail.com>
Wed, 29 May 2019 22:36:54 +0000 (00:36 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Thu, 30 May 2019 11:43:34 +0000 (13:43 +0200)
commit7cdd5ed7bd228d46b5eecc3355b01d00f26d1ca2
treeae4956f14f3718b27fea8b11a961482ba0d63305
parent9f2e154e020999263b17db5345111eba5fed9a90
DRW: Add unit_state to avoid lots of DRWCallState duplication

A lot of drawcalls don't use the object's properties and don't
need a dedicated DRWCallState. We allocate a unique one at
the begining and use it for all calls that uses the default
unit matrix.
source/blender/draw/intern/draw_manager.c
source/blender/draw/intern/draw_manager.h
source/blender/draw/intern/draw_manager_data.c