diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-22 09:20:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-22 09:21:44 +0300 |
commit | e98652b64f2b38b9d1ee1371c33ad14ec600e297 (patch) | |
tree | 55f6bfc3b2c68740d60fcbb4124b44ac5290c295 /source | |
parent | f637145450010d14660fcb029d41560a138eae14 (diff) |
Cleanup: minor edits
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 5 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 16 |
2 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index c0fe58ec5d9..6786e6c036b 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -1705,10 +1705,10 @@ void DRW_mesh_batch_cache_free(Mesh *me) /* Batch cache usage. */ -#define USE_COMP_MESH_DATA static VertexBuffer *mesh_batch_cache_get_tri_shading_data(MeshRenderData *rdata, MeshBatchCache *cache) { BLI_assert(rdata->types & (MR_DATATYPE_VERT | MR_DATATYPE_LOOPTRI | MR_DATATYPE_LOOP | MR_DATATYPE_POLY)); +#define USE_COMP_MESH_DATA if (cache->shaded_triangles_data == NULL) { unsigned int vidx = 0; @@ -1844,6 +1844,9 @@ static VertexBuffer *mesh_batch_cache_get_tri_shading_data(MeshRenderData *rdata MEM_freeN(vcol_id); MEM_freeN(tangent_id); } + +#undef USE_COMP_MESH_DATA + return cache->shaded_triangles_data; } diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 89e085423d4..21f5ad97b3d 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -107,13 +107,6 @@ typedef struct OBJECT_Data { OBJECT_StorageList *stl; } OBJECT_Data; -/* per-image shading groups for image-type empty objects */ -struct EmptyImageShadingGroupData { - DRWShadingGroup *shgrp_image; - DRWShadingGroup *shgrp_wire; - float image_aspect[2]; -}; - /* *********** STATIC *********** */ typedef struct OBJECT_PrivateData{ @@ -540,8 +533,15 @@ static void image_calc_aspect(Image *ima, ImageUser *iuser, float r_image_aspect } } +/* per-image shading groups for image-type empty objects */ +struct EmptyImageShadingGroupData { + DRWShadingGroup *shgrp_image; + DRWShadingGroup *shgrp_wire; + float image_aspect[2]; +}; + static void DRW_shgroup_empty_image( - OBJECT_StorageList *stl, OBJECT_PassList *psl, Object *ob, float color[4]) + OBJECT_StorageList *stl, OBJECT_PassList *psl, Object *ob, const float color[3]) { /* TODO: 'StereoViews', see draw_empty_image. */ |