Ejemplo n.º 1
0
        public DX11RenderStatePresetNode(IPluginHost host, IIOFactory iofactory)
        {
            InputAttribute attr = new InputAttribute("Blend Mode");
            attr.EnumName = DX11BlendStates.Instance.EnumName;
            this.FInBlendPreset = iofactory.CreateDiffSpread<EnumEntry>(attr);

            attr = new InputAttribute("Rasterizer Mode");
            attr.EnumName = DX11RasterizerStates.Instance.EnumName;
            this.FInRasterPreset = iofactory.CreateDiffSpread<EnumEntry>(attr);

            attr = new InputAttribute("Depth Stencil Mode");
            attr.EnumName = DX11DepthStencilStates.Instance.EnumName;
            this.FInDepthPreset = iofactory.CreateDiffSpread<EnumEntry>(attr);
        }
Ejemplo n.º 2
0
        public DX11CubeRendererNode(IPluginHost FHost, IIOFactory iofactory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.RenderTarget);

            InputAttribute tattr = new InputAttribute("Target Format");
            tattr.IsSingle = true;
            tattr.EnumName = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";

            this.FInFormat = iofactory.CreateDiffSpread<EnumEntry>(tattr);

            this.depthmanager = new DepthBufferManager(FHost, iofactory);

            this.lookats.Add(new Vector3(1.0f, 0.0f, 0.0f));
            this.lookats.Add(new Vector3(-1.0f, 0.0f, 0.0f));
            this.lookats.Add(new Vector3(0.0f, 1.0f, 0.0f));

            this.lookats.Add(new Vector3(0.0f, - 1.0f, 0.0f));
            this.lookats.Add(new Vector3(0.0f, 0.0f, 1.0f));
            this.lookats.Add(new Vector3(0.0f, 0.0f, -1.0f));

            this.upvectors.Add(new Vector3(0.0f, 1.0f, 0.0f));
            this.upvectors.Add(new Vector3(0.0f, 1.0f, 0.0f));
            this.upvectors.Add(new Vector3(0.0f, 0.0f, -1.0f));
            this.upvectors.Add(new Vector3(0.0f, 0.0f, 1.0f));
            this.upvectors.Add(new Vector3(0.0f, 1.0f, 0.0f));
            this.upvectors.Add(new Vector3(0.0f, 1.0f, 0.0f));
        }
Ejemplo n.º 3
0
        public DX11RendererNode(IPluginHost host, IIOFactory iofactory, IHDEHost hdehost)
        {
            InitializeComponent();
            this.FHost = host;
            this.hde   = hdehost;

            //this.hde.BeforeComponentModeChange += new ComponentModeEventHandler(hde_BeforeComponentModeChange);

            this.Resize     += DX11RendererNode_Resize;
            this.Load       += new EventHandler(DX11RendererNode_Load);
            this.Click      += new EventHandler(DX11RendererNode_Click);
            this.MouseEnter += new EventHandler(DX11RendererNode_MouseEnter);
            this.MouseLeave += new EventHandler(DX11RendererNode_MouseLeave);
            this.LostFocus  += new EventHandler(DX11RendererNode_LostFocus);
            this.MouseWheel += new System.Windows.Forms.MouseEventHandler(DX11RendererNode_MouseWheel);
            this.BackColor   = Color.Black;
            Touchdown       += OnTouchDownHandler;
            Touchup         += OnTouchUpHandler;
            TouchMove       += OnTouchMoveHandler;

            this.depthmanager = new DepthBufferManager(host, iofactory);

            ConfigAttribute bbAttr = new ConfigAttribute("Back Buffer Format");

            bbAttr.IsSingle         = true;
            bbAttr.EnumName         = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast);
            bbAttr.DefaultEnumEntry = DX11EnumFormatHelper.NullDeviceFormats.GetAllowedFormats(FormatSupport.BackBufferCast)[0];


            this.FCfgBackBufferFormat    = iofactory.CreateDiffSpread <EnumEntry>(bbAttr);
            this.FCfgBackBufferFormat[0] = new EnumEntry(DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast), 0);
        }
