[Bf-blender-cvs] [6e7b4ed] compositor-2016: Fix wrong vertex colors in edit mode
Sergey Sharybin
noreply at git.blender.org
Wed Jun 8 21:52:07 CEST 2016
Commit: 6e7b4edab63f4ffe986d6b327aa9bfedab15fd0c
Author: Sergey Sharybin
Date: Wed Jun 1 11:52:31 2016 +0200
Branches: compositor-2016
https://developer.blender.org/rB6e7b4edab63f4ffe986d6b327aa9bfedab15fd0c
Fix wrong vertex colors in edit mode
===================================================================
M source/blender/blenkernel/intern/editderivedmesh.c
===================================================================
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 0de4d1b..fbb5069 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -1452,15 +1452,15 @@ static void emdm_pass_attrib_vertex_glsl(const DMVertexAttribs *attribs, const B
glUniform1i(attribs->tface[i].gl_info_index, 0);
}
for (i = 0; i < attribs->totmcol; i++) {
- GLubyte col[4];
+ float 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_uchar(col, &cp->r);
+ rgba_uchar_to_float(col, &cp->r);
}
else {
- col[0] = 0; col[1] = 0; col[2] = 0; col[3] = 0;
+ col[0] = 0.0f; col[1] = 0.0f; col[2] = 0.0f; col[3] = 0.0f;
}
- glVertexAttrib4ubv(attribs->mcol[i].gl_index, col);
+ glVertexAttrib4fv(attribs->mcol[i].gl_index, col);
glUniform1i(attribs->mcol[i].gl_info_index, GPU_ATTR_INFO_SRGB);
}
More information about the Bf-blender-cvs
mailing list