当前位置: 首页>>代码示例>>C#>>正文


C# DX11RenderSettings类代码示例

本文整理汇总了C#中DX11RenderSettings的典型用法代码示例。如果您正苦于以下问题:C# DX11RenderSettings类的具体用法?C# DX11RenderSettings怎么用?C# DX11RenderSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DX11RenderSettings类属于命名空间,在下文中一共展示了DX11RenderSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                if (this.FPassLayerIn.IsConnected)
                {
                    var hint = settings.RenderHint;
                    settings.RenderHint = eRenderHint.ApplyOnly;
                    for (int i = 0; i < this.FPassLayerIn.SliceCount; i++)
                    {
                        this.FPassLayerIn[i][context].Render(this.FPassLayerIn.PluginIO, context, settings);
                    }
                    settings.RenderHint = hint;
                }

                if (this.FLayerIn.IsConnected)
                {
                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
            else
            {
                if (this.FLayerIn.IsConnected)
                {
                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
        }
开发者ID:dotprodukt,项目名称:dx11-vvvv,代码行数:34,代码来源:DX11LayerApplyOnlyNode.cs

示例2: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FLayerIn.IsConnected)
            {
                bool allow = false;
                for (int i = 0; i < this.FViewPortIndex.SliceCount;i++)
                {
                    if (this.FViewPortIndex[i] < 0)
                    {
                        allow = true;
                    }
                    else if (this.FViewPortIndex[i] % settings.ViewportCount == settings.ViewportIndex)
                    {
                        allow = true;
                    }
                }

                if (allow)
                {
                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
        }
开发者ID:dotprodukt,项目名称:dx11-vvvv,代码行数:26,代码来源:DX11LayerSelectViewPortNode.cs

示例3: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                if (this.FLayerIn.PluginIO.IsConnected)
                {
                    Matrix view = settings.View;
                    Matrix projection = settings.Projection;
                    Matrix vp = settings.ViewProjection;
                    bool depthonly = settings.DepthOnly;

                    this.UpdateSettings(settings);

                    this.FLayerIn[0][context].Render(this.FLayerIn.PluginIO, context, settings);

                    settings.View = view;
                    settings.Projection = projection;
                    settings.ViewProjection = vp;
                    settings.DepthOnly = depthonly;
                }
            }
            else
            {
                this.FLayerIn[0][context].Render(this.FLayerIn.PluginIO, context, settings);
            }
        }
开发者ID:kopffarben,项目名称:dx11-vvvv,代码行数:26,代码来源:DX11LayerSpaceNode.cs

示例4: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                if (this.FLayerIn.IsConnected)
                {
                    settings.PreferredTechniques.Add(FTechnique[0].Trim().ToLower());

                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }

                    settings.PreferredTechniques.RemoveAt(settings.PreferredTechniques.Count - 1);
                }
            }
            else
            {
                if (this.FLayerIn.IsConnected)
                {
                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
        }
开发者ID:sebllll,项目名称:dx11-vvvv,代码行数:27,代码来源:DX11LayerPreferTechniqueNode.cs

示例5: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                if (this.FLayerIn.IsConnected)
                {
                    bool popstate = false;

                    if (this.FInState.IsConnected)
                    {
                        context.RenderStateStack.Push(this.FInState[0]);
                        popstate = true;
                    }

                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }

                    if (popstate) { context.RenderStateStack.Pop(); }

                }
            }
            else
            {
                if (this.FLayerIn.IsConnected)
                {
                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
        }
开发者ID:sebllll,项目名称:dx11-vvvv,代码行数:34,代码来源:DX11LayerStateNode.cs

示例6: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                IDX11LayerOrder currentOrder = settings.LayerOrder;
                if (this.FInVal.IsConnected)
                {
                    settings.LayerOrder = this.FInVal[0];
                }

                if (this.FLayerIn.IsConnected)
                {
                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }

                settings.LayerOrder = currentOrder;
            }
            else
            {
                if (this.FLayerIn.IsConnected)
                {
                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
        }
开发者ID:dotprodukt,项目名称:dx11-vvvv,代码行数:31,代码来源:DX11LayerOrderNode.cs

示例7: Apply

 public override void Apply(DX11ShaderInstance shaderinstance, DX11RenderSettings settings)
 {
     Vector2 v = new Vector2(settings.RenderWidth, settings.RenderHeight);
     v.X = 1.0f / v.X;
     v.Y = 1.0f / v.Y;
     shaderinstance.SetByName(this.Name, v);
 }
开发者ID:hameleon-ed,项目名称:dx11-vvvv,代码行数:7,代码来源:GlobalRenderVariables.cs

示例8: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                if (this.FLayerIn.PluginIO.IsConnected)
                {
                    List<IDX11RenderSemantic> semantics = new List<IDX11RenderSemantic>();
                    if (this.FInSemantics.PluginIO.IsConnected)
                    {
                        semantics.AddRange(this.FInSemantics);
                        settings.CustomSemantics.AddRange(semantics);
                    }

                    List<DX11Resource<IDX11RenderSemantic>> ressemantics = new List<DX11Resource<IDX11RenderSemantic>>();
                    if (this.FInResSemantics.PluginIO.IsConnected)
                    {
                        ressemantics.AddRange(this.FInResSemantics);
                        settings.ResourceSemantics.AddRange(ressemantics);
                    }

                    this.FLayerIn[0][context].Render(this.FLayerIn.PluginIO, context, settings);

                    foreach (IDX11RenderSemantic semantic in semantics)
                    {
                        settings.CustomSemantics.Remove(semantic);
                    }

                    foreach (DX11Resource<IDX11RenderSemantic> rs in ressemantics)
                    {
                        settings.ResourceSemantics.Remove(rs);
                    }

                }
            }
        }
