diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-28 06:38:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-28 06:44:28 +0300 |
commit | 4a061a87e6625c396ccbc20c4636f447c453323c (patch) | |
tree | 0702b88ffafee54e5e5ddee6d88c19163f5f92a5 /source/blender/draw/intern/draw_cache.h | |
parent | e78c0840f2eef95f5a3f85dd0222b533f8fe1699 (diff) |
DwM: mesh data now only creates data thats used
Read from the GPUMaterial to find custom-data layers used for drawing.
This resolves problem where having UV's would always calculate tangents
causing noticeable slow down compared to 2.7x.
Diffstat (limited to 'source/blender/draw/intern/draw_cache.h')
-rw-r--r-- | source/blender/draw/intern/draw_cache.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache.h b/source/blender/draw/intern/draw_cache.h index 0bb291caa9c..21fa652778b 100644 --- a/source/blender/draw/intern/draw_cache.h +++ b/source/blender/draw/intern/draw_cache.h @@ -27,6 +27,7 @@ #define __DRAW_CACHE_H__ struct Gwn_Batch; +struct GPUMaterial; struct Object; struct ModifierData; @@ -43,7 +44,8 @@ struct Gwn_Batch *DRW_cache_screenspace_circle_get(void); /* Common Object */ struct Gwn_Batch *DRW_cache_object_wire_outline_get(struct Object *ob); struct Gwn_Batch *DRW_cache_object_surface_get(struct Object *ob); -struct Gwn_Batch **DRW_cache_object_surface_material_get(struct Object *ob); +struct Gwn_Batch **DRW_cache_object_surface_material_get( + struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len); /* Empties */ struct Gwn_Batch *DRW_cache_plain_axes_get(void); @@ -118,7 +120,8 @@ struct Gwn_Batch *DRW_cache_mesh_verts_get(struct Object *ob); struct Gwn_Batch *DRW_cache_mesh_edges_paint_overlay_get(struct Object *ob, bool use_wire, bool use_sel); struct Gwn_Batch *DRW_cache_mesh_faces_weight_overlay_get(struct Object *ob); struct Gwn_Batch *DRW_cache_mesh_verts_weight_overlay_get(struct Object *ob); -struct Gwn_Batch **DRW_cache_mesh_surface_shaded_get(struct Object *ob); +struct Gwn_Batch **DRW_cache_mesh_surface_shaded_get( + struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len); struct Gwn_Batch **DRW_cache_mesh_surface_texpaint_get(struct Object *ob); struct Gwn_Batch *DRW_cache_mesh_surface_texpaint_single_get(struct Object *ob); |