void VertexBuffer::addAttribute(unsigned int id, unsigned int components, int offset) { Attribute a; a.id = id; a.components = components; a.offset = offset; mAttributes.push_back(a); calculateStride(); }
VertexLayout::Impl::Impl(Attributes& attributes) : attributes(attributes) , stride(calculateStride(this->attributes)) {}