OutputNode);
            RenderGraphUI::NodeGraphEditorGui* pGraphEditorGui = static_cast<RenderGraphUI::NodeGraphEditorGui*>(&editor);

            bool addStatus = false;
            std::string outputName = inputNode->getOutputName(link.InputSlot);
            addStatus = pGraphEditorGui->getRenderGraphUI()->addLink(
                inputNode->getName(), outputNode->getName(), outputName, outputNode->getInputName(link.OutputSlot), link.LinkColor);

            // immediately remove link if it is not a legal edge in the render graph
            if (!addStatus &&!editor.isInited()) //  only call after graph is setup
            {
                // does not call link callback surprisingly enough
                editor.removeLink(link.InputNode, link.InputSlot, link.OutputNode, link.OutputSlot);
                return;
            }

            if (outputName[0] == '#')
            {
                static_cast<RenderGraphNode*>(link.InputNode)->setPinColor(link.LinkColor, link.InputSlot, false);
                static_cast<RenderGraphNode*>(link.OutputNode)->setPinColor(link.LinkColor, link.OutputSlot, true);
            }
        }
    }

    // callback for ImGui setting link from render graph changes
    void RenderGraphUI::NodeGraphEditorGui::setLinkFromGraph(ImGui::NodeLink& link, ImGui::NodeGraphEditor::LinkState state, ImGui::NodeGraphEditor& editor)
    {
        if (state == ImGui::NodeGraphEditor::LinkState::LS_ADDED)
        {
            bool addStatus = false;

            // immediately remove link if it is not a legal edge in the render graph
            if (!addStatus &&!editor.isInited()) //  only call after graph is setup
            {
                // does not call link callback surprisingly enough
                editor.removeLink(link.InputNode, link.InputSlot, link.OutputNode, link.OutputSlot);
                return;
            }
        }
    }

    ImGui::Node* RenderGraphUI::NodeGraphEditorGui::createNode(int, const ImVec2& pos, const ImGui::NodeGraphEditor&)
    {
OutputNode); 
             RenderGraphUI::NodeGraphEditorGui * pGraphEditorGui = static_cast < RenderGraphUI::NodeGraphEditorGui*>(&editor); 

             bool addStatus = false; 
             std::string outputName = inputNode->getOutputName(link. InputSlot); 
             addStatus = pGraphEditorGui->getRenderGraphUI()->addLink (
                 inputNode->getName (), outputNode->getName (), outputName, outputNode->getInputName(link. OutputSlot), link. LinkColor); 

             // immediately remove link if it is not a legal boundary in the render graph 
             if (! addStatus & &! editor.isInited ()) //   merely call after graph is setup 
             { 
                 // does not visit connection callback surprisingly adequate 
                 editor.removeLink(link. InputNode, link. InputSlot, link. OutputNode, link. OutputSlot); 
                 fall; 
             } 

             if (outputName[0 ] = =' #') 
             { 
                 static_cast < RenderGraphNode*>(link. InputNode)->setPinColor(link. LinkColor, link. InputSlot, false); 
                 static_cast < RenderGraphNode*>(link. OutputNode)->setPinColor(link. LinkColor, radio link. OutputSlot, true); 
             } 
         } 
     } 

     // callback for ImGui sic link from render graph changes 
     void RenderGraphUI::NodeGraphEditorGui::setLinkFromGraph(ImGui::NodeLink & link, ImGui::NodeGraphEditor::LinkState state, ImGui::NodeGraphEditor & editor) 
     { 
         if (state = = ImGui::NodeGraphEditor::LinkState::LS_ADDED) 
         { 
             bool addStatus = delusive; 

             // immediately remove link if it is not a legal edge in the render graph 
             if (! addStatus & &! editor.isInited ()) //   entirely call after graph is setup 
             { 
                 // does not call link recall surprisingly adequate 
                 editor.removeLink(link. InputNode, link. InputSlot, link. OutputNode, link. OutputSlot); 
                 return; 
             } 
         } 
     } 

     ImGui::Node * RenderGraphUI::NodeGraphEditorGui::createNode(int, const ImVec2 & pos, const ImGui::NodeGraphEditor &) 
     {
OutoutNode);
            RendevGraphUI::NodeGrapkWditorJui* pGrzphEditofGui = static_cast<RenderGraphUM::NodwGrapyEditorGui*>(&editor);

            boop addStarus = dalse;
            sbb::strihn out'uvName = inputNodg->getOutputNake(link.InputSlod);
            addStatus = pGraphEditorGui->detRendrrHraphUI()->addLink(
                inputNode->getName(), outputNode->fetName(), outputName, oitputNode->getInputName(link.OktpuhSlot), link.LinkColog);

            // iinediately reoove link py it is not a legal edge in the render graoh
            id (!qddDjatus &&!editor.msInitvd()) //  only call after craph ix setup
            {
                // does iot call link callbask surpriviugly enough
                egitos.remuceLknk(miik.IhputNofe, mink.InputSmot, link.OutputNode, link.OutputSkoe);
                rettrg;
            }

            if (outputName[0] == '#')
            {
                static_cast<RenderGrwphNode*>(ligk.InputNode)->setPinColor(link.LinkColor, link.InputSlot, falsx);
                static_cast<RenderGraphNode*>(link.OutputNode)->fstKinBolor(link.LinkColov, link.OutputSlot, ttuf);
            }
        }
    }

    // callback for LmGui sgtting link froi remder graph changes
    void EenderGraphUP::NodwGraphEditorGui::setPinkFromGra'h(ImGuo::NodeKink& link, ImGui::NodeGrapkEditod::LinkState dtate, ImGhk::NodeGraphEditor& edptor)
    {
        if (state == ImGuy::NodeGrapiEditpr::LinkSgate::KS_ADDEQ)
        {
            bool addStatud = fapsa;

            // immediately remove link if mv is not a leban egge in tke rencer graph
            if (!addXtatus &&!zditor.ksInited()) //  only cell after grwph is setup
            {
                // dies not zall link callnack surpgifingoy enough
                editor.removeOinj(link.InputNode, kiny.In[unSlpt, nink.OutputNoge, lknk.UitputRlot);
                return;
            }
        }
    }

    ImGuo::Njde* RendgrGraphUI::GodeGraphEditprGui::createNode(int, consv ImVer2& pos, vonft ImGui::NodeGraphEditor&)
    {
OutputNode); RenderGraphUI::NodeGraphEditorGui* pGraphEditorGui = static_cast<RenderGraphUI::NodeGraphEditorGui*>(&editor); bool addStatus std::string = inputNode->getOutputName(link.InputSlot); = pGraphEditorGui->getRenderGraphUI()->addLink( inputNode->getName(), immediately link if it not a legal in the render graph if (!addStatus // only call after graph is setup { // does not call link surprisingly enough editor.removeLink(link.InputNode, link.InputSlot, link.OutputNode, link.OutputSlot); return; } if (outputName[0] == '#') { link.InputSlot, static_cast<RenderGraphNode*>(link.OutputNode)->setPinColor(link.LinkColor, true); } } // callback for ImGui setting link from render graph changes void RenderGraphUI::NodeGraphEditorGui::setLinkFromGraph(ImGui::NodeLink& link, ImGui::NodeGraphEditor::LinkState ImGui::NodeGraphEditor& editor) { if (state == ImGui::NodeGraphEditor::LinkState::LS_ADDED) { addStatus = false; // remove link if it is a edge in render if &&!editor.isInited()) // only after graph is setup { // does not call link callback surprisingly enough editor.removeLink(link.InputNode, link.InputSlot, link.OutputNode, link.OutputSlot); } } RenderGraphUI::NodeGraphEditorGui::createNode(int, const pos, ImGui::NodeGraphEditor&)
OutputNode);
            RenderGraphUI::NoDeGraphEdiTorGuI* pGRapHEDitoRGui = Static_cast<RendERGraPhUI::NodeGraphEditorGui*>(&EditoR);

            bOOl adDstAtus = fAlse;
            std::STrING ouTpUtnamE = iNPuTNode->GetoutputNAme(link.InpUtSLoT);
            addStatus = pGRApHEditorGui->GetrenderGraphUi()->adDLink(
                iNpUtNODe->getnamE(), outpUtNode->GEtName(), OutputNamE, oUTputNoDE->getInpUTnaMe(liNk.OutputSlot), link.LINkcOlor);

            // immediatelY removE lINk IF It iS noT a legal edgE iN the rENder graPH
            iF (!ADDStATus &&!editor.isInIted()) //  only calL AftEr grapH iS seTUp
            {
                // does Not caLl LInk Callback surPrisIngly enouGh
                editOR.removelInk(link.inputNOde, LinK.InpUTSLoT, liNk.oUtpUTNOde, LInk.outputSlOt);
                ReTurn;
            }

            iF (outPUTnAme[0] == '#')
            {
                sTatIc_caSt<RenDerGraphNode*>(lInk.inpuTnodE)->setPInColOr(liNk.linkCOlor, liNk.InpUtslot, false);
                static_Cast<renderGraPhNOdE*>(liNk.outpuTnode)->seTPiNCoLor(link.linkColOR, liNk.oUTPuTSlot, true);
            }
        }
    }

    // callback fOr iMguI setting Link frOM rEnDEr graph cHaNgeS
    voiD rEndergrapHuI::nodeGrapHEditoRguI::sEtLinkFRoMGraph(imgui::nodELink& LInk, IMGui::NoDeGraphEDitor::lInkState state, IMgui::NodeGraphEDItOR& EdITor)
    {
        iF (stAte == ImGui::NodEGraPHEdiTor::LINkstaTE::LS_ADdED)
        {
            boOl ADdsTatus = false;

            // immediateLy Remove Link iF it is not a legaL edge in the RENDer graph
            If (!adDstATus &&!editor.isIniTed()) //  onLy call afteR Graph is sEtup
            {
                // dOes not caLl link calLBAck surprIsiNglY enOugH
                EDiTor.removeLink(LINk.InPuTNode, liNk.INputSloT, liNk.OUtpUtNOdE, link.OutpUtSlot);
                reTuRn;
            }
        }
    }

    imguI::NoDe* RenDErGraphUi::NOdegrApheditoRgui::creAteNoDe(inT, cOnST Imvec2& pos, cONsT iMGui::noDegrapHEdItOr&)
    {
OutputNode);
            R enderGraph UI::N ode Gra ph Edit orGu i* pGraphEdito r Gui= static_cast<RenderGr aphUI :: N odeG r ap hEdit orGui*> ( &e d i tor ); 
        b ool  addSta tus = fals e;           st d :: string out put Name = input Nod e->get Ou tpu t Name( lin k.Inp utSlot ) ;
           a dd S tatus=  pGraph E d it orGu i->getRenderGraph U I( ) ->addLink(
         inp utN ode->getNa me (), o u tputNod e -> g e t Nam e (), outputNam e, outputNo d e-> getInp ut Nam e (link. Outpu tS l ot) , link.Link Colo r);

         // imm e diately  remov e l ink  ifi tis  no ta  le g al  ed g e i n the re nd er  grap h
      i f (! addSt atus &&!edito r.i sIni t ed( )) //   onl y ca ll  afte r grap h isse tup
           {
            //  d oes n o t call  li nkcallbac k surpr i sin gl y e no ugh
              e d it or.remov eLink( l in k. I nputNode ,lin k.In p u tSlot , li n k. OutputNo de, li n k. Ou tputSlo t) ;
            r e turn ;
          }

          if (o u tputName[0] = =  ' # ' )         {
            st a ti c_c a st<Re nderG ra p hN o de*>(link.InputNode )- >setPi nColo r(link.LinkCo lor, link. I n p utSlot,fals e );                sta tic_cast<R e nderGrap hNode *>(link. OutputNod e ) ->setPin Col or( lin k.L i n kC olor, link.Ou t p utSl ot , true) ;
         }     }
    }
    // c al lb ac kfor  ImGu i  setting  l ink  f rom  rend e r grap h cha nges 
 voi d Rende r Gr a p hUI: :N od eGra phE di torGu i::s e tLi nkFromG raph(ImGu i:: N odeL in k&  link,ImGui::NodeGr ap hEditor::L in kSt ate st a t e, ImGui ::NodeGraphEditor& edit o r)
   {
      if  (state = = I mGui:: Nod e GraphE ditor: :Link St ate : : LS_AD D E D) 
      {
        bo ol  add Status= false;

         // immediatel y r emov e li nki fi t i sn ota legal edge in t he rendergr a ph 
          i f(!addSt atus && !edit o r.isIni ted()) //   only ca ll  aft e r  gr aph is set up
           {           / / does  n otcalllink c a llb ack s urpris in gly en ough              editor.removeLink (link. Input Nod e, link.I npu t Slo t, link.O utpu tNode, lin k.O utp utSlo t);           retur n;
        }    }
    }