开发者ID:sunep,项目名称:dx11-vvvv,代码行数:35,代码来源:DX11LayerSemanticsNode.cs

示例9: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                var rect = context.CurrentDeviceContext.Rasterizer.GetScissorRectangles();
                if (this.FLayerIn.IsConnected)
                {

                    context.CurrentDeviceContext.Rasterizer.SetScissorRectangles(this.rectangles);
                    try
                    {
                        for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                        {
                            this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                        }
                    }
                    finally
                    {
                        context.CurrentDeviceContext.Rasterizer.SetScissorRectangles(rect);
                    }
                }
            }
            else
            {
                if (this.FLayerIn.IsConnected)
                {

                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
        }
开发者ID:sebllll,项目名称:dx11-vvvv,代码行数:34,代码来源:DX11LayerScissorNode.cs

示例10: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FLayerIn.SliceCount == 0) { return; }

            if (this.FEnabled[0])
            {
                if (this.FLayerIn.IsConnected)
                {
                    Matrix view = settings.View;
                    Matrix projection = settings.Projection;
                    Matrix vp = settings.ViewProjection;
                    bool depthonly = settings.DepthOnly;

                    this.UpdateSettings(settings);

                    for (int i = 0; i < this.FLayerIn.SliceCount;i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }

                    settings.View = view;
                    settings.Projection = projection;
                    settings.ViewProjection = vp;
                    settings.DepthOnly = depthonly;
                }
            }
            else
            {
                for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                {
                    this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                }
            }
        }
开发者ID:sebllll,项目名称:dx11-vvvv,代码行数:34,代码来源:DX11LayerSpaceNode.cs

示例11: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                if (this.FLayerIn.IsConnected)
                {
                    var currentRef = context.CurrentDeviceContext.OutputMerger.BlendFactor;

                    context.CurrentDeviceContext.OutputMerger.BlendFactor = this.FInFactor[0];

                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }

                    context.CurrentDeviceContext.OutputMerger.BlendFactor = currentRef;

                }
            }
            else
            {
                for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                {
                    this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                }
            }
        }
开发者ID:sebllll,项目名称:dx11-vvvv,代码行数:27,代码来源:DX11LayerBlendFactorNode.cs

示例12: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            IDX11Geometry g = settings.Geometry;
            if (this.FEnabled[0])
            {
                if (this.FLayerIn.PluginIO.IsConnected)
                {
                    IDX11Geometry geom = settings.Geometry;

                    settings.Geometry = null;
                    if (settings.BackBuffer is IDX11Buffer)
                    {
                        IDX11Buffer buffer = settings.BackBuffer as IDX11Buffer;
                        if (buffer.Buffer.Description.OptionFlags.HasFlag(ResourceOptionFlags.DrawIndirect))
                        {
                            this.dispatcher.DispatchBuffer = buffer.Buffer;
                            this.dispatcher.Offet = this.FInOffset[0];
                            settings.Geometry = this.geometry;
                        }
                    }

                    this.FLayerIn[0][context].Render(this.FLayerIn.PluginIO, context, settings);

                    settings.Geometry = geom;
                }
            }
            settings.Geometry = g;
        }
开发者ID:sunep,项目名称:dx11-vvvv,代码行数:28,代码来源:DX11LayerDispatcherNode.cs

示例13: Render

 public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
 {
     if (this.FEnabled[0])
     {
         bool bck = settings.PreserveShaderStages;
         settings.PreserveShaderStages = true;
         if (this.FLayerIn.IsConnected)
         {
             for (int i = 0; i < this.FLayerIn.SliceCount; i++)
             {
                 this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
             }
         }
         settings.PreserveShaderStages = bck;
     }
     else
     {
         if (this.FLayerIn.IsConnected)
         {
             for (int i = 0; i < this.FLayerIn.SliceCount; i++)
             {
                 this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
             }
         }
     }
 }
开发者ID:dotprodukt,项目名称:dx11-vvvv,代码行数:26,代码来源:DX11LayerPreservePipelineNode.cs

示例14: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0])
            {
                List<IDX11ObjectValidator> valids = new List<IDX11ObjectValidator>();
                if (this.FInVal.PluginIO.IsConnected)
                {
                    for (int i = 0; i < this.FInVal.SliceCount; i++)
                    {
                        if (this.FInVal[i].Enabled)
                        {
                            IDX11ObjectValidator v = this.FInVal[i];
                            //v.Reset();
                            v.SetGlobalSettings(settings);

                            valids.Add(v);
                            settings.ObjectValidators.Add(v);
                        }
                    }
                }

                if (this.FLayerIn.PluginIO.IsConnected)
                {
                    this.FLayerIn[0][context].Render(this.FLayerIn.PluginIO, context, settings);
                }

                foreach (IDX11ObjectValidator v in valids)
                {
                    settings.ObjectValidators.Remove(v);
                }

            }
        }
开发者ID:hameleon-ed,项目名称:dx11-vvvv,代码行数:33,代码来源:DX11LayerValidatorNode.cs

示例15: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            IDX11Geometry g = settings.Geometry;
            if (this.FEnabled[0])
            {
                if (this.FLayerIn.IsConnected)
                {
                    if (this.FInGeometry.IsConnected)
                    {
                        settings.Geometry = this.FInGeometry[0][context];
                    }

                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
            else
            {
                if (this.FLayerIn.IsConnected)
                {
                    for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                    {
                        this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                    }
                }
            }
            settings.Geometry = g;
        }
开发者ID:sebllll,项目名称:dx11-vvvv,代码行数:30,代码来源:DX11LayerGeometryNode.cs


注:本文中的DX11RenderSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。