diff --git a/include/igl/opengl/ViewerData.cpp b/include/igl/opengl/ViewerData.cpp index 8a90ebd567..37680fadf9 100644 --- a/include/igl/opengl/ViewerData.cpp +++ b/include/igl/opengl/ViewerData.cpp @@ -713,35 +713,23 @@ IGL_INLINE void igl::opengl::ViewerData::updateGL( if (meshgl.dirty & MeshGL::DIRTY_AMBIENT) { meshgl.V_ambient_vbo.resize(data.F.rows()*3,4); - for (unsigned i=0; i(); + per_corner(data.V_material_ambient,meshgl.V_ambient_vbo); } if (meshgl.dirty & MeshGL::DIRTY_DIFFUSE) { meshgl.V_diffuse_vbo.resize(data.F.rows()*3,4); - for (unsigned i=0; i(); + per_corner(data.V_material_diffuse,meshgl.V_diffuse_vbo); } if (meshgl.dirty & MeshGL::DIRTY_SPECULAR) { meshgl.V_specular_vbo.resize(data.F.rows()*3,4); - for (unsigned i=0; i(); + per_corner(data.V_material_specular,meshgl.V_specular_vbo); } if (meshgl.dirty & MeshGL::DIRTY_NORMAL) { meshgl.V_normals_vbo.resize(data.F.rows()*3,3); - for (unsigned i=0; i() : - data.V_normals.row(data.F(i,j)).cast(); - + per_corner(data.V_normals,meshgl.V_normals_vbo); if (invert_normals) meshgl.V_normals_vbo = -meshgl.V_normals_vbo;