Пример #1
0
	void attrib_values(vertex_attrib_kind attr, const span<float>& dest)
	override
	{
		delegated_gen::attrib_values(attr, dest);

		if(attr == vertex_attrib_kind::position)
		{
			for(unsigned v=0, n=vertex_count(); v<n; ++v)
			for(unsigned c=0, m=values_per_vertex(attr); c<m; ++c)
			{
				dest[v*m+c] += _d[c];
			}
		}
	}
Пример #2
0
	unsigned value_count(vertex_attrib_kind attr)
	{
		return vertex_count()*values_per_vertex(attr);
	}