private void ReleaseBuffers()
    {
        if (scratchParticlePositionsBuffer != null)
        {
            scratchParticlePositionsBuffer.Release();
            scratchParticlePositionsBuffer = null;
        }

        if (neighborhoodsBuffer != null)
        {
            neighborhoodsBuffer.Release();
            neighborhoodsBuffer = null;
        }

        if (spatializationVoxelsBuffer != null)
        {
            spatializationVoxelsBuffer.Release();
            spatializationVoxelsBuffer = null;
        }

        voxelParticlePairBuffers.ReleaseBuffers();

        if (DebugLoggingEnabled)
        {
            Debug.LogFormat("Compute buffers released.");
        }
    }
示例#2
0
    private void ReleaseBuffers()
    {
        if (swarmerModelVerticesBuffer != null)
        {
            swarmerModelVerticesBuffer.Release();
            swarmerModelVerticesBuffer = null;

            allocatedModelColorationType = null;
            allocatedModelShapeType      = null;
        }

        if (DebugLoggingEnabled)
        {
            Debug.LogFormat("Compute buffers released.");
        }
    }