本文整理汇总了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");
//.........这里部分代码省略.........
示例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);
}