Ejemplo n.º 4
0
        public DX11CubeRendererNode(IPluginHost FHost, IIOFactory iofactory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.RenderTarget);

            InputAttribute tattr = new InputAttribute("Target Format");

            tattr.EnumName         = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";

            this.FInFormat = iofactory.CreateDiffSpread <EnumEntry>(tattr);

            lookatvectors.Add(new Vector3(1, 0, 0));
            lookatvectors.Add(new Vector3(-1, 0, 0));
            lookatvectors.Add(new Vector3(0, 1, 0));
            lookatvectors.Add(new Vector3(0, -1, 0));
            lookatvectors.Add(new Vector3(0, 0, 1));
            lookatvectors.Add(new Vector3(0, 0, -1));

            upvectors.Add(new Vector3(0, 1, 0));
            upvectors.Add(new Vector3(0, 1, 0));
            upvectors.Add(new Vector3(0, 0, -1));
            upvectors.Add(new Vector3(0, 0, 1));
            upvectors.Add(new Vector3(0, 1, 0));
            upvectors.Add(new Vector3(0, 1, 0));

            //this.depthmanager = new DepthBufferManager(FHost,iofactory);
        }
Ejemplo n.º 5
0
        public DX11RenderStatePresetNode(IPluginHost host, IIOFactory iofactory)
        {
            InputAttribute attr = new InputAttribute("Blend Mode");

            attr.EnumName       = DX11BlendStates.Instance.EnumName;
            this.FInBlendPreset = iofactory.CreateDiffSpread <EnumEntry>(attr);

            attr                 = new InputAttribute("Rasterizer Mode");
            attr.EnumName        = DX11RasterizerStates.Instance.EnumName;
            this.FInRasterPreset = iofactory.CreateDiffSpread <EnumEntry>(attr);


            attr                = new InputAttribute("Depth Stencil Mode");
            attr.EnumName       = DX11DepthStencilStates.Instance.EnumName;
            this.FInDepthPreset = iofactory.CreateDiffSpread <EnumEntry>(attr);
        }
Ejemplo n.º 6
0
        public DX11RendererNode(IPluginHost host, IIOFactory iofactory,IHDEHost hdehost)
        {
            InitializeComponent();
            this.FHost = host;
            this.hde = hdehost;

            //this.hde.BeforeComponentModeChange += new ComponentModeEventHandler(hde_BeforeComponentModeChange);

            this.Resize += DX11RendererNode_Resize;
            this.Load += new EventHandler(DX11RendererNode_Load);
            this.Click += new EventHandler(DX11RendererNode_Click);
            this.MouseEnter += new EventHandler(DX11RendererNode_MouseEnter);
            this.MouseLeave += new EventHandler(DX11RendererNode_MouseLeave);
            this.LostFocus += new EventHandler(DX11RendererNode_LostFocus);
            this.MouseWheel += new System.Windows.Forms.MouseEventHandler(DX11RendererNode_MouseWheel);
            this.BackColor = Color.Black;
            Touchdown += OnTouchDownHandler;
            Touchup += OnTouchUpHandler;
            TouchMove += OnTouchMoveHandler;

            this.depthmanager = new DepthBufferManager(host,iofactory);

            ConfigAttribute bbAttr = new ConfigAttribute("Back Buffer Format");
            bbAttr.IsSingle = true;
            bbAttr.EnumName = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast);
            bbAttr.DefaultEnumEntry = DX11EnumFormatHelper.NullDeviceFormats.GetAllowedFormats(FormatSupport.BackBufferCast)[0];

            this.FCfgBackBufferFormat = iofactory.CreateDiffSpread<EnumEntry>(bbAttr);
            this.FCfgBackBufferFormat[0] = new EnumEntry(DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast), 0);
        }
        public DX11Texture1dArrayRendererNode(IPluginHost FHost, IIOFactory iofactory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.UnorderedAccessView);

            InputAttribute tattr = new InputAttribute("Target Format");
            tattr.EnumName = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";

            this.FInFormat = iofactory.CreateDiffSpread<EnumEntry>(tattr);
        }
        public DX11Texture1dRendererNode(IPluginHost FHost, IIOFactory iofactory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.UnorderedAccessView);

            InputAttribute tattr = new InputAttribute("Target Format");

            tattr.EnumName         = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";

            this.FInFormat = iofactory.CreateDiffSpread <EnumEntry>(tattr);
        }
