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

C# IPluginIO类代码示例

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

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



IPluginIO类属于命名空间,在下文中一共展示了IPluginIO类的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: Destroy

 public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
 {
     for (int i = 0; i < this.FOutput.SliceCount; i++)
     {
         this.FOutput[i].Dispose(context);
     }
 }
开发者ID:kopffarben,项目名称:dx11-vvvv,代码行数:7,代码来源:KinectFaceMeshNode.cs


示例3: 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


示例4: Update

        public void Update(IPluginIO pin, DX11RenderContext context)
        {
            if (this.FOutGeom.SliceCount == 0) { return; }

            if (this.dispatchBuffer == null)
            {
                this.dispatchBuffer = new DispatchIndirectBuffer(context);
            }

            if (!this.FOutGeom[0].Contains(context))
            {
                this.indirectDispatch = new DX11NullIndirectDispatcher();
                this.indirectDispatch.IndirectArgs = this.dispatchBuffer;

                DX11NullGeometry nullgeom = new DX11NullGeometry(context);
                nullgeom.AssignDrawer(this.indirectDispatch);

                this.FOutGeom[0][context] = nullgeom;
            }

            var countuav = this.FInArgBuffer[0][context];

            var argBuffer = this.dispatchBuffer.Buffer;

            int argOffset = this.FInArgOffset[0];
            ResourceRegion region = new ResourceRegion(argOffset, 0, 0, argOffset + 12, 1, 1); //Packed xyz value here
            context.CurrentDeviceContext.CopySubresourceRegion(this.FInArgBuffer[0][context].Buffer, 0, region, argBuffer, 0, 0, 0, 0);
        }
开发者ID:sunep,项目名称:dx11-vvvv,代码行数:28,代码来源:DispatchIndirectBufferNode.cs


示例5: 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


示例6: Destroy

 public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
 {
     for (int i = 0; i < this.FOutGeom.SliceCount; i++)
     {
         if (this.FOutGeom[i] != null) { this.FOutGeom[i].Dispose(context); }
     }
 }
开发者ID:sunep,项目名称:dx11-vvvv,代码行数:7,代码来源:AssimpMeshNode.cs


示例7: 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


示例8: 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


示例9: 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


示例10: Update

        public void Update(IPluginIO pin, DX11RenderContext context)
        {
            Device device = context.Device;

            if (invalidate)
            {
                for (int i = 0; i < this.FOutGeom.SliceCount; i++)
                {
                    if (this.FInEnabled[i])
                    {
                        DX11IndexedGeometry v = (DX11IndexedGeometry)this.FInGeom[i][context].ShallowCopy();

                        DX11PerVertexIndexedDrawer drawer = new DX11PerVertexIndexedDrawer();
                        v.AssignDrawer(drawer);

                        this.FOutGeom[i][context] = v;

                    }
                    else
                    {
                        this.FOutGeom[i][context] = this.FInGeom[i][context];
                    }

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


示例11: 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


示例12: Update

        public void Update(IPluginIO pin, DX11RenderContext context)
        {
            if (this.FInvalidate)
            {
                for (int i = 0; i < FTextureOutput.SliceCount; i++)
                {
                    if (this.FTextureOutput[i].Contains(context))
                    {
                        this.FTextureOutput[i].Dispose(context);
                    }

                    try
                    {
                        int p = unchecked((int) this.FPointer[i]);
                        IntPtr share = new IntPtr(p);
                        Texture2D tex = context.Device.OpenSharedResource<Texture2D>(share);
                        ShaderResourceView srv = new ShaderResourceView(context.Device, tex);

                        DX11Texture2D resource = DX11Texture2D.FromTextureAndSRV(context, tex, srv);

                        this.FTextureOutput[i][context] = resource;
                        this.FValid[i] = true;
                    }
                    catch (Exception)
                    {
                        this.FValid[i] = false;
                    }
                }
                this.FInvalidate = false;
            }
        }
开发者ID:sunep,项目名称:dx11-vvvv,代码行数:31,代码来源:FromPointerTextureNode.cs


示例13: 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


示例14: Destroy

 public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
 {
     if (this.FOutBody.SliceCount > 0)
     {
         this.FOutBody[0].Dispose(context);
     }
 }
开发者ID:sunep,项目名称:dx11-vvvv,代码行数:7,代码来源:RigidDynamicBufferNode.cs


示例15: Update

		public void Update(IPluginIO pin, DX11RenderContext context)
		{
			foreach (var processor in FProcessor)
			{
				processor.UpdateTexture(context);
			}
		}
开发者ID:kevinbs,项目名称:VVVV.Packs.Image,代码行数:7,代码来源:AsTextureDX11Node.cs


示例16: 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


示例17: Destroy

		public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
		{
			foreach (var processor in FProcessor)
			{
				processor.DestroyTexture(context);
			}
		}
开发者ID:kevinbs,项目名称:VVVV.Packs.Image,代码行数:7,代码来源:AsTextureDX11Node.cs


示例18: 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


示例19: Update

        public void Update(IPluginIO pin, DX11RenderContext context)
        {
            if (this.FInvalidate)
            {
                if (this.FTextureOutput[0].Contains(context))
                {
                    this.FTextureOutput[0].Dispose(context);
                }

                try
                {
                    Texture2D tex = context.Device.OpenSharedResource<Texture2D>((IntPtr)this.FPointer[0]);
                    ShaderResourceView srv = new ShaderResourceView(context.Device, tex);

                    DX11Texture2D resource = DX11Texture2D.FromTextureAndSRV(context, tex, srv);

                    this.FTextureOutput[0][context] = resource;

                    this.FValid[0] = true;
                }
                catch (Exception ex)
                {
                    this.FValid[0] = false;
                }

                this.FInvalidate = false;
            }
        }
开发者ID:velcrome,项目名称:dx11-vvvv,代码行数:28,代码来源:FromPointerTextureNode.cs


示例20: Update

        public void Update(IPluginIO pin, DX11RenderContext context)
        {
            if (this.FInvalidate)
            {
                if (srv != null) { srv.Dispose(); }
                if (tex != null) { tex.Dispose(); }

                try
                {
                    int p = unchecked((int) this.FPointer[0]);
                    tex = context.Device.OpenSharedResource<Texture2D>(new IntPtr(p));
                    srv = new ShaderResourceView(context.Device, tex);

                    DX11Texture2D resource = DX11Texture2D.FromTextureAndSRV(context, tex, srv);

                    this.FTextureOutput[0][context] = resource;

                    this.FValid[0] = true;
                }
                catch (Exception ex)
                {
                    this.FValid[0] = false;
                }

                this.FInvalidate = false;
            }
        }
开发者ID:hameleon-ed,项目名称:dx11-vvvv,代码行数:27,代码来源:FromPointerTextureNode.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IPluginManager类代码示例发布时间:2022-05-24
下一篇:
C# IPluginHost类代码示例发布时间: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