private void PushParticlesToGPU(IntPtr solverPtr, FlexContainer cnt, Flex.Memory memory) { Flex.SetActive(solverPtr, cnt.m_activeSetHndl.AddrOfPinnedObject(), cnt.m_activeParticlesCount, memory); Flex.SetParticles(solverPtr, cnt.m_particlesHndl.AddrOfPinnedObject(), cnt.m_particlesCount, memory); Flex.SetRestParticles(solverPtr, cnt.m_restParticlesHndl.AddrOfPinnedObject(), cnt.m_particlesCount, memory); Flex.SetVelocities(solverPtr, cnt.m_velocitiesHndl.AddrOfPinnedObject(), cnt.m_particlesCount, memory); Flex.SetNormals(solverPtr, cnt.m_normalsHndl.AddrOfPinnedObject(), cnt.m_particlesCount, memory); Flex.SetPhases(solverPtr, cnt.m_phases, cnt.m_particlesCount, memory); }