Пример #1
0
 public void OnImportsSatisfied()
 {
     _keys = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Keys");
     _vals = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Values");
     _pd   = new PinDictionary(FIOFactory);
     _keys.OnTypeChangeEnd += (sender, args) =>
     {
         _typeChanged = true;
         if (_keysready)
         {
             return;
         }
         _keysready = true;
         if (!(_keysready && _valsready))
         {
             return;
         }
         CreatePins();
     };
     _vals.OnTypeChangeEnd += (sender, args) =>
     {
         _typeChanged = true;
         if (_valsready)
         {
             return;
         }
         _valsready = true;
         if (!(_keysready && _valsready))
         {
             return;
         }
         CreatePins();
     };
 }
Пример #2
0
        public void OnImportsSatisfied()
        {
            Pd = new PinDictionary(FIOFactory);
            foreach (var pin in FPluginHost.GetPins())
            {
                if (pin.Name != "Descriptive Name")
                {
                    continue;
                }
                pin.SetSlice(0, "");
                break;
            }

            _pg = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Input", 100);
            _pg.OnTypeChangeEnd += (sender, args) =>
            {
                _typeChanged = true;

                foreach (var pin in FPluginHost.GetPins())
                {
                    if (pin.Name != "Descriptive Name")
                    {
                        continue;
                    }
                    pin.SetSlice(0, "");
                    break;
                }
                Pd.RemoveAllInput();
                IsMemberEnumerable.Clear();

                foreach (var pin in FPluginHost.GetPins())
                {
                    if (pin.Name != "Descriptive Name")
                    {
                        continue;
                    }
                    pin.SetSlice(0, _pg.GroupType.GetCSharpName());
                    break;
                }

                foreach (var field in _pg.GroupType.GetFields())
                {
                    AddMemberPin(field);
                }
                foreach (var prop in _pg.GroupType.GetProperties())
                {
                    AddMemberPin(prop);
                }

                if (_pgready)
                {
                    return;
                }
                _pgready = true;
                _input   = _pg.AddInput(new InputAttribute("Input"));
            };
        }
Пример #3
0
 public void OnImportsSatisfied()
 {
     _pg = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Output", 100);
     _pg.OnTypeChangeEnd += (sender, args) =>
     {
         if (_pgready)
         {
             return;
         }
         _pgready = true;
         _output  = _pg.AddOutput(new OutputAttribute("Output"));
     };
 }
Пример #4
0
 public void OnImportsSatisfied()
 {
     FPinCount.Changed += spread => ChangePinCount();
     _pg = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Output", 100);
     _pg.OnTypeChangeEnd += (sender, args) =>
     {
         if (_pgready)
         {
             return;
         }
         _pgready = true;
         _input   = _pg.AddInputBinSized(new InputAttribute("Input"));
         ChangePinCount();
     };
 }
 public void OnImportsSatisfied()
 {
     PinGroup = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Input");
     PinGroup.OnTypeChangeEnd += (sender, args) =>
     {
         _typeChanged = true;
         if (!_init)
         {
             return;
         }
         PinGroup.AddInput(new InputAttribute("Input"));
         _input = PinGroup.Pd.InputPins["Input"];
         _init  = false;
     };
 }
Пример #6
0
        public override void OnImportsSatisfiedEnd()
        {
            _pg = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, HdeHost.MainLoop, "Generic Attachment", 100);
            _pg.OnTypeChangeEnd += (sender, args) =>
            {
                _typeChanged = true;
                if (_pgready)
                {
                    return;
                }
                _pgready = true;

                _output = _pg.AddOutput(new OutputAttribute("Generic Attachment"));
            };
        }
Пример #7
0
        public void OnImportsSatisfied()
        {
            PinGroup = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Output");
            PinGroup.ConfigDX11TypeShortcuts();

            PinGroup.OnTypeChangeEnd += (sender, args) =>
            {
                _typeChanged = true;
                if (!_init)
                {
                    return;
                }
                PinGroup.AddOutputBinSized(new OutputAttribute("Output"));
                _output = PinGroup.Pd.OutputPins["Output"];
                _init   = false;
            };
        }
Пример #8
0
        public void OnImportsSatisfied()
        {
            _pg = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Attachment", 10, true);
            _pg.OnTypeChangeEnd += (sender, args) =>
            {
                _typeChanged = true;
                if (_pgready)
                {
                    return;
                }
                _pgready = true;

                _attachment = _pg.AddInputBinSized(new InputAttribute("Attachment")
                {
                    Order = 20, BinOrder = 21
                });
            };
        }
Пример #9
0
        public void OnImportsSatisfied()
        {
            _pg = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Input");
            _pg.OnTypeChangeEnd += (sender, args) =>
            {
                _typeChanged = true;
                if (_pgready)
                {
                    return;
                }
                _pgready = true;

                _input = _pg.AddInput(new InputAttribute("Input")
                {
                    Order = -1
                });
            };
        }
Пример #10
0
        public void OnImportsSatisfied()
        {
            _pg = new ConfigurableTypePinGroup(FPluginHost, FIOFactory, Hde.MainLoop, "Input");
            _pg.OnTypeChangeEnd += (sender, args) =>
            {
                _typeChanged = true;
                if (_pgready)
                {
                    return;
                }
                _pgready = true;

                _input  = _pg.AddInput(new InputAttribute("Input"));
                _output = _pg.AddOutput(new OutputAttribute("Output"));
                _first  = _pg.AddOutput(new OutputAttribute("Dequeued"));
                _last   = _pg.AddOutput(new OutputAttribute("Enqueued"));
                _output.Spread.SliceCount = 0;
                _first.Spread.SliceCount  = _last.Spread.SliceCount = 1;
            };
        }
Пример #11
0
        public static void ConfigDX11TypeShortcuts(this ConfigurableTypePinGroup cpg)
        {
            var pgtd = cpg.SimplifiedTypeMapping;

            pgtd.Add("Texture1D", typeof(DX11Resource <DX11Texture1D>));
            pgtd.Add("Texture2D", typeof(DX11Resource <DX11Texture2D>));
            pgtd.Add("Texture3D", typeof(DX11Resource <DX11Texture3D>));
            pgtd.Add("TextureCube", typeof(DX11Resource <DX11TextureCube>));
            pgtd.Add("tex1", typeof(DX11Resource <DX11Texture1D>));
            pgtd.Add("tex2", typeof(DX11Resource <DX11Texture2D>));
            pgtd.Add("tex3", typeof(DX11Resource <DX11Texture3D>));
            pgtd.Add("texcube", typeof(DX11Resource <DX11TextureCube>));
            pgtd.Add("StructuredBuffer", typeof(DX11Resource <IDX11StructuredBuffer>));
            pgtd.Add("structbuf", typeof(DX11Resource <IDX11StructuredBuffer>));
            pgtd.Add("RawBuffer", typeof(DX11Resource <IDX11Buffer>));
            pgtd.Add("ByteAddressBuffer", typeof(DX11Resource <IDX11Buffer>));
            pgtd.Add("rawbuf", typeof(DX11Resource <IDX11Buffer>));
            pgtd.Add("Geometry", typeof(DX11Resource <IDX11Geometry>));
            pgtd.Add("geom", typeof(DX11Resource <IDX11Geometry>));
            pgtd.Add("RenderSemantic", typeof(DX11Resource <IDX11RenderSemantic>));
            pgtd.Add("semantic", typeof(DX11Resource <IDX11RenderSemantic>));
            cpg.OnlyAllowMappedTypes = true;
        }