diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-03 16:55:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-03 16:57:02 +0300 |
commit | dab20bd41ff9b2545952fa8715e2467b22900133 (patch) | |
tree | b1cadd76ff830b95b20033f990d9d685750dd726 /source/blender/blenkernel/intern/DerivedMesh.c | |
parent | 94b99949eb20d630e222642a7e7db5ea4d43ef12 (diff) |
Fix T54211: OpenGL debug error message in texture draw mode.
Quite harmless and won't be a problem in 2.8.
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-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 26aecb526d4..15469e3ae4b 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -3910,17 +3910,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); + } } } |