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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-08 13:47:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-08 13:49:03 +0300
commit9d43ed521cd085b91decfcfe9a437a5faa317f14 (patch)
treed8570517cec7623a43ab4f98732cf2198285548f /source
parentb5811bccf8a64129e81a96f4bcf12815eae2e032 (diff)
Cleanup: abbreviate unsigned types (draw manager)
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h2
-rw-r--r--source/blender/draw/intern/DRW_render.h6
-rw-r--r--source/blender/draw/intern/draw_anim_viz.c2
-rw-r--r--source/blender/draw/intern/draw_armature.c20
-rw-r--r--source/blender/draw/intern/draw_cache.c12
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c30
-rw-r--r--source/blender/draw/intern/draw_cache_impl_particles.c14
-rw-r--r--source/blender/draw/intern/draw_hair_private.h2
-rw-r--r--source/blender/draw/intern/draw_manager.h6
-rw-r--r--source/blender/draw/intern/draw_manager_text.c4
-rw-r--r--source/blender/draw/intern/draw_manager_text.h2
-rw-r--r--source/blender/draw/intern/draw_view.c16
-rw-r--r--source/blender/draw/modes/edit_mesh_mode_text.c2
-rw-r--r--source/blender/draw/modes/object_mode.c2
14 files changed, 60 insertions, 60 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index e9ba6585943..fe01b85758c 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -332,7 +332,7 @@ typedef struct EEVEE_ShadowRender {
/* This is just a really long bitflag with special function to access it. */
#define MAX_LIGHTBITS_FIELDS (MAX_LIGHT / 8)
typedef struct EEVEE_LightBits {
- unsigned char fields[MAX_LIGHTBITS_FIELDS];
+ uchar fields[MAX_LIGHTBITS_FIELDS];
} EEVEE_LightBits;
typedef struct EEVEE_ShadowCaster {
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h
index fdb1b87589e..0d443293d04 100644
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@ -346,9 +346,9 @@ void DRW_shgroup_free(struct DRWShadingGroup *shgroup);
void DRW_shgroup_call_add(DRWShadingGroup *shgroup, struct Gwn_Batch *geom, float (*obmat)[4]);
void DRW_shgroup_call_range_add(
DRWShadingGroup *shgroup, struct Gwn_Batch *geom, float (*obmat)[4], uint v_sta, uint v_count);
-void DRW_shgroup_call_procedural_points_add(DRWShadingGroup *shgroup, unsigned int point_count, float (*obmat)[4]);
-void DRW_shgroup_call_procedural_lines_add(DRWShadingGroup *shgroup, unsigned int line_count, float (*obmat)[4]);
-void DRW_shgroup_call_procedural_triangles_add(DRWShadingGroup *shgroup, unsigned int tria_count, float (*obmat)[4]);
+void DRW_shgroup_call_procedural_points_add(DRWShadingGroup *shgroup, uint point_count, float (*obmat)[4]);
+void DRW_shgroup_call_procedural_lines_add(DRWShadingGroup *shgroup, uint line_count, float (*obmat)[4]);
+void DRW_shgroup_call_procedural_triangles_add(DRWShadingGroup *shgroup, uint tria_count, float (*obmat)[4]);
void DRW_shgroup_call_object_procedural_triangles_culled_add(DRWShadingGroup *shgroup, uint tria_count, struct Object *ob);
void DRW_shgroup_call_object_add_ex(DRWShadingGroup *shgroup, struct Gwn_Batch *geom, struct Object *ob, bool bypass_culling);
#define DRW_shgroup_call_object_add(shgroup, geom, ob) DRW_shgroup_call_object_add_ex(shgroup, geom, ob, false)
diff --git a/source/blender/draw/intern/draw_anim_viz.c b/source/blender/draw/intern/draw_anim_viz.c
index d19bd54ff5f..e634710980a 100644
--- a/source/blender/draw/intern/draw_anim_viz.c
+++ b/source/blender/draw/intern/draw_anim_viz.c
@@ -256,7 +256,7 @@ static void MPATH_cache_motion_path(MPATH_PassList *psl,
bool show_kf_no = (avs->path_viewflag & MOTIONPATH_VIEW_KFNOS) != 0;
if ((avs->path_viewflag & (MOTIONPATH_VIEW_FNUMS)) || (show_kf_no && show_keyframes)) {
int i;
- unsigned char col[4], col_kf[4];
+ uchar col[4], col_kf[4];
UI_GetThemeColor3ubv(TH_TEXT_HI, col);
UI_GetThemeColor3ubv(TH_VERTEX_SELECT, col_kf);
col[3] = col_kf[3] = 255;
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c
index 3faf8a352b2..9bc8b70b67c 100644
--- a/source/blender/draw/intern/draw_armature.c
+++ b/source/blender/draw/intern/draw_armature.c
@@ -514,7 +514,7 @@ static void set_pchan_colorset(Object *ob, bPoseChannel *pchan)
}
/* This function is for brightening/darkening a given color (like UI_GetThemeColorShade3ubv()) */
-static void cp_shade_color3ub(unsigned char cp[3], const int offset)
+static void cp_shade_color3ub(uchar cp[3], const int offset)
{
int r, g, b;
@@ -549,7 +549,7 @@ static bool set_pchan_color(short colCode, const int boneflag, const short const
case PCHAN_COLOR_NORMAL:
{
if (bcolor) {
- unsigned char cp[4] = {255};
+ uchar cp[4] = {255};
if (boneflag & BONE_DRAW_ACTIVE) {
copy_v3_v3_char((char *)cp, bcolor->active);
@@ -591,7 +591,7 @@ static bool set_pchan_color(short colCode, const int boneflag, const short const
if (bcolor) {
float solid_bcolor[3];
- rgb_uchar_to_float(solid_bcolor, (unsigned char *)bcolor->solid);
+ rgb_uchar_to_float(solid_bcolor, (uchar *)bcolor->solid);
interp_v3_v3v3(fcolor, fcolor, solid_bcolor, 1.0f);
}
@@ -600,7 +600,7 @@ static bool set_pchan_color(short colCode, const int boneflag, const short const
case PCHAN_COLOR_CONSTS:
{
if ((bcolor == NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS)) {
- unsigned char cp[4];
+ uchar cp[4];
if (constflag & PCHAN_HAS_TARGET) rgba_char_args_set((char *)cp, 255, 150, 0, 80);
else if (constflag & PCHAN_HAS_IK) rgba_char_args_set((char *)cp, 255, 255, 0, 80);
else if (constflag & PCHAN_HAS_SPLINEIK) rgba_char_args_set((char *)cp, 200, 255, 0, 80);
@@ -618,7 +618,7 @@ static bool set_pchan_color(short colCode, const int boneflag, const short const
case PCHAN_COLOR_SPHEREBONE_BASE:
{
if (bcolor) {
- unsigned char cp[4] = {255};
+ uchar cp[4] = {255};
if (boneflag & BONE_DRAW_ACTIVE) {
copy_v3_v3_char((char *)cp, bcolor->active);
@@ -649,7 +649,7 @@ static bool set_pchan_color(short colCode, const int boneflag, const short const
case PCHAN_COLOR_SPHEREBONE_END:
{
if (bcolor) {
- unsigned char cp[4] = {255};
+ uchar cp[4] = {255};
if (boneflag & BONE_DRAW_ACTIVE) {
copy_v3_v3_char((char *)cp, bcolor->active);
@@ -683,7 +683,7 @@ static bool set_pchan_color(short colCode, const int boneflag, const short const
{
/* inner part in background color or constraint */
if ((constflag) && ((bcolor == NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS))) {
- unsigned char cp[4];
+ uchar cp[4];
if (constflag & PCHAN_HAS_TARGET) rgba_char_args_set((char *)cp, 255, 150, 0, 255);
else if (constflag & PCHAN_HAS_IK) rgba_char_args_set((char *)cp, 255, 255, 0, 255);
else if (constflag & PCHAN_HAS_SPLINEIK) rgba_char_args_set((char *)cp, 200, 255, 0, 255);
@@ -695,7 +695,7 @@ static bool set_pchan_color(short colCode, const int boneflag, const short const
else {
if (bcolor) {
const char *cp = bcolor->solid;
- rgb_uchar_to_float(fcolor, (unsigned char *)cp);
+ rgb_uchar_to_float(fcolor, (uchar *)cp);
fcolor[3] = 204.f / 255.f;
}
else {
@@ -1588,7 +1588,7 @@ static void draw_armature_edit(Object *ob)
/* Draw names of bone */
if (show_text && (arm->flag & ARM_DRAWNAMES)) {
- unsigned char color[4];
+ uchar color[4];
UI_GetThemeColor4ubv((eBone->flag & BONE_SELECTED) ? TH_TEXT_HI : TH_TEXT, color);
float vec[3];
@@ -1702,7 +1702,7 @@ static void draw_armature_pose(Object *ob, const float const_color[4])
/* Draw names of bone */
if (show_text && (arm->flag & ARM_DRAWNAMES)) {
- unsigned char color[4];
+ uchar color[4];
UI_GetThemeColor4ubv((arm->flag & ARM_POSEMODE) &&
(bone->flag & BONE_SELECTED) ? TH_TEXT_HI : TH_TEXT, color);
float vec[3];
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index a8d2c2a3642..a6a0472fe86 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -2985,7 +2985,7 @@ Gwn_Batch *DRW_cache_particles_get_prim(int type)
case PART_DRAW_CROSS:
if (!SHC.drw_particle_cross) {
static Gwn_VertFormat format = { 0 };
- static unsigned pos_id, axis_id;
+ static uint pos_id, axis_id;
if (format.attrib_ct == 0) {
pos_id = GWN_vertformat_attr_add(&format, "inst_pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
@@ -3032,7 +3032,7 @@ Gwn_Batch *DRW_cache_particles_get_prim(int type)
case PART_DRAW_AXIS:
if (!SHC.drw_particle_axis) {
static Gwn_VertFormat format = { 0 };
- static unsigned pos_id, axis_id;
+ static uint pos_id, axis_id;
if (format.attrib_ct == 0) {
pos_id = GWN_vertformat_attr_add(&format, "inst_pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
@@ -3083,7 +3083,7 @@ Gwn_Batch *DRW_cache_particles_get_prim(int type)
int axis = -1;
static Gwn_VertFormat format = { 0 };
- static unsigned pos_id, axis_id;
+ static uint pos_id, axis_id;
if (format.attrib_ct == 0) {
pos_id = GWN_vertformat_attr_add(&format, "inst_pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
@@ -3128,8 +3128,8 @@ Gwn_Batch *DRW_cache_cursor_get(bool crosshair_lines)
const int vert_ct = segments + 8;
const int index_ct = vert_ct + 5;
- unsigned char red[3] = {255, 0, 0};
- unsigned char white[3] = {255, 255, 255};
+ uchar red[3] = {255, 0, 0};
+ uchar white[3] = {255, 255, 255};
static Gwn_VertFormat format = { 0 };
static struct { uint pos, color; } attr_id;
@@ -3161,7 +3161,7 @@ Gwn_Batch *DRW_cache_cursor_get(bool crosshair_lines)
GWN_indexbuf_add_generic_vert(&elb, 0);
if (crosshair_lines) {
- unsigned char crosshair_color[3];
+ uchar crosshair_color[3];
UI_GetThemeColor3ubv(TH_VIEW_OVERLAY, crosshair_color);
GWN_indexbuf_add_primitive_restart(&elb);
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index eafcfb007e7..198518cd887 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -116,10 +116,10 @@ typedef struct EdgeAdjacentVerts {
} EdgeAdjacentVerts;
typedef struct EdgeDrawAttr {
- unsigned char v_flag;
- unsigned char e_flag;
- unsigned char crease;
- unsigned char bweight;
+ uchar v_flag;
+ uchar e_flag;
+ uchar crease;
+ uchar bweight;
} EdgeDrawAttr;
typedef struct MeshRenderData {
@@ -1349,9 +1349,9 @@ enum {
* (see gpu_shader_edit_mesh_overlay_geom.glsl) */
};
-static unsigned char mesh_render_data_looptri_flag(MeshRenderData *rdata, const BMFace *efa)
+static uchar mesh_render_data_looptri_flag(MeshRenderData *rdata, const BMFace *efa)
{
- unsigned char fflag = 0;
+ uchar fflag = 0;
if (efa == rdata->efa_act)
fflag |= VFLAG_FACE_ACTIVE;
@@ -1397,10 +1397,10 @@ static void mesh_render_data_edge_flag(
}
}
-static unsigned char mesh_render_data_vertex_flag(MeshRenderData *rdata, const BMVert *eve)
+static uchar mesh_render_data_vertex_flag(MeshRenderData *rdata, const BMVert *eve)
{
- unsigned char vflag = 0;
+ uchar vflag = 0;
/* Current vertex */
if (eve == rdata->eve_act)
@@ -1417,8 +1417,8 @@ static void add_overlay_tri(
const uint pos_id, const uint vnor_id, const uint lnor_id, const uint data_id,
const BMLoop **bm_looptri, const int base_vert_idx)
{
- unsigned char fflag;
- unsigned char vflag;
+ uchar fflag;
+ uchar vflag;
if (vbo_pos) {
/* TODO(sybren): deduplicate this and all the other places it's pasted to in this file. */
@@ -1528,7 +1528,7 @@ static void add_overlay_loose_vert(
}
if (vbo_data) {
- unsigned char vflag[4] = {0, 0, 0, 0};
+ uchar vflag[4] = {0, 0, 0, 0};
vflag[0] = mesh_render_data_vertex_flag(rdata, eve);
GWN_vertbuf_attr_set(vbo_data, data_id, base_vert_idx, vflag);
}
@@ -2886,7 +2886,7 @@ static Gwn_VertBuf *mesh_batch_cache_get_vert_pos_and_nor_in_order(
static Gwn_VertFormat *edit_mesh_overlay_pos_format(uint *r_pos_id)
{
static Gwn_VertFormat format_pos = { 0 };
- static unsigned pos_id;
+ static uint pos_id;
if (format_pos.attrib_ct == 0) {
pos_id = GWN_vertformat_attr_add(&format_pos, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
}
@@ -2898,7 +2898,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 unsigned vnor_id, vnor_loop_id, lnor_id;
+ static uint vnor_id, vnor_loop_id, lnor_id;
if (format_nor.attrib_ct == 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);
@@ -2918,7 +2918,7 @@ static Gwn_VertFormat *edit_mesh_overlay_nor_format(uint *r_vnor_id, uint *r_lno
static Gwn_VertFormat *edit_mesh_overlay_data_format(uint *r_data_id)
{
static Gwn_VertFormat format_flag = { 0 };
- static unsigned data_id;
+ static uint data_id;
if (format_flag.attrib_ct == 0) {
data_id = GWN_vertformat_attr_add(&format_flag, "data", GWN_COMP_U8, 4, GWN_FETCH_INT);
}
@@ -3420,7 +3420,7 @@ static Gwn_VertBuf *mesh_batch_cache_create_edges_overlay_texture_buf(MeshRender
int j, j_next;
for (j = 2, j_next = 0; j_next < 3; j = j_next++) {
MEdge *ed = &medge[mloop[mlt->tri[j]].e];
- unsigned int tri_edge[2] = {mloop[mlt->tri[j]].v, mloop[mlt->tri[j_next]].v};
+ uint tri_edge[2] = {mloop[mlt->tri[j]].v, mloop[mlt->tri[j_next]].v};
if (((ed->v1 == tri_edge[0]) && (ed->v2 == tri_edge[1])) ||
((ed->v1 == tri_edge[1]) && (ed->v2 == tri_edge[0])))
diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c
index 28693b47c89..3cf47fb5e25 100644
--- a/source/blender/draw/intern/draw_cache_impl_particles.c
+++ b/source/blender/draw/intern/draw_cache_impl_particles.c
@@ -263,7 +263,7 @@ static void ensure_seg_pt_count(
}
}
-static void particle_pack_mcol(MCol *mcol, unsigned short r_scol[3])
+static void particle_pack_mcol(MCol *mcol, ushort r_scol[3])
{
/* Convert to linear ushort and swizzle */
r_scol[0] = unit_float_to_ushort_clamp(BLI_color_from_srgb_table[mcol->b]);
@@ -573,7 +573,7 @@ static int particle_batch_cache_fill_segments(
}
for (int k = 0; k < num_col_layers; k++) {
/* TODO Put the conversion outside the loop */
- unsigned short scol[4];
+ ushort scol[4];
particle_pack_mcol(
(is_simple && is_child) ?
&(*r_parent_mcol)[psys->child[i].parent][k] : &mcol[k],
@@ -600,7 +600,7 @@ static int particle_batch_cache_fill_segments(
}
for (int k = 0; k < num_col_layers; k++) {
/* TODO Put the conversion outside the loop */
- unsigned short scol[4];
+ ushort scol[4];
particle_pack_mcol(
(is_simple && is_child) ?
&(*r_parent_mcol)[psys->child[i].parent][k] : &mcol[k],
@@ -734,7 +734,7 @@ static int particle_batch_cache_fill_strands_data(
copy_v2_v2(t_uv, uv[k]);
}
for (int k = 0; k < num_col_layers; k++) {
- unsigned short *scol = (unsigned short *)GWN_vertbuf_raw_step(col_step + k);
+ ushort *scol = (ushort *)GWN_vertbuf_raw_step(col_step + k);
particle_pack_mcol(
(is_simple && is_child) ?
&(*r_parent_mcol)[psys->child[i].parent][k] : &mcol[k],
@@ -1196,7 +1196,7 @@ static void particle_batch_cache_ensure_pos(
}
static Gwn_VertFormat format = { 0 };
- static unsigned pos_id, rot_id, val_id;
+ static uint pos_id, rot_id, val_id;
int i, curr_point;
ParticleData *pa;
ParticleKey state;
@@ -1420,7 +1420,7 @@ static void particle_batch_cache_ensure_edit_inner_pos(
}
static Gwn_VertFormat format = { 0 };
- static unsigned pos_id, color_id;
+ static uint pos_id, color_id;
GWN_VERTBUF_DISCARD_SAFE(cache->edit_inner_pos);
@@ -1491,7 +1491,7 @@ static void particle_batch_cache_ensure_edit_tip_pos(
}
static Gwn_VertFormat format = { 0 };
- static unsigned pos_id, color_id;
+ static uint pos_id, color_id;
GWN_VERTBUF_DISCARD_SAFE(cache->edit_tip_pos);
diff --git a/source/blender/draw/intern/draw_hair_private.h b/source/blender/draw/intern/draw_hair_private.h
index 2e6c9a0d3c1..28993614688 100644
--- a/source/blender/draw/intern/draw_hair_private.h
+++ b/source/blender/draw/intern/draw_hair_private.h
@@ -31,7 +31,7 @@
#define __DRAW_HAIR_PRIVATE_H__
#define MAX_LAYER_NAME_CT 3 /* u0123456789, u, a0123456789 */
-#define MAX_LAYER_NAME_LEN DECIMAL_DIGITS_BOUND(unsigned int) + 2
+#define MAX_LAYER_NAME_LEN DECIMAL_DIGITS_BOUND(uint) + 2
#define MAX_THICKRES 2 /* see eHairType */
#define MAX_HAIR_SUBDIV 4 /* see hair_subdiv rna */
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h
index e811e9ea8a9..91a30fa45ae 100644
--- a/source/blender/draw/intern/draw_manager.h
+++ b/source/blender/draw/intern/draw_manager.h
@@ -106,8 +106,8 @@ typedef struct DRWCallState {
DRWCallVisibilityFn *visibility_cb;
void *user_data;
- unsigned char flag;
- unsigned char cache_id; /* Compared with DST.state_cache_id to see if matrices are still valid. */
+ uchar flag;
+ uchar cache_id; /* Compared with DST.state_cache_id to see if matrices are still valid. */
uint16_t matflag; /* Which matrices to compute. */
/* Culling: Using Bounding Sphere for now for faster culling.
* Not ideal for planes. */
@@ -308,7 +308,7 @@ typedef struct DRWManager {
DRWInstanceData *object_instance_data[MAX_INSTANCE_DATA_SIZE];
/* State of the object being evaluated if already allocated. */
DRWCallState *ob_state;
- unsigned char state_cache_id; /* Could be larger but 254 view changes is already a lot! */
+ uchar state_cache_id; /* Could be larger but 254 view changes is already a lot! */
/* Rendering state */
GPUShader *shader;
diff --git a/source/blender/draw/intern/draw_manager_text.c b/source/blender/draw/intern/draw_manager_text.c
index 1f385b958b8..977374a00c5 100644
--- a/source/blender/draw/intern/draw_manager_text.c
+++ b/source/blender/draw/intern/draw_manager_text.c
@@ -46,7 +46,7 @@ typedef struct ViewCachedString {
struct ViewCachedString *next, *prev;
float vec[3];
union {
- unsigned char ub[4];
+ uchar ub[4];
int pack;
} col;
short sco[2];
@@ -79,7 +79,7 @@ void DRW_text_cache_add(
const float co[3],
const char *str, const int str_len,
short xoffs, short flag,
- const unsigned char col[4])
+ const uchar col[4])
{
int alloc_len;
ViewCachedString *vos;
diff --git a/source/blender/draw/intern/draw_manager_text.h b/source/blender/draw/intern/draw_manager_text.h
index a675a200924..14c33be4cf8 100644
--- a/source/blender/draw/intern/draw_manager_text.h
+++ b/source/blender/draw/intern/draw_manager_text.h
@@ -34,7 +34,7 @@ void DRW_text_cache_add(
const float co[3],
const char *str, const int str_len,
short xoffs, short flag,
- const unsigned char col[4]);
+ const uchar col[4]);
void DRW_text_cache_draw(struct DRWTextStore *dt, struct ARegion *ar);
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 347932619b9..cab796a62d3 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -116,7 +116,7 @@ static int gridline_count(ARegion *ar, double x0, double y0, double dx)
static bool drawgrid_draw(
ARegion *ar, double x0, double y0, double dx, int skip_mod,
- unsigned pos, unsigned col, GLubyte col_value[3])
+ uint pos, uint col, GLubyte col_value[3])
{
/* skip every skip_mod lines relative to each axis; they will be overlaid by another drawgrid_draw
* always skip exact x0 & y0 axes; they will be drawn later in color
@@ -220,7 +220,7 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **
immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
- unsigned char col[3], col2[3];
+ uchar col[3], col2[3];
UI_GetThemeColor3ubv(TH_GRID, col);
if (unit->system) {
@@ -369,17 +369,17 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit)
bool show_axis_y = (v3d->gridflag & V3D_SHOW_Y) != 0;
bool show_axis_z = (v3d->gridflag & V3D_SHOW_Z) != 0;
- unsigned char col_grid[3], col_axis[3];
+ uchar col_grid[3], col_axis[3];
glLineWidth(1.0f);
UI_GetThemeColor3ubv(TH_GRID, col_grid);
if (show_floor) {
- const unsigned vertex_ct = 2 * (gridlines * 4 + 2);
+ const uint vertex_ct = 2 * (gridlines * 4 + 2);
const int sublines = v3d->gridsubdiv;
- unsigned char col_bg[3], col_grid_emphasise[3], col_grid_light[3];
+ uchar col_bg[3], col_grid_emphasise[3], col_grid_light[3];
Gwn_VertFormat *format = immVertexFormat();
uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
@@ -583,9 +583,9 @@ void DRW_draw_background(void)
glDisable(GL_DEPTH_TEST);
Gwn_VertFormat *format = immVertexFormat();
- unsigned pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
- unsigned color = GWN_vertformat_attr_add(format, "color", GWN_COMP_U8, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
- unsigned char col_hi[3], col_lo[3];
+ uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
+ uint color = GWN_vertformat_attr_add(format, "color", GWN_COMP_U8, 3, GWN_FETCH_INT_TO_FLOAT_UNIT);
+ uchar col_hi[3], col_lo[3];
gpuPushMatrix();
gpuLoadIdentity();
diff --git a/source/blender/draw/modes/edit_mesh_mode_text.c b/source/blender/draw/modes/edit_mesh_mode_text.c
index def96e79eba..56a015d0e6b 100644
--- a/source/blender/draw/modes/edit_mesh_mode_text.c
+++ b/source/blender/draw/modes/edit_mesh_mode_text.c
@@ -63,7 +63,7 @@ void DRW_edit_mesh_mode_text_measure_stats(
char numstr[32]; /* Stores the measurement display text here */
size_t numstr_len;
const char *conv_float; /* Use a float conversion matching the grid size */
- unsigned char col[4] = {0, 0, 0, 255}; /* color of the text to draw */
+ uchar col[4] = {0, 0, 0, 255}; /* color of the text to draw */
float area; /* area of the face */
float grid = unit->system ? unit->scale_length : v3d->grid;
const bool do_split = (unit->flag & USER_UNIT_OPT_SPLIT) != 0;
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 17e4a7b15ce..da44d9d8c0b 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -2272,7 +2272,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
if ((ob->dtx & OB_DRAWNAME) && DRW_state_show_text()) {
struct DRWTextStore *dt = DRW_text_cache_ensure();
- unsigned char color[4];
+ uchar color[4];
UI_GetThemeColor4ubv(theme_id, color);
DRW_text_cache_add(