當前位置: 首頁>>代碼示例>>C#>>正文


C# ObjectCreator.addManager方法代碼示例

本文整理匯總了C#中WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.addManager方法的典型用法代碼示例。如果您正苦於以下問題:C# ObjectCreator.addManager方法的具體用法?C# ObjectCreator.addManager怎麽用?C# ObjectCreator.addManager使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WinterLeaf.Engine.Classes.View.Creators.ObjectCreator的用法示例。


在下文中一共展示了ObjectCreator.addManager方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: initRenderManager

        public static void initRenderManager()
        {
            if ("DiffuseRenderPassManager".isObject())
                throw new Exception("initRenderManager() - DiffuseRenderPassManager already initialized!");

            #region 	new RenderPassManager( DiffuseRenderPassManager );

            RenderPassManager DiffuseRenderPassManager = new ObjectCreator("RenderPassManager", "DiffuseRenderPassManager").Create();

            #endregion

            // This token, and the associated render managers, ensure that driver MSAA 
            // does not get used for Advanced Lighting renders.  The 'AL_FormatResolve' 
            // PostEffect copies the result to the backbuffer.

            #region  new RenderFormatToken(AL_FormatToken)

            ObjectCreator oc = new ObjectCreator("RenderFormatToken", "AL_FormatToken");
            oc["enabled"] = "false";
            oc["format"] = "GFXFormatR8G8B8A8";
            oc["depthFormat"] = "GFXFormatD24S8";
            oc["aaLevel"] = 0; // -1 = match backbuffer
            // The contents of the back buffer before this format token is executed
            // is provided in $inTex
            oc["copyEffect"] = "AL_FormatCopy";
            // The contents of the render target created by this format token is
            // provided in $inTex
            oc["resolveEffect"] = "AL_FormatCopy";
            oc.Create();

            #endregion

            #region DiffuseRenderPassManager.addManager( new RenderPassStateBin() { renderOrder = 0.001; stateToken = AL_FormatToken; } );

            oc = new ObjectCreator("RenderPassStateBin");
            oc["renderOrder"] = 0.001f;
            oc["stateToken"] = "AL_FormatToken";

            DiffuseRenderPassManager.addManager(oc.Create().AsString());

            #endregion

            // We really need to fix the sky to render after all the 
            // meshes... but that causes issues in reflections.

            #region DiffuseRenderPassManager.addManager( new RenderObjectMgr() { bintype = "Sky"; renderOrder = 0.1; processAddOrder = 0.1; } );

            oc = new ObjectCreator("RenderObjectMgr");
            oc["bintype"] = "\"Sky\"";
            oc["renderOrder"] = 0.1f;
            oc["processAddOrder"] = 0.1f;
            DiffuseRenderPassManager.addManager(oc.Create().AsString());

            #endregion

            //DiffuseRenderPassManager.addManager( new RenderVistaMgr()               { bintype = "Vista"; renderOrder = 0.15; processAddOrder = 0.15; } );

            #region DiffuseRenderPassManager.addManager( new RenderObjectMgr()              { bintype = "Begin"; renderOrder = 0.2; processAddOrder = 0.2; } );

            oc = new ObjectCreator("RenderObjectMgr");
            oc["bintype"] = "\"Begin\"";
            oc["renderOrder"] = 0.2f;
            oc["processAddOrder"] = 0.2f;
            DiffuseRenderPassManager.addManager(oc.Create().AsString());

            #endregion

            // Normal mesh rendering.

            #region DiffuseRenderPassManager.addManager( new RenderTerrainMgr()             { renderOrder = 0.4; processAddOrder = 0.4; } );

            oc = new ObjectCreator("RenderTerrainMgr");
            oc["renderOrder"] = 0.4f;
            oc["processAddOrder"] = 0.4f;
            DiffuseRenderPassManager.addManager(oc.Create().AsString());

            #endregion

            #region DiffuseRenderPassManager.addManager( new RenderMeshMgr()                { bintype = "Mesh"; renderOrder = 0.5; processAddOrder = 0.5; } );

            oc = new ObjectCreator("RenderMeshMgr");
            oc["bintype"] = "\"Mesh\"";
            oc["renderOrder"] = 0.5f;
            oc["processAddOrder"] = 0.5f;
            DiffuseRenderPassManager.addManager(oc.Create().AsString());

            #endregion

            #region DiffuseRenderPassManager.addManager( new RenderImposterMgr()            { renderOrder = 0.56; processAddOrder = 0.56; } );

            oc = new ObjectCreator("RenderImposterMgr");
            oc["renderOrder"] = 0.56f;
            oc["processAddOrder"] = 0.56f;
            DiffuseRenderPassManager.addManager(oc.Create().AsString());

            #endregion

            #region DiffuseRenderPassManager.addManager( new RenderObjectMgr()              { bintype = "Object"; renderOrder = 0.6; processAddOrder = 0.6; } );

            oc = new ObjectCreator("RenderObjectMgr");
//.........這裏部分代碼省略.........
開發者ID:souxiaosou,項目名稱:OmniEngine.Net,代碼行數:101,代碼來源:renderManager.cs

示例2: onActivateBasicLM

        public static void onActivateBasicLM()
        {
            // If HDR is enabled... enable the special format token.
            if ((omni.sGlobal["$platform"] == "macos") || ((PostEffect) "HDRPostFx").isEnabledX())
                ((RenderFormatToken) "AL_FormatToken").enable();
            // Create render pass for projected shadow.

            RenderPassManager BL_ProjectedShadowRPM = new ObjectCreator("RenderPassManager", "BL_ProjectedShadowRPM").Create();

            // Create the mesh bin and add it to the manager.

            RenderMeshMgr meshbin = new ObjectCreator("RenderMeshMgr").Create();

            BL_ProjectedShadowRPM.addManager(meshbin);
            // Add both to the root group so that it doesn't
            // end up in the MissionCleanup instant group.

            SimSet rootGroup = "RootGroup";
            rootGroup.pushToBack(BL_ProjectedShadowRPM);
            rootGroup.pushToBack(meshbin);
        }
開發者ID:souxiaosou,項目名稱:OmniEngine.Net,代碼行數:21,代碼來源:init.cs


注:本文中的WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.addManager方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。