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 <campbell@blender.org>2022-09-08 04:22:30 +0300
committerCampbell Barton <campbell@blender.org>2022-09-08 04:34:02 +0300
commitc2c369ebe693456b7048b3908f342f5667e0fd03 (patch)
tree1f6f8258e5c04de52e371c21a358d00719373aca /source/blender/draw
parentc36c403cdb7e8a9d9c0b7aa1765e42fc0e9818d0 (diff)
Cleanup: prefer terms verts/polys over vertices/polygons
Follows existing naming for the most part, also use "num" as a suffix in some instances (following our naming conventions).
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_subdivision.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index 4e985843123..6e317201424 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -807,15 +807,15 @@ struct DRWCacheBuildingContext {
};
static bool draw_subdiv_topology_info_cb(const SubdivForeachContext *foreach_context,
- const int num_vertices,
+ const int num_verts,
const int num_edges,
const int num_loops,
- const int num_polygons,
+ const int num_polys,
const int *subdiv_polygon_offset)
{
/* num_loops does not take into account meshes with only loose geometry, which might be meshes
- * used as custom bone shapes, so let's check the num_vertices also. */
- if (num_vertices == 0 && num_loops == 0) {
+ * used as custom bone shapes, so let's check the num_verts also. */
+ if (num_verts == 0 && num_loops == 0) {
return false;
}
@@ -826,12 +826,12 @@ static bool draw_subdiv_topology_info_cb(const SubdivForeachContext *foreach_con
if (num_loops != 0) {
cache->num_subdiv_edges = (uint)num_edges;
cache->num_subdiv_loops = (uint)num_loops;
- cache->num_subdiv_verts = (uint)num_vertices;
- cache->num_subdiv_quads = (uint)num_polygons;
+ cache->num_subdiv_verts = (uint)num_verts;
+ cache->num_subdiv_quads = (uint)num_polys;
cache->subdiv_polygon_offset = static_cast<int *>(MEM_dupallocN(subdiv_polygon_offset));
}
- cache->may_have_loose_geom = num_vertices != 0 || num_edges != 0;
+ cache->may_have_loose_geom = num_verts != 0 || num_edges != 0;
/* Initialize cache buffers, prefer dynamic usage so we can reuse memory on the host even after
* it was sent to the device, since we may use the data while building other buffers on the CPU
@@ -882,7 +882,7 @@ static bool draw_subdiv_topology_info_cb(const SubdivForeachContext *foreach_con
if (cache->num_subdiv_verts) {
ctx->vert_origindex_map = static_cast<int *>(
MEM_mallocN(cache->num_subdiv_verts * sizeof(int), "subdiv_vert_origindex_map"));
- for (int i = 0; i < num_vertices; i++) {
+ for (int i = 0; i < num_verts; i++) {
ctx->vert_origindex_map[i] = -1;
}
}