modifed processDrawArrayLengths to use index counts