Exemple #1
0
	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();
	}
Exemple #2
0
VertexLayout::Impl::Impl(Attributes& attributes)
    : attributes(attributes)
    , stride(calculateStride(this->attributes)) {}