- unsigned max_attribs = DeviceInfo::get_global().limits.max_vertex_attributes;
-
- for(VertexAttribute a: fmt)
- if(get_attribute_semantic(a)>=max_attribs)
- return false;
-
- return true;
+ static unsigned max_attribs = DeviceInfo::get_global().limits.max_vertex_attributes;
+ return all_of(fmt.begin(), fmt.end(), [](VertexAttribute a){ return get_attribute_semantic(a)<max_attribs; });