const unsigned int ResourceManagerDX9::CreateVertexFormat(
	const unsigned int attributeCount, const VertexAttributeUsage usage,
	const VertexAttributeType type, const unsigned int usageIdx, ...)
{
	VertexFormat* vf = new VertexFormatDX9(attributeCount);
	unsigned int offset = 0;

	vf->SetAttribute(0, offset, usage, type, usageIdx);
	offset += VertexFormat::GetAttributeTypeSize(type);

	va_list args;
	va_start(args, usageIdx);
	for (unsigned int i = 1, n = vf->GetAttributeCount(); i < n; i++)
	{
		VertexAttributeUsage tempUsage = va_arg(args, VertexAttributeUsage);
		VertexAttributeType tempType = va_arg(args, VertexAttributeType);
		unsigned int tempUsageIdx = va_arg(args, unsigned int);
		vf->SetAttribute(i, offset, tempUsage, tempType, tempUsageIdx);
		offset += VertexFormat::GetAttributeTypeSize(tempType);
	}
	va_end(args);

	vf->SetStride(offset);

	m_arrVertexFormat.push_back(vf);
	return (unsigned int)m_arrVertexFormat.size() - 1;
}