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:
authorCampbell Barton <ideasman42@gmail.com>2017-06-28 06:38:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-28 06:44:28 +0300
commit4a061a87e6625c396ccbc20c4636f447c453323c (patch)
tree0702b88ffafee54e5e5ddee6d88c19163f5f92a5 /source/blender/draw/intern/draw_cache_impl.h
parente78c0840f2eef95f5a3f85dd0222b533f8fe1699 (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_impl.h')
-rw-r--r--source/blender/draw/intern/draw_cache_impl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h
index f02f73d1f9d..9328f6f6314 100644
--- a/source/blender/draw/intern/draw_cache_impl.h
+++ b/source/blender/draw/intern/draw_cache_impl.h
@@ -27,6 +27,7 @@
#define __DRAW_CACHE_IMPL_H__
struct Gwn_Batch;
+struct GPUMaterial;
struct ListBase;
struct CurveCache;
struct ParticleSystem;
@@ -72,7 +73,8 @@ struct Gwn_Batch *DRW_lattice_batch_cache_get_overlay_verts(struct Lattice *lt);
/* Mesh */
-struct Gwn_Batch **DRW_mesh_batch_cache_get_surface_shaded(struct Mesh *me);
+struct Gwn_Batch **DRW_mesh_batch_cache_get_surface_shaded(
+ struct Mesh *me, struct GPUMaterial **gpumat_array, uint gpumat_array_len);
struct Gwn_Batch **DRW_mesh_batch_cache_get_surface_texpaint(struct Mesh *me);
struct Gwn_Batch *DRW_mesh_batch_cache_get_surface_texpaint_single(struct Mesh *me);
struct Gwn_Batch *DRW_mesh_batch_cache_get_weight_overlay_edges(struct Mesh *me, bool use_wire, bool use_sel);