gamnit: cache sprite GPU index, as index_of is very costly