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>2018-07-08 14:05:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-08 14:05:41 +0300
commit804205babe212972dd800c5a2f6d9ebfb64feefb (patch)
tree14fb50ce24a26e30f52448afc063401116889e40 /source/blender/draw
parent392ed710d62ce496491566f9743ad9e66737072a (diff)
Cleanup: rename 'ct' to 'len' for gawain
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_cache.c100
-rw-r--r--source/blender/draw/intern/draw_cache_impl_curve.c12
-rw-r--r--source/blender/draw/intern/draw_cache_impl_displist.c4
-rw-r--r--source/blender/draw/intern/draw_cache_impl_lattice.c2
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c36
-rw-r--r--source/blender/draw/intern/draw_cache_impl_particles.c6
-rw-r--r--source/blender/draw/intern/draw_instance_data.c4
-rw-r--r--source/blender/draw/intern/draw_manager_data.c12
8 files changed, 88 insertions, 88 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index 5c3546f07a7..2251285be74 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -164,7 +164,7 @@ static Gwn_VertBuf *fill_arrows_vbo(const float scale)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -211,7 +211,7 @@ static Gwn_VertBuf *sphere_wire_vbo(const float rad)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -263,7 +263,7 @@ Gwn_Batch *DRW_cache_fullscreen_quad_get(void)
/* Position Only 2D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos, uvs; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.uvs = GWN_vertformat_attr_add(&format, "uvs", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -291,7 +291,7 @@ Gwn_Batch *DRW_cache_quad_get(void)
/* Position Only 2D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos, uvs; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.uvs = GWN_vertformat_attr_add(&format, "uvs", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -344,7 +344,7 @@ Gwn_Batch *DRW_cache_cube_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -369,7 +369,7 @@ Gwn_Batch *DRW_cache_circle_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -400,7 +400,7 @@ Gwn_Batch *DRW_cache_square_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -427,7 +427,7 @@ Gwn_Batch *DRW_cache_single_line_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -452,7 +452,7 @@ Gwn_Batch *DRW_cache_single_line_endpoints_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -476,7 +476,7 @@ Gwn_Batch *DRW_cache_screenspace_circle_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -613,7 +613,7 @@ Gwn_Batch *DRW_cache_plain_axes_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -644,7 +644,7 @@ Gwn_Batch *DRW_cache_single_arrow_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -700,7 +700,7 @@ Gwn_Batch *DRW_cache_empty_cone_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -752,7 +752,7 @@ Gwn_Batch *DRW_cache_axis_names_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* Using 3rd component as axis indicator */
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -810,7 +810,7 @@ Gwn_Batch *DRW_cache_image_plane_get(void)
const float quad[4][2] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
static Gwn_VertFormat format = { 0 };
static struct { uint pos, texCoords; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.texCoords = GWN_vertformat_attr_add(&format, "texCoord", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -831,7 +831,7 @@ Gwn_Batch *DRW_cache_image_plane_wire_get(void)
const float quad[4][2] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format(&format);
@@ -854,7 +854,7 @@ Gwn_Batch *DRW_cache_field_wind_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -891,7 +891,7 @@ Gwn_Batch *DRW_cache_field_force_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -929,7 +929,7 @@ Gwn_Batch *DRW_cache_field_vortex_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -966,7 +966,7 @@ Gwn_Batch *DRW_cache_field_tube_limit_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1015,7 +1015,7 @@ Gwn_Batch *DRW_cache_field_cone_limit_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1070,7 +1070,7 @@ Gwn_Batch *DRW_cache_lamp_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -1102,7 +1102,7 @@ Gwn_Batch *DRW_cache_lamp_shadows_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -1133,7 +1133,7 @@ Gwn_Batch *DRW_cache_lamp_sunrays_get(void)
/* Position Only 2D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -1168,7 +1168,7 @@ Gwn_Batch *DRW_cache_lamp_area_square_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1201,7 +1201,7 @@ Gwn_Batch *DRW_cache_lamp_area_disk_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1235,7 +1235,7 @@ Gwn_Batch *DRW_cache_lamp_hemi_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1313,7 +1313,7 @@ Gwn_Batch *DRW_cache_lamp_spot_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos, n1, n2; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.n1 = GWN_vertformat_attr_add(&format, "N1", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.n2 = GWN_vertformat_attr_add(&format, "N2", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
@@ -1372,7 +1372,7 @@ Gwn_Batch *DRW_cache_lamp_spot_square_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1410,7 +1410,7 @@ Gwn_Batch *DRW_cache_speaker_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1483,7 +1483,7 @@ Gwn_Batch *DRW_cache_lightprobe_cube_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1528,7 +1528,7 @@ Gwn_Batch *DRW_cache_lightprobe_grid_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1581,7 +1581,7 @@ Gwn_Batch *DRW_cache_lightprobe_planar_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1709,7 +1709,7 @@ Gwn_Batch *DRW_cache_bone_octahedral_get(void)
static Gwn_VertFormat format = { 0 };
static struct { uint pos, nor, snor; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.nor = GWN_vertformat_attr_add(&format, "nor", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.snor = GWN_vertformat_attr_add(&format, "snor", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
@@ -1875,7 +1875,7 @@ Gwn_Batch *DRW_cache_bone_box_get(void)
static Gwn_VertFormat format = { 0 };
static struct { uint pos, nor, snor; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.nor = GWN_vertformat_attr_add(&format, "nor", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.snor = GWN_vertformat_attr_add(&format, "snor", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
@@ -1942,7 +1942,7 @@ Gwn_Batch *DRW_cache_bone_envelope_solid_get(void)
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -1989,7 +1989,7 @@ Gwn_Batch *DRW_cache_bone_envelope_outline_get(void)
/* Position Only 2D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos0, pos1, pos2; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos0 = GWN_vertformat_attr_add(&format, "pos0", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.pos1 = GWN_vertformat_attr_add(&format, "pos1", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.pos2 = GWN_vertformat_attr_add(&format, "pos2", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
@@ -2045,7 +2045,7 @@ Gwn_Batch *DRW_cache_bone_point_get(void)
static Gwn_VertFormat format = { 0 };
static struct { uint pos, nor; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.nor = GWN_vertformat_attr_add(&format, "nor", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -2081,7 +2081,7 @@ Gwn_Batch *DRW_cache_bone_point_get(void)
/* Position Only 2D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -2115,7 +2115,7 @@ Gwn_Batch *DRW_cache_bone_point_wire_outline_get(void)
/* Position Only 2D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos0, pos1; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos0 = GWN_vertformat_attr_add(&format, "pos0", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.pos1 = GWN_vertformat_attr_add(&format, "pos1", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -2172,7 +2172,7 @@ Gwn_Batch *DRW_cache_bone_stick_get(void)
/* Position Only 2D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos, flag; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.flag = GWN_vertformat_attr_add(&format, "flag", GWN_COMP_U32, 1, GWN_FETCH_INT);
}
@@ -2314,7 +2314,7 @@ Gwn_Batch *DRW_cache_bone_arrows_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint axis, pos, col; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.axis = GWN_vertformat_attr_add(&format, "axis", GWN_COMP_F32, 1, GWN_FETCH_FLOAT);
attr_id.pos = GWN_vertformat_attr_add(&format, "screenPos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.col = GWN_vertformat_attr_add(&format, "colorAxis", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
@@ -2456,7 +2456,7 @@ Gwn_Batch *DRW_cache_camera_get(void)
if (!SHC.drw_camera) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 1, GWN_FETCH_FLOAT);
}
@@ -2489,7 +2489,7 @@ Gwn_Batch *DRW_cache_camera_frame_get(void)
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 1, GWN_FETCH_FLOAT);
}
@@ -2515,7 +2515,7 @@ Gwn_Batch *DRW_cache_camera_tria_get(void)
if (!SHC.drw_camera_tria) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 1, GWN_FETCH_FLOAT);
}
@@ -2552,7 +2552,7 @@ Gwn_Batch *DRW_cache_single_vert_get(void)
/* Position Only 3D format */
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -2987,7 +2987,7 @@ Gwn_Batch *DRW_cache_particles_get_prim(int type)
static Gwn_VertFormat format = { 0 };
static uint pos_id, axis_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
pos_id = GWN_vertformat_attr_add(&format, "inst_pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
axis_id = GWN_vertformat_attr_add(&format, "axis", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
@@ -3034,7 +3034,7 @@ Gwn_Batch *DRW_cache_particles_get_prim(int type)
static Gwn_VertFormat format = { 0 };
static uint pos_id, axis_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
pos_id = GWN_vertformat_attr_add(&format, "inst_pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
axis_id = GWN_vertformat_attr_add(&format, "axis", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
@@ -3085,7 +3085,7 @@ Gwn_Batch *DRW_cache_particles_get_prim(int type)
static Gwn_VertFormat format = { 0 };
static uint pos_id, axis_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
pos_id = GWN_vertformat_attr_add(&format, "inst_pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
axis_id = GWN_vertformat_attr_add(&format, "axis", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
@@ -3133,7 +3133,7 @@ Gwn_Batch *DRW_cache_cursor_get(bool crosshair_lines)
static Gwn_VertFormat format = { 0 };
static struct { uint pos, color; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
attr_id.color = GWN_vertformat_attr_add(&format, "color", GWN_COMP_U8, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
}
diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c
index 1bf34953dc6..4de1dfd24f5 100644
--- a/source/blender/draw/intern/draw_cache_impl_curve.c
+++ b/source/blender/draw/intern/draw_cache_impl_curve.c
@@ -503,7 +503,7 @@ static Gwn_VertBuf *curve_batch_cache_get_wire_verts(CurveRenderData *rdata, Cur
if (cache->wire.verts == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -581,7 +581,7 @@ static Gwn_VertBuf *curve_batch_cache_get_normal_verts(CurveRenderData *rdata, C
if (cache->normal.verts == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -675,7 +675,7 @@ static void curve_batch_cache_create_overlay_batches(Curve *cu)
if (cache->overlay.verts == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos, data; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.data = GWN_vertformat_attr_add(&format, "data", GWN_COMP_U8, 1, GWN_FETCH_INT);
@@ -743,7 +743,7 @@ static void curve_batch_cache_create_overlay_batches(Curve *cu)
static Gwn_VertFormat format = { 0 };
static struct { uint pos, data; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.data = GWN_vertformat_attr_add(&format, "data", GWN_COMP_U8, 1, GWN_FETCH_INT);
@@ -850,7 +850,7 @@ static Gwn_Batch *curve_batch_cache_get_overlay_select(CurveRenderData *rdata, C
EditFont *ef = rdata->text.edit_font;
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -924,7 +924,7 @@ static Gwn_Batch *curve_batch_cache_get_overlay_cursor(CurveRenderData *rdata, C
if (cache->text.cursor == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
diff --git a/source/blender/draw/intern/draw_cache_impl_displist.c b/source/blender/draw/intern/draw_cache_impl_displist.c
index 3eecff024a1..8d187af0501 100644
--- a/source/blender/draw/intern/draw_cache_impl_displist.c
+++ b/source/blender/draw/intern/draw_cache_impl_displist.c
@@ -122,7 +122,7 @@ Gwn_VertBuf *DRW_displist_vertbuf_calc_pos_with_normals(ListBase *lb)
{
static Gwn_VertFormat format = { 0 };
static struct { uint pos, nor; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.nor = GWN_vertformat_attr_add(&format, "nor", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
@@ -228,7 +228,7 @@ Gwn_Batch **DRW_displist_batch_calc_tri_pos_normals_and_uv_split_by_material(Lis
static Gwn_VertFormat shaded_triangles_format = { 0 };
static struct { uint pos, nor, uv; } attr_id;
- if (shaded_triangles_format.attrib_ct == 0) {
+ if (shaded_triangles_format.attr_len == 0) {
/* initialize vertex format */
attr_id.pos = GWN_vertformat_attr_add(&shaded_triangles_format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.nor = GWN_vertformat_attr_add(&shaded_triangles_format, "nor", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
diff --git a/source/blender/draw/intern/draw_cache_impl_lattice.c b/source/blender/draw/intern/draw_cache_impl_lattice.c
index 6046d9854fb..99dce2d7343 100644
--- a/source/blender/draw/intern/draw_cache_impl_lattice.c
+++ b/source/blender/draw/intern/draw_cache_impl_lattice.c
@@ -507,7 +507,7 @@ static void lattice_batch_cache_create_overlay_batches(Lattice *lt)
if (cache->overlay_verts == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos, data; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.data = GWN_vertformat_attr_add(&format, "data", GWN_COMP_U8, 1, GWN_FETCH_INT);
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 6c6e2d78206..7a72622cb9e 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -2159,7 +2159,7 @@ static Gwn_VertBuf *mesh_batch_cache_get_tri_uv_active(
static Gwn_VertFormat format = { 0 };
static struct { uint uv; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.uv = GWN_vertformat_attr_add(&format, "uv", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
}
@@ -2222,7 +2222,7 @@ static Gwn_VertBuf *mesh_batch_cache_get_tri_pos_and_normals_ex(
if (*r_vbo == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos, nor; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.nor = GWN_vertformat_attr_add(&format, "nor", GWN_COMP_I10, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
}
@@ -2374,7 +2374,7 @@ static Gwn_VertBuf *mesh_batch_cache_get_facedot_pos_with_normals_and_flag(
if (cache->ed_fcenter_pos_with_nor_and_sel == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos, data; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.data = GWN_vertformat_attr_add(&format, "norAndFlag", GWN_COMP_I10, 4, GWN_FETCH_INT_TO_FLOAT_UNIT);
}
@@ -2418,7 +2418,7 @@ static Gwn_VertBuf *mesh_batch_cache_get_edges_visible(
if (cache->ed_edge_pos == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos, data; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -2463,7 +2463,7 @@ static Gwn_VertBuf *mesh_batch_cache_get_verts_visible(
if (cache->ed_vert_pos == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos, data; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -2513,7 +2513,7 @@ static Gwn_VertBuf *mesh_create_facedot_select_id(
{
static Gwn_VertFormat format = { 0 };
static struct { uint pos, col; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.col = GWN_vertformat_attr_add(&format, "color", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
@@ -2561,7 +2561,7 @@ static Gwn_VertBuf *mesh_create_edges_select_id(
{
static Gwn_VertFormat format = { 0 };
static struct { uint pos, col; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.col = GWN_vertformat_attr_add(&format, "color", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
@@ -2611,7 +2611,7 @@ static Gwn_VertBuf *mesh_create_verts_select_id(
{
static Gwn_VertFormat format = { 0 };
static struct { uint pos, col; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.col = GWN_vertformat_attr_add(&format, "color", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
@@ -2671,7 +2671,7 @@ static Gwn_VertBuf *mesh_create_tri_weights(
static Gwn_VertFormat format = { 0 };
static struct { uint col; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.col = GWN_vertformat_attr_add(&format, "color", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -2731,7 +2731,7 @@ static Gwn_VertBuf *mesh_create_tri_vert_colors(
static Gwn_VertFormat format = { 0 };
static struct { uint col; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.col = GWN_vertformat_attr_add(&format, "color", GWN_COMP_U8, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
}
@@ -2791,7 +2791,7 @@ static Gwn_VertBuf *mesh_create_tri_select_id(
static Gwn_VertFormat format = { 0 };
static struct { uint col; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.col = GWN_vertformat_attr_add(&format, "color", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
@@ -2847,7 +2847,7 @@ static Gwn_VertBuf *mesh_batch_cache_get_vert_pos_and_nor_in_order(
if (cache->pos_in_order == NULL) {
static Gwn_VertFormat format = { 0 };
static struct { uint pos, nor; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* Normal is padded so that the vbo can be used as a buffer texture */
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.nor = GWN_vertformat_attr_add(&format, "nor", GWN_COMP_I16, 4, GWN_FETCH_INT_TO_FLOAT_UNIT);
@@ -2887,7 +2887,7 @@ static Gwn_VertFormat *edit_mesh_overlay_pos_format(uint *r_pos_id)
{
static Gwn_VertFormat format_pos = { 0 };
static uint pos_id;
- if (format_pos.attrib_ct == 0) {
+ if (format_pos.attr_len == 0) {
pos_id = GWN_vertformat_attr_add(&format_pos, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
*r_pos_id = pos_id;
@@ -2899,7 +2899,7 @@ static Gwn_VertFormat *edit_mesh_overlay_nor_format(uint *r_vnor_id, uint *r_lno
static Gwn_VertFormat format_nor = { 0 };
static Gwn_VertFormat format_nor_loop = { 0 };
static uint vnor_id, vnor_loop_id, lnor_id;
- if (format_nor.attrib_ct == 0) {
+ if (format_nor.attr_len == 0) {
vnor_id = GWN_vertformat_attr_add(&format_nor, "vnor", GWN_COMP_I10, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
vnor_loop_id = GWN_vertformat_attr_add(&format_nor_loop, "vnor", GWN_COMP_I10, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
lnor_id = GWN_vertformat_attr_add(&format_nor_loop, "lnor", GWN_COMP_I10, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
@@ -2919,7 +2919,7 @@ static Gwn_VertFormat *edit_mesh_overlay_data_format(uint *r_data_id)
{
static Gwn_VertFormat format_flag = { 0 };
static uint data_id;
- if (format_flag.attrib_ct == 0) {
+ if (format_flag.attr_len == 0) {
data_id = GWN_vertformat_attr_add(&format_flag, "data", GWN_COMP_U8, 4, GWN_FETCH_INT);
}
*r_data_id = data_id;
@@ -3657,7 +3657,7 @@ static Gwn_VertBuf *mesh_create_edge_pos_with_sel(
static Gwn_VertFormat format = { 0 };
static struct { uint pos, sel; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.sel = GWN_vertformat_attr_add(&format, "select", GWN_COMP_U8, 1, GWN_FETCH_INT);
}
@@ -3744,7 +3744,7 @@ static Gwn_VertBuf *mesh_create_vert_pos_with_overlay_data(
static Gwn_VertFormat format = { 0 };
static struct { uint data; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.data = GWN_vertformat_attr_add(&format, "data", GWN_COMP_I8, 1, GWN_FETCH_INT);
}
@@ -3997,7 +3997,7 @@ Gwn_Batch *DRW_mesh_batch_cache_get_fancy_edges(Mesh *me)
/* create batch from DM */
static Gwn_VertFormat format = { 0 };
static struct { uint pos, n1, n2; } attr_id;
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
attr_id.n1 = GWN_vertformat_attr_add(&format, "N1", GWN_COMP_I10, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c
index 60b367f7b1a..df67d34d566 100644
--- a/source/blender/draw/intern/draw_cache_impl_particles.c
+++ b/source/blender/draw/intern/draw_cache_impl_particles.c
@@ -1219,7 +1219,7 @@ static void particle_batch_cache_ensure_pos(
GWN_VERTBUF_DISCARD_SAFE(point_cache->pos);
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
pos_id = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 4, GWN_FETCH_FLOAT);
rot_id = GWN_vertformat_attr_add(&format, "rot", GWN_COMP_F32, 4, GWN_FETCH_FLOAT);
@@ -1424,7 +1424,7 @@ static void particle_batch_cache_ensure_edit_inner_pos(
GWN_VERTBUF_DISCARD_SAFE(cache->edit_inner_pos);
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
pos_id = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
color_id = GWN_vertformat_attr_add(&format, "color", GWN_COMP_F32, 4, GWN_FETCH_FLOAT);
@@ -1495,7 +1495,7 @@ static void particle_batch_cache_ensure_edit_tip_pos(
GWN_VERTBUF_DISCARD_SAFE(cache->edit_tip_pos);
- if (format.attrib_ct == 0) {
+ if (format.attr_len == 0) {
/* initialize vertex format */
pos_id = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
color_id = GWN_vertformat_attr_add(&format, "color", GWN_COMP_F32, 4, GWN_FETCH_FLOAT);
diff --git a/source/blender/draw/intern/draw_instance_data.c b/source/blender/draw/intern/draw_instance_data.c
index e5b5ec31823..e322d4780d5 100644
--- a/source/blender/draw/intern/draw_instance_data.c
+++ b/source/blender/draw/intern/draw_instance_data.c
@@ -215,7 +215,7 @@ void DRW_instance_buffer_finish(DRWInstanceDataList *idatalist)
realloc_size = i + 1;
uint vert_len = DRW_shgroup_get_instance_count(bbuf->shgroup);
vert_len += (vert_len == 0) ? 1 : 0; /* Do not realloc to 0 size buffer */
- if (vert_len + BUFFER_VERTS_CHUNK <= bbuf->vert->vertex_ct) {
+ if (vert_len + BUFFER_VERTS_CHUNK <= bbuf->vert->vertex_len) {
uint size = vert_len + BUFFER_VERTS_CHUNK - 1;
size = size - size % BUFFER_VERTS_CHUNK;
GWN_vertbuf_data_resize(bbuf->vert, size);
@@ -247,7 +247,7 @@ void DRW_instance_buffer_finish(DRWInstanceDataList *idatalist)
realloc_size = i + 1;
uint vert_len = DRW_shgroup_get_instance_count(ibuf->shgroup);
vert_len += (vert_len == 0) ? 1 : 0; /* Do not realloc to 0 size buffer */
- if (vert_len + BUFFER_VERTS_CHUNK <= ibuf->vert->vertex_ct) {
+ if (vert_len + BUFFER_VERTS_CHUNK <= ibuf->vert->vertex_len) {
uint size = vert_len + BUFFER_VERTS_CHUNK - 1;
size = size - size % BUFFER_VERTS_CHUNK;
GWN_vertbuf_data_resize(ibuf->vert, size);
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index 2e6079e1661..c259633982e 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -553,7 +553,7 @@ void DRW_shgroup_call_dynamic_add_array(DRWShadingGroup *shgroup, const void *at
{
#ifdef USE_GPU_SELECT
if (G.f & G_PICKSEL) {
- if (shgroup->instance_count == shgroup->inst_selectid->vertex_ct) {
+ if (shgroup->instance_count == shgroup->inst_selectid->vertex_len) {
GWN_vertbuf_data_resize(shgroup->inst_selectid, shgroup->instance_count + 32);
}
GWN_vertbuf_attr_set(shgroup->inst_selectid, 0, shgroup->instance_count, &DST.select_id);
@@ -564,7 +564,7 @@ void DRW_shgroup_call_dynamic_add_array(DRWShadingGroup *shgroup, const void *at
UNUSED_VARS_NDEBUG(attr_len);
for (int i = 0; i < attr_len; ++i) {
- if (shgroup->instance_count == shgroup->instance_vbo->vertex_ct) {
+ if (shgroup->instance_count == shgroup->instance_vbo->vertex_len) {
GWN_vertbuf_data_resize(shgroup->instance_vbo, shgroup->instance_count + 32);
}
GWN_vertbuf_attr_set(shgroup->instance_vbo, i, shgroup->instance_count, attr[i]);
@@ -651,7 +651,7 @@ static void drw_shgroup_instance_init(
shgroup->instance_geom = batch;
#ifndef NDEBUG
- shgroup->attribs_count = format->attrib_ct;
+ shgroup->attribs_count = format->attr_len;
#endif
DRW_instancing_buffer_request(DST.idatalist, format, batch, shgroup,
@@ -662,7 +662,7 @@ static void drw_shgroup_instance_init(
/* Not actually used for rendering but alloced in one chunk.
* Plus we don't have to care about ownership. */
static Gwn_VertFormat inst_select_format = {0};
- if (inst_select_format.attrib_ct == 0) {
+ if (inst_select_format.attr_len == 0) {
GWN_vertformat_attr_add(&inst_select_format, "selectId", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
Gwn_Batch *batch_dummy; /* Not used */
@@ -679,7 +679,7 @@ static void drw_shgroup_batching_init(
drw_shgroup_init(shgroup, shader);
#ifndef NDEBUG
- shgroup->attribs_count = (format != NULL) ? format->attrib_ct : 0;
+ shgroup->attribs_count = (format != NULL) ? format->attr_len : 0;
#endif
BLI_assert(format != NULL);
@@ -698,7 +698,7 @@ static void drw_shgroup_batching_init(
if (G.f & G_PICKSEL) {
/* Not actually used for rendering but alloced in one chunk. */
static Gwn_VertFormat inst_select_format = {0};
- if (inst_select_format.attrib_ct == 0) {
+ if (inst_select_format.attr_len == 0) {
GWN_vertformat_attr_add(&inst_select_format, "selectId", GWN_COMP_I32, 1, GWN_FETCH_INT);
}
Gwn_Batch *batch; /* Not used */