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/intern/draw_cache.c
parent392ed710d62ce496491566f9743ad9e66737072a (diff)
Cleanup: rename 'ct' to 'len' for gawain
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r--source/blender/draw/intern/draw_cache.c100
1 files changed, 50 insertions, 50 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);
}