コード例 #1
0
    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
ファイル: SwarmerModel.cs プロジェクト: AustinSpafford/myriad
    private void ReleaseBuffers()
    {
        if (swarmerModelVerticesBuffer != null)
        {
            swarmerModelVerticesBuffer.Release();
            swarmerModelVerticesBuffer = null;

            allocatedModelColorationType = null;
            allocatedModelShapeType      = null;
        }

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