Ejemplo n.º 9
0
        public DX11SamplerStatePresetNode(IPluginHost host, IIOFactory iofactory)
        {
            string[] enums = DX11SamplerStates.Instance.StateKeys;

            host.UpdateEnum(DX11SamplerStates.Instance.EnumName, enums[0], enums);

            InputAttribute attr = new InputAttribute("Mode");
            attr.EnumName = DX11SamplerStates.Instance.EnumName;
            attr.DefaultEnumEntry = enums[0];
            this.FInPreset = iofactory.CreateDiffSpread<EnumEntry>(attr);
        }
        public DX11TextureSpreadRendererNode(IPluginHost FHost, IIOFactory iofactory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.RenderTarget);

            InputAttribute tattr = new InputAttribute("Target Format");

            tattr.EnumName         = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";

            ConfigAttribute dfAttr = new ConfigAttribute("Depth Buffer Format");

            dfAttr.EnumName         = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.DepthStencil);
            dfAttr.DefaultEnumEntry = "D32_Float";
            dfAttr.IsSingle         = true;

            this.depthformatpin    = iofactory.CreateDiffSpread <EnumEntry>(dfAttr);
            this.depthformatpin[0] = new EnumEntry(dfAttr.EnumName, 1);

            this.FInFormat = iofactory.CreateDiffSpread <EnumEntry>(tattr);
        }
Ejemplo n.º 11
0
        public DX11VolumeRendererNode(IPluginHost FHost,IIOFactory factory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.RenderTarget);

            InputAttribute tattr = new InputAttribute("Target Format");
            tattr.EnumName = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";
            tattr.CheckIfChanged = true;

            this.FInFormat = factory.CreateDiffSpread<EnumEntry>(tattr);
        }
Ejemplo n.º 12
0
        public DX11SamplerStatePresetNode(IPluginHost host, IIOFactory iofactory)
        {
            string[] enums = DX11SamplerStates.Instance.StateKeys;

            host.UpdateEnum(DX11SamplerStates.Instance.EnumName, enums[0], enums);

            InputAttribute attr = new InputAttribute("Mode");

            attr.EnumName         = DX11SamplerStates.Instance.EnumName;
            attr.DefaultEnumEntry = enums[0];
            this.FInPreset        = iofactory.CreateDiffSpread <EnumEntry>(attr);
        }
Ejemplo n.º 13
0
        public DX11VolumeRendererNode(IPluginHost FHost, IIOFactory factory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.RenderTarget);

            InputAttribute tattr = new InputAttribute("Target Format");

            tattr.EnumName         = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";
            tattr.CheckIfChanged   = true;

            this.FInFormat = factory.CreateDiffSpread <EnumEntry>(tattr);
        }
Ejemplo n.º 14
0
        public DX11MRTRendererNode(IPluginHost FHost,IIOFactory iofactory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.RenderTarget);

            InputAttribute tattr = new InputAttribute("Target Format");
            tattr.EnumName = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";

            this.FInFormat = iofactory.CreateDiffSpread<EnumEntry>(tattr);

            this.depthmanager = new DepthBufferManager(FHost,iofactory);
        }
Ejemplo n.º 15
0
        public void OnImportsSatisfied()
        {
            AutomataUI.Connected    += Input_Connected;
            AutomataUI.Disconnected += Input_Disconnected;

            FHost.GetNodePath(true, out EnumName);                  //get unique node path
            EnumName += "AutomataUI";                               // add unique name to path
            InputAttribute attr = new InputAttribute("Transition"); //name of pin

            attr.EnumName = EnumName;
            //attr.DefaultEnumEntry = "Init"; //default state
            EnumTransition = FIOFactory.CreateDiffSpread <EnumEntry>(attr);
        }
