Exemple #1
0
    public void CollectMaterialUniforms(
        Material inoutMaterial)
    {
        if (IsCollecting)
        {
            throw new InvalidOperationException();
        }

        currentCollectionMaterial = inoutMaterial;

        if (CollectingShaderUniforms != null)
        {
            var eventArgs = new CollectingAudioShaderUniformsEventArgs();
            eventArgs.UniformAccessor = this;

            CollectingShaderUniforms(this, eventArgs);
        }

        currentCollectionMaterial = null;

        if (IsCollecting)
        {
            throw new InvalidOperationException();
        }
    }
 private void OnCollectingShaderUniforms(
     object sender,
     CollectingAudioShaderUniformsEventArgs eventArgs)
 {
     CollectShaderUniformValue(eventArgs.UniformAccessor);
 }