Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-05-30 01:36:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-30 14:43:34 +0300
commit7cdd5ed7bd228d46b5eecc3355b01d00f26d1ca2 (patch)
treeae4956f14f3718b27fea8b11a961482ba0d63305 /source/blender/draw/intern/draw_manager.h
parent9f2e154e020999263b17db5345111eba5fed9a90 (diff)
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.
Diffstat (limited to 'source/blender/draw/intern/draw_manager.h')
-rw-r--r--source/blender/draw/intern/draw_manager.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h
index 6cf70f555eb..867d7132c20 100644
--- a/source/blender/draw/intern/draw_manager.h
+++ b/source/blender/draw/intern/draw_manager.h
@@ -283,6 +283,8 @@ typedef struct DRWManager {
ViewportMemoryPool *vmempool;
DRWInstanceDataList *idatalist;
DRWInstanceData *object_instance_data[MAX_INSTANCE_DATA_SIZE];
+ /* Default Unit model matrix state without culling. */
+ DRWCallState *unit_state;
/* State of the object being evaluated if already allocated. */
DRWCallState *ob_state;
struct DupliObject *dupli_source;