makeAttribute handles pos, color, tex attributes