Ejemplo n.º 16
0
        Dictionary <string, IIOContainer> FPins = new Dictionary <string, IIOContainer>(); //dynamic pins

        #endregion variables

        #region constructor and init

        public void OnImportsSatisfied()
        {
            TransitionNames.Changed += HandleTransitionPins;

            //dynamic enum attributes with unique name
            FHost.GetNodePath(true, out EnumName);                       //get unique node path
            EnumName += "AutomataUI";                                    // add unique name to path

            attr                  = new InputAttribute("Default State"); //name of pin
            attr.EnumName         = EnumName;
            attr.DefaultEnumEntry = "Init";                              //default state
            attr.Visibility       = PinVisibility.OnlyInspector;         //make invisible

            DefaultState = FIOFactory.CreateDiffSpread <EnumEntry>(attr);
        }
Ejemplo n.º 17
0
        public DX11RendererNode2(IPluginHost host, IIOFactory iofactory)
        {
            this.ctrl = new Control();
            this.ctrl.Dock = DockStyle.Fill;
            this.ctrl.Resize += new EventHandler(ctrl_Resize);

            this.depthmanager = new DepthBufferManager(host, iofactory);

            ConfigAttribute bbAttr = new ConfigAttribute("Back Buffer Format");
            bbAttr.IsSingle = true;
            bbAttr.EnumName = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast);
            bbAttr.DefaultEnumEntry = DX11EnumFormatHelper.NullDeviceFormats.GetAllowedFormats(FormatSupport.BackBufferCast)[0];

            this.FCfgBackBufferFormat = iofactory.CreateDiffSpread<EnumEntry>(bbAttr);
            this.FCfgBackBufferFormat[0] = new EnumEntry(DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast), 0);
            this.FCfgBackBufferFormat.Changed += new SpreadChangedEventHander<EnumEntry>(FCfgBackBufferFormat_Changed);
        }
Ejemplo n.º 18
0
        public void OnImportsSatisfied()
        {
            FInputContainer = FFactory.CreateIOContainer <IInStream <IInStream <T> > >(
                new InputAttribute("Input")
            {
                IsPinGroup = true
            });

            FOutputContainer = FFactory.CreateIOContainer <IOutStream <T> >(
                new OutputAttribute("Output"));

            FAllowEmptySpreadsConfig = FFactory.CreateDiffSpread <bool>(
                new InputAttribute("Allow Empty Spreads")
            {
                IsSingle = true, Visibility = PinVisibility.OnlyInspector
            });

            FAllowEmptySpreadsConfig.Changed += (s) => FAllowEmptySpreads = s[0];
        }
Ejemplo n.º 19
0
        public DX11RendererNode2(IPluginHost host, IIOFactory iofactory)
        {
            this.ctrl         = new Control();
            this.ctrl.Dock    = DockStyle.Fill;
            this.ctrl.Resize += new EventHandler(ctrl_Resize);

            this.depthmanager = new DepthBufferManager(host, iofactory);

            ConfigAttribute bbAttr = new ConfigAttribute("Back Buffer Format");

            bbAttr.IsSingle         = true;
            bbAttr.EnumName         = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast);
            bbAttr.DefaultEnumEntry = DX11EnumFormatHelper.NullDeviceFormats.GetAllowedFormats(FormatSupport.BackBufferCast)[0];


            this.FCfgBackBufferFormat          = iofactory.CreateDiffSpread <EnumEntry>(bbAttr);
            this.FCfgBackBufferFormat[0]       = new EnumEntry(DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast), 0);
            this.FCfgBackBufferFormat.Changed += new SpreadChangedEventHander <EnumEntry>(FCfgBackBufferFormat_Changed);
        }
Ejemplo n.º 20
0
        public DX11TextureSpreadRendererNode(IPluginHost FHost, IIOFactory iofactory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.RenderTarget);

            InputAttribute tattr = new InputAttribute("Target Format");
            tattr.EnumName = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";

            ConfigAttribute dfAttr = new ConfigAttribute("Depth Buffer Format");
            dfAttr.EnumName = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.DepthStencil);
            dfAttr.DefaultEnumEntry = "D32_Float";
            dfAttr.IsSingle = true;

            this.depthformatpin = iofactory.CreateDiffSpread<EnumEntry>(dfAttr);
            this.depthformatpin[0] = new EnumEntry(dfAttr.EnumName, 1);

            this.FInFormat = iofactory.CreateDiffSpread<EnumEntry>(tattr);
        }