diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-03 10:59:06 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-03 10:59:06 +0300 |
commit | 2bfa061a15762e93f0391e3348f58bcfa512d8fc (patch) | |
tree | b3d51e85572e3272c1e0a4c1817d011f61f81386 /source/blender/blenkernel/intern/subsurf_ccg.c | |
parent | 21369429168c5799125a63ef728947f4fd6668e9 (diff) | |
parent | 2b3ff61d805ccbb219e773e1a5c69e02b0c90109 (diff) |
Merge branch 'master' into blender2.8
Notes:
- Changes in paint_vertex.c were simple to merge, mainly related on passing
evaluation context.
- Conflicts in EditDM and drawmesh.c are solved using code from blender2.8
branch. Those areas are deprecated and not to be used in final release.
However, it's possible that some reference code from master is lost, so
keep attention when adding alpha support for vertex painting.
Diffstat (limited to 'source/blender/blenkernel/intern/subsurf_ccg.c')
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 764df797ef6..d461e03fcda 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2199,12 +2199,12 @@ 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_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]); + copy_v4_v4_uchar(&varray[start + 0], &mloopcol[iface * 16 + 0]); + copy_v4_v4_uchar(&varray[start + 4], &mloopcol[iface * 16 + 12]); + copy_v4_v4_uchar(&varray[start + 8], &mloopcol[iface * 16 + 8]); + copy_v4_v4_uchar(&varray[start + 12], &mloopcol[iface * 16 + 4]); - start += 12; + start += 16; iface++; } } @@ -3544,16 +3544,16 @@ static void ccgDM_drawMappedFaces(DerivedMesh *dm, float *c = CCG_grid_elem_co(&key, faceGridData, x + 1, y + 1); float *d = CCG_grid_elem_co(&key, faceGridData, x, y + 1); - if (cp) glColor3ubv(&cp[4]); + if (cp) glColor4ubv(&cp[4]); glNormal3fv(ln[1]); glVertex3fv(d); - if (cp) glColor3ubv(&cp[8]); + if (cp) glColor4ubv(&cp[8]); glNormal3fv(ln[2]); glVertex3fv(c); - if (cp) glColor3ubv(&cp[12]); + if (cp) glColor4ubv(&cp[12]); glNormal3fv(ln[3]); glVertex3fv(b); - if (cp) glColor3ubv(&cp[0]); + if (cp) glColor4ubv(&cp[0]); glNormal3fv(ln[0]); glVertex3fv(a); @@ -3571,10 +3571,10 @@ static void ccgDM_drawMappedFaces(DerivedMesh *dm, a = CCG_grid_elem(&key, faceGridData, x, y + 0); b = CCG_grid_elem(&key, faceGridData, x, y + 1); - if (cp) glColor3ubv(&cp[0]); + if (cp) glColor4ubv(&cp[0]); glNormal3fv(CCG_elem_no(&key, a)); glVertex3fv(CCG_elem_co(&key, a)); - if (cp) glColor3ubv(&cp[4]); + if (cp) glColor4ubv(&cp[4]); glNormal3fv(CCG_elem_no(&key, b)); glVertex3fv(CCG_elem_co(&key, b)); @@ -3586,10 +3586,10 @@ static void ccgDM_drawMappedFaces(DerivedMesh *dm, a = CCG_grid_elem(&key, faceGridData, x, y + 0); b = CCG_grid_elem(&key, faceGridData, x, y + 1); - if (cp) glColor3ubv(&cp[12]); + if (cp) glColor4ubv(&cp[12]); glNormal3fv(CCG_elem_no(&key, a)); glVertex3fv(CCG_elem_co(&key, a)); - if (cp) glColor3ubv(&cp[8]); + if (cp) glColor4ubv(&cp[8]); glNormal3fv(CCG_elem_no(&key, b)); glVertex3fv(CCG_elem_co(&key, b)); @@ -3609,13 +3609,13 @@ static void ccgDM_drawMappedFaces(DerivedMesh *dm, ccgDM_glNormalFast(a, b, c, d); - if (cp) glColor3ubv(&cp[4]); + if (cp) glColor4ubv(&cp[4]); glVertex3fv(d); - if (cp) glColor3ubv(&cp[8]); + if (cp) glColor4ubv(&cp[8]); glVertex3fv(c); - if (cp) glColor3ubv(&cp[12]); + if (cp) glColor4ubv(&cp[12]); glVertex3fv(b); - if (cp) glColor3ubv(&cp[0]); + if (cp) glColor4ubv(&cp[0]); glVertex3fv(a); if (cp) cp += 16; |