diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 20 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 10 |
4 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index e71cfca4e5b..4cf9885c716 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1561,8 +1561,8 @@ void DM_update_weight_mcol( ml = mloop + mp->loopstart; for (j = 0; j < mp->totloop; j++, ml++, l_index++) { - copy_v4_v4_char((char *)&wtcol_l[l_index], - (char *)&wtcol_v[ml->v]); + copy_v4_v4_uchar(&wtcol_l[l_index][0], + &wtcol_v[ml->v][0]); } } MEM_freeN(wtcol_v); @@ -3453,7 +3453,7 @@ void DM_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert, if (attribs->mcol[b].array) { const MLoopCol *cp = &attribs->mcol[b].array[loop]; - copy_v4_v4_char((char *)col, &cp->r); + copy_v4_v4_uchar(col, &cp->r); } else { col[0] = 0; col[1] = 0; col[2] = 0; col[3] = 0; diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 7c3287e6934..989e5e3a624 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -967,7 +967,7 @@ static void cdDM_drawMappedFacesGLSL( int *mat_orig_to_new; int tot_active_mat; GPUBuffer *buffer = NULL; - char *varray; + unsigned char *varray; size_t max_element_size = 0; int tot_loops = 0; @@ -1072,7 +1072,7 @@ static void cdDM_drawMappedFacesGLSL( if (matconv[i].attribs.mcol[b].array) { const MLoopCol *mloopcol = matconv[i].attribs.mcol[b].array; for (j = 0; j < mpoly->totloop; j++) - copy_v4_v4_char((char *)&varray[offset + j * max_element_size], &mloopcol[mpoly->loopstart + j].r); + copy_v4_v4_uchar(&varray[offset + j * max_element_size], &mloopcol[mpoly->loopstart + j].r); offset += sizeof(unsigned char) * 4; } } @@ -1482,7 +1482,7 @@ static void cdDM_buffer_copy_mcol( for (i = 0; i < totpoly; i++, mpoly++) { for (j = 0; j < mpoly->totloop; j++) { - copy_v3_v3_char((char *)&varray[start], &mloopcol[mpoly->loopstart + j].r); + copy_v3_v3_uchar(&varray[start], &mloopcol[mpoly->loopstart + j].r); start += 3; } } diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 840935c090b..88ae279050c 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -1248,7 +1248,7 @@ static void emdm_pass_attrib_vertex_glsl(const DMVertexAttribs *attribs, const B GLubyte col[4]; if (attribs->mcol[i].em_offset != -1) { const MLoopCol *cp = BM_ELEM_CD_GET_VOID_P(loop, attribs->mcol[i].em_offset); - copy_v4_v4_char((char *)col, &cp->r); + copy_v4_v4_uchar(col, &cp->r); } else { col[0] = 0; col[1] = 0; col[2] = 0; col[3] = 0; @@ -2170,8 +2170,8 @@ static void statvis_calc_overhang( rgb_float_to_uchar(r_face_colors[index], fcol); } else { - unsigned char *fallback = is_max ? col_fallback_max : col_fallback; - copy_v4_v4_char((char *)r_face_colors[index], (const char *)fallback); + const unsigned char *fallback = is_max ? col_fallback_max : col_fallback; + copy_v4_v4_uchar(r_face_colors[index], fallback); } } } @@ -2210,7 +2210,7 @@ static void statvis_calc_thickness( struct BMLoop *(*looptris)[3] = em->looptris; /* fallback */ - const char col_fallback[4] = {64, 64, 64, 255}; + const unsigned char col_fallback[4] = {64, 64, 64, 255}; struct BMBVHTree *bmtree; @@ -2305,7 +2305,7 @@ static void statvis_calc_thickness( rgb_float_to_uchar(r_face_colors[i], fcol); } else { - copy_v4_v4_char((char *)r_face_colors[i], (const char *)col_fallback); + copy_v4_v4_uchar(r_face_colors[i], col_fallback); } } } @@ -2357,7 +2357,7 @@ static void statvis_calc_intersect( index = BM_elem_index_get(f_hit); - copy_v3_v3_char((char *)r_face_colors[index], (const char *)col); + copy_v3_v3_uchar(r_face_colors[index], col); } } MEM_freeN(overlap); @@ -2382,7 +2382,7 @@ static void statvis_calc_distort( const float minmax_irange = 1.0f / (max - min); /* fallback */ - const char col_fallback[4] = {64, 64, 64, 255}; + const unsigned char col_fallback[4] = {64, 64, 64, 255}; /* now convert into global space */ BM_ITER_MESH_INDEX (f, &iter, bm, BM_FACES_OF_MESH, index) { @@ -2431,7 +2431,7 @@ static void statvis_calc_distort( rgb_float_to_uchar(r_face_colors[index], fcol); } else { - copy_v4_v4_char((char *)r_face_colors[index], (const char *)col_fallback); + copy_v4_v4_uchar(r_face_colors[index], col_fallback); } } } @@ -2453,7 +2453,7 @@ static void statvis_calc_sharp( int i; /* fallback */ - const char col_fallback[4] = {64, 64, 64, 255}; + const unsigned char col_fallback[4] = {64, 64, 64, 255}; (void)vertexCos; /* TODO */ @@ -2481,7 +2481,7 @@ static void statvis_calc_sharp( rgb_float_to_uchar(r_vert_colors[i], fcol); } else { - copy_v4_v4_char((char *)r_vert_colors[i], (const char *)col_fallback); + copy_v4_v4_uchar(r_vert_colors[i], col_fallback); } } } diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 509ca9cdd19..f351ce0ff41 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2167,7 +2167,7 @@ static void ccgDM_buffer_copy_color( CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm; CCGSubSurf *ss = ccgdm->ss; CCGKey key; - const char *mloopcol = user_data; + const unsigned char *mloopcol = user_data; int gridSize = ccgSubSurf_getGridSize(ss); int gridFaces = gridSize - 1; int i, totface = ccgSubSurf_getNumFaces(ss); @@ -2184,10 +2184,10 @@ static void ccgDM_buffer_copy_color( for (S = 0; S < numVerts; S++) { for (y = 0; y < gridFaces; y++) { for (x = 0; x < gridFaces; x++) { - copy_v3_v3_char((char *)&varray[start + 0], &mloopcol[iface * 16 + 0]); - copy_v3_v3_char((char *)&varray[start + 3], &mloopcol[iface * 16 + 12]); - copy_v3_v3_char((char *)&varray[start + 6], &mloopcol[iface * 16 + 8]); - copy_v3_v3_char((char *)&varray[start + 9], &mloopcol[iface * 16 + 4]); + copy_v3_v3_uchar(&varray[start + 0], &mloopcol[iface * 16 + 0]); + copy_v3_v3_uchar(&varray[start + 3], &mloopcol[iface * 16 + 12]); + copy_v3_v3_uchar(&varray[start + 6], &mloopcol[iface * 16 + 8]); + copy_v3_v3_uchar(&varray[start + 9], &mloopcol[iface * 16 + 4]); start += 12; iface++; |