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>2017-09-30 12:20:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-30 12:24:45 +0300
commit49c81e234a12cf119362ec23c0bd4ab10a35482d (patch)
treeff988094c6c2c6d3c4feb1dac5629459b62681c2 /source/blender/blenkernel/intern/editderivedmesh.c
parente3546a5097b1b30a3c694ce0f6b98c2f7e70510c (diff)
Fix vertex paint w/ subsurf drawing
Only use alpha blending when in vertex paint mode.
Diffstat (limited to 'source/blender/blenkernel/intern/editderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index d810dac7365..be8fcaa6863 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -1036,11 +1036,11 @@ static void emDM_drawMappedFaces(
if (poly_prev != GL_ZERO) glEnd();
glBegin((poly_prev = poly_type)); /* BMesh: will always be GL_TRIANGLES */
}
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[0]->v)]);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[1]->v)]);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[2]->v)]);
}
else {
@@ -1057,23 +1057,23 @@ static void emDM_drawMappedFaces(
if (!drawSmooth) {
glNormal3fv(polyNos[BM_elem_index_get(efa)]);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[0]->v)]);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[1]->v)]);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[2]->v)]);
}
else {
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[0])]);
else glNormal3fv(vertexNos[BM_elem_index_get(ltri[0]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[0]->v)]);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[1])]);
else glNormal3fv(vertexNos[BM_elem_index_get(ltri[1]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[1]->v)]);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[2])]);
else glNormal3fv(vertexNos[BM_elem_index_get(ltri[2]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[2]->v)]);
@@ -1138,11 +1138,11 @@ static void emDM_drawMappedFaces(
if (poly_prev != GL_ZERO) glEnd();
glBegin((poly_prev = poly_type)); /* BMesh: will always be GL_TRIANGLES */
}
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
glVertex3fv(ltri[0]->v->co);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
glVertex3fv(ltri[1]->v->co);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
glVertex3fv(ltri[2]->v->co);
}
else {
@@ -1159,23 +1159,23 @@ static void emDM_drawMappedFaces(
if (!drawSmooth) {
glNormal3fv(efa->no);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
glVertex3fv(ltri[0]->v->co);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
glVertex3fv(ltri[1]->v->co);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
glVertex3fv(ltri[2]->v->co);
}
else {
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[0])]);
else glNormal3fv(ltri[0]->v->no);
glVertex3fv(ltri[0]->v->co);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[1])]);
else glNormal3fv(ltri[1]->v->no);
glVertex3fv(ltri[1]->v->co);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[2])]);
else glNormal3fv(ltri[2]->v->no);
glVertex3fv(ltri[2]->v->co);
@@ -1298,32 +1298,32 @@ static void emDM_drawFacesTex_common(
glNormal3fv(polyNos[BM_elem_index_get(efa)]);
glTexCoord2fv(luv[0]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[0]->v)]);
glTexCoord2fv(luv[1]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[1]->v)]);
glTexCoord2fv(luv[2]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ltri[2]->v)]);
}
else {
glTexCoord2fv(luv[0]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[0])]);
else glNormal3fv(vertexNos[BM_elem_index_get(ltri[0]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[0]->v)]);
glTexCoord2fv(luv[1]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[1])]);
else glNormal3fv(vertexNos[BM_elem_index_get(ltri[1]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[1]->v)]);
glTexCoord2fv(luv[2]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[2])]);
else glNormal3fv(vertexNos[BM_elem_index_get(ltri[2]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[2]->v)]);
@@ -1362,32 +1362,32 @@ static void emDM_drawFacesTex_common(
glNormal3fv(efa->no);
glTexCoord2fv(luv[0]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
glVertex3fv(ltri[0]->v->co);
glTexCoord2fv(luv[1]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
glVertex3fv(ltri[1]->v->co);
glTexCoord2fv(luv[2]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
glVertex3fv(ltri[2]->v->co);
}
else {
glTexCoord2fv(luv[0]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[0]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[0]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[0])]);
else glNormal3fv(ltri[0]->v->no);
glVertex3fv(ltri[0]->v->co);
glTexCoord2fv(luv[1]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[1]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[1]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[1])]);
else glNormal3fv(ltri[1]->v->no);
glVertex3fv(ltri[1]->v->co);
glTexCoord2fv(luv[2]->uv);
- if (has_vcol_any) glColor3ubv((const GLubyte *)&(lcol[2]->r));
+ if (has_vcol_any) glColor4ubv((const GLubyte *)&(lcol[2]->r));
if (lnors) glNormal3fv(lnors[BM_elem_index_get(ltri[2])]);
else glNormal3fv(ltri[2]->v->no);
glVertex3fv(ltri[2]->v->co);