Beispiel #1
0
        public void ApplyShaderResources()
        {
            var vs = (CargoEngine.Shader.VertexShader)VertexShader.Shader;

            if (vs != null && InputAssembler.DesiredState.InputElements.NeedUpdate)
            {
                var il = vs.GetInputLayout(InputAssembler.InputElements);
                DevContext.InputAssembler.InputLayout           = il;
                InputAssembler.CurrentState.InputElements.State = InputAssembler.DesiredState.InputElements.State;
                InputAssembler.DesiredState.InputElements.ResetTracking();
            }

            InputAssembler.ApplyDesiredState(DevContext, ParameterManager);

            VertexShader.ApplyDesiredState(DevContext, ParameterManager);

            PixelShader.ApplyDesiredState(DevContext, ParameterManager);

            Rasterizer.ApplyDesiredState(DevContext, ParameterManager);
        }