• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DX11RenderSettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Reorder

 public List<int> Reorder(DX11RenderSettings settings, List<DX11ObjectRenderSettings> objectSettings)
 {
     internalBuffer.Clear();
     for (int i = 0; i < FInIndex.SliceCount; i++)
     {
         internalBuffer.Add(FInIndex[i]);
     }
     return this.internalBuffer;
 }
开发者ID:dotprodukt,项目名称:dx11-vvvv,代码行数:9,代码来源:LayerGetSliceOrderNode.cs


示例17: Render

 public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
 {
     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,代码行数:10,代码来源:DX11LayerSpreadNode.cs


示例18: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FEnabled[0] && this.FInViewports.SliceCount > 0 && this.FNormalized.SliceCount > 0)
            {
                if (this.FLayerIn.IsConnected)
                {
                    bool enabled = this.FInViewports.PluginIO.IsConnected;

                    if (enabled)
                    {
                        var vp = this.FInViewports[settings.ViewportIndex];
                        if (FNormalized[settings.ViewportIndex])
                        {
                            vp = vp.Normalize(settings.RenderWidth, settings.RenderHeight);
                        }

                        context.CurrentDeviceContext.Rasterizer.SetViewports(vp);
                    }

                    Exception exp = null;
                    try
                    {
                        for (int i = 0; i < this.FLayerIn.SliceCount; i++)
                        {
                            this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
                        }
                    }
                    catch (Exception ex)
                    {
                        exp = ex;
                    }
                    finally
                    {
                        if (enabled)
                        {
                            context.RenderTargetStack.Apply();
                        }
                    }
                    if (exp != null)
                    {
                        throw exp;
                    }
                }
            }
            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,代码行数:55,代码来源:SliceviewPortNode.cs


示例19: Render

        public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
        {
            if (this.FLayerIn.PluginIO.IsConnected)
            {
                bool current = settings.ResetCounter;
                settings.ResetCounter = this.FInReset[0];

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

                settings.ResetCounter = current;
            }
        }
开发者ID:sunep,项目名称:dx11-vvvv,代码行数:12,代码来源:DX11ResetCounterNode.cs


示例20: UpdateSettings

        protected override void UpdateSettings(DX11RenderSettings settings)
        {
            float w = settings.RenderWidth;
            float h = settings.RenderHeight;

            float sx, sy;

            #region Build scale
            if (FAlign[0].Name == "FitIn")
            {
                if (w > h)
                {
                    sx = h / w;
                    sy = 1.0f;
                }
                else
                {
                    sx = 1.0f;
                    sy = w / h;
                }
            }
            else if (FAlign[0].Name == "FitOut")
            {
                if (w > h)
                {
                    sx = 1.0f;
                    sy = w / h;
                }
                else
                {
                    sx = h / w;
                    sy = 1.0f;
                }
            }
            else if (FAlign[0].Name == "FitWidth")
            {
                sx = 1.0f;
                sy = w / h;
            }
            else //FitHeight
            {
                sy = 1.0f;
                sx = h / w;
            }
            #endregion

            Matrix aspect = Matrix.Scaling(sx* FScale[0], sy * FScale[0], 1.0f);

            settings.Projection = settings.Projection * aspect * FTransformIn[0];
            settings.ViewProjection = settings.View * settings.Projection;
        }
开发者ID:hameleon-ed,项目名称:dx11-vvvv,代码行数:51,代码来源:WithinLayerNodes.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Damage类代码示例发布时间:2022-05-24
下一篇:
C# DWORD类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap