예제 #1
0
            public void AppendCustomizationPoint(CustomizationPoint customizationPoint, Rendering.ShaderType stageType)
            {
                List <StageElement> stageElements = GetElementsForStage(stageType);

                if (stageElements == null)
                {
                    throw new Exception($"Stage {stageType} is not valid.");
                }

                // Make sure the customization point hasn't been added multiple times.
                var element = stageElements.Find((e) => (e.CustomizationPoint == customizationPoint));

                if (element != null)
                {
                    throw new Exception($"Customization point {customizationPoint.Name} cannot be added to a stage multiple times.");
                }

                stageElements.Add(new StageElement {
                    CustomizationPoint = customizationPoint
                });
            }
 public Builder(ShaderContainer container, CustomizationPoint customizationPoint)
 {
     this.container          = container;
     this.customizationPoint = customizationPoint;
 }