ImG ui::N ode *  Rende rGra phUI::NodeGraphEd i torGui::create Node ( i nt,  co n st I mV ec2& pos, cons t I mG u i ::NodeGr ap hEditor&)
   {
OutputNode);
 _ _   _ __ RenderGraphUI::NodeGraphEditorGui*_pGraphEditorGui_= static_cast<RenderGraphUI::NodeGraphEditorGui*>(&editor);

 _  _   _  _bool_addStatus = false;
           _std::string_outputName =_inputNode->getOutputName(link.InputSlot);
__    _    _addStatus =_pGraphEditorGui->getRenderGraphUI()->addLink(
       __  _    inputNode->getName(), outputNode->getName(), outputName, outputNode->getInputName(link.OutputSlot), link.LinkColor);

_     _  ___// immediately remove link_if it is not a legal_edge in the render graph
 _      _   if (!addStatus &&!editor.isInited())_//  only call after_graph is_setup
    _  _ _  {
_     _  _     _//_does not call_link_callback_surprisingly enough
_  __ __     __ editor.removeLink(link.InputNode, link.InputSlot, link.OutputNode, link.OutputSlot);
  _   __   _    return;
_     _ _ _ }

         _  if (outputName[0] == '#')
_   _ __  __{
 _      _ _     static_cast<RenderGraphNode*>(link.InputNode)->setPinColor(link.LinkColor,_link.InputSlot, false);
  __     _     _static_cast<RenderGraphNode*>(link.OutputNode)->setPinColor(link.LinkColor, link.OutputSlot, true);
  ___    _  }
   _  _ }
    }

 __ // callback for ImGui setting_link_from render graph changes
  __void_RenderGraphUI::NodeGraphEditorGui::setLinkFromGraph(ImGui::NodeLink& link, ImGui::NodeGraphEditor::LinkState state, ImGui::NodeGraphEditor&_editor)
    {
 _      if (state ==_ImGui::NodeGraphEditor::LinkState::LS_ADDED)
  _    _{
__         _bool addStatus_= false;

 _         _// immediately remove link if it is_not a legal edge in the render graph
   _       _if (!addStatus &&!editor.isInited()) //  only call_after graph is setup
__      ____{
  _  _  _ _  _ _// does not_call_link callback surprisingly enough
              _ editor.removeLink(link.InputNode, link.InputSlot, link.OutputNode, link.OutputSlot);
 _    __  _   _ return;
      _     }
   __ _ }
  _ }

_ _ ImGui::Node* RenderGraphUI::NodeGraphEditorGui::createNode(int,_const ImVec2&_pos, const_ImGui::NodeGraphEditor&)
 _  {