Пример #1
0
        public void Update()
        {
            UpdateRuntimeBuffers();
            SetParams();

            for (var j = 0; j < data.Iterations; j++)
            {
                wraper.DispatchKernel(integrateKernel, bodiesThreadGroupsNum, 1, 1);

                wraper.DispatchKernel(collisionsKernel, bodiesThreadGroupsNum, 1, 1);
                UpdateDistanceJoints();

                wraper.DispatchKernel(pointJointsKernel, bodiesThreadGroupsNum, 1, 1);
            }
        }
Пример #2
0
        public void Update()
        {
            UpdateRuntimeBuffers();
            SetParams();

            //if(assignBuffers)
            wraper.DispatchKernel(bodyBroadKernel, bodiesThreadGroupsNum, 1, 1, assignBuffers);

            for (var j = 0; j < data.Iterations; j++)
            {
                wraper.DispatchKernel(integrateKernel, bodiesThreadGroupsNum, 1, 1, assignBuffers);

                UpdateDistanceJoints();
                wraper.DispatchKernel(collisionsKernel, bodiesThreadGroupsNum, 1, 1, assignBuffers);

                wraper.DispatchKernel(pointJointsKernel, bodiesThreadGroupsNum, 1, 1, assignBuffers);
                wraper.DispatchKernel(bodyNarrowKernel, bodiesThreadGroupsNum, 1, 1, assignBuffers);

                assignBuffers = false;
            }
        }