diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-03 16:58:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-03 16:58:14 +0300 |
commit | 2adece9fbb60227fc326926a7fa52aba02c5a56e (patch) | |
tree | 760be9f5d0908695b8cf6b6c1aab0e3b2d93bff1 /source/blender/blenkernel | |
parent | 8d575899a17f12681beb9bdb3f7d3005d6d12103 (diff) | |
parent | dab20bd41ff9b2545952fa8715e2467b22900133 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 67463ffe915..3001b1f05d5 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -3489,17 +3489,25 @@ void DM_draw_attrib_vertex_uniforms(const DMVertexAttribs *attribs) { int i; if (attribs->totorco) { - glUniform1i(attribs->orco.gl_info_index, 0); + if (attribs->orco.gl_info_index != -1) { + glUniform1i(attribs->orco.gl_info_index, 0); + } } for (i = 0; i < attribs->tottface; i++) { - glUniform1i(attribs->tface[i].gl_info_index, 0); + if (attribs->tface[i].gl_info_index != -1) { + glUniform1i(attribs->tface[i].gl_info_index, 0); + } } for (i = 0; i < attribs->totmcol; i++) { - glUniform1i(attribs->mcol[i].gl_info_index, GPU_ATTR_INFO_SRGB); + if (attribs->mcol[i].gl_info_index != -1) { + glUniform1i(attribs->mcol[i].gl_info_index, GPU_ATTR_INFO_SRGB); + } } for (i = 0; i < attribs->tottang; i++) { - glUniform1i(attribs->tang[i].gl_info_index, 0); + if (attribs->tang[i].gl_info_index != -1) { + glUniform1i(attribs->tang[i].gl_info_index, 0); + } } } |