本文整理汇总了C#中Axiom.Core.Camera.NotifyRenderedBatches方法的典型用法代码示例。如果您正苦于以下问题:C# Camera.NotifyRenderedBatches方法的具体用法?C# Camera.NotifyRenderedBatches怎么用?C# Camera.NotifyRenderedBatches使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axiom.Core.Camera
的用法示例。
在下文中一共展示了Camera.NotifyRenderedBatches方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderScene
//.........这里部分代码省略.........
this.targetRenderSystem.AmbientLight = this.ambientColor;
// Tell params about render target
this.autoParamDataSource.RenderTarget = viewport.Target;
// set fog params
float fogScale = 1f;
if ( this.fogMode == FogMode.None )
{
fogScale = 0f;
}
this.autoParamDataSource.FogParams = new Vector4( this.fogStart, this.fogEnd, fogScale, 0 );
// set the time in the auto param data source
//autoParamDataSource.Time = ((float)Root.Instance.Timer.Milliseconds) / 1000f;
// Set camera window clipping planes (if any)
if ( this.targetRenderSystem.Capabilities.HasCapability( Capabilities.UserClipPlanes ) )
{
// TODO: Add ClipPlanes to RenderSystem.cs
if ( camera.IsWindowSet )
{
targetRenderSystem.ResetClipPlanes();
IList<Plane> planeList = camera.WindowPlanes;
for ( ushort i = 0; i < 4; ++i )
{
targetRenderSystem.AddClipPlane( planeList[ i ] );
//this.targetRenderSystem.EnableClipPlane( i, true );
//this.targetRenderSystem.SetClipPlane( i, planeList[ i ] );
}
}
// this disables any user-set clipplanes... this should be done manually
//else
//{
// for (ushort i = 0; i < 4; ++i)
// {
// targetRenderSystem.EnableClipPlane(i, false);
// }
//}
}
// Prepare render queue for receiving new objects
this.PrepareRenderQueue();
// Parse the scene and tag visibles
if ( this.findVisibleObjects )
{
if ( this.PreFindVisibleObjects != null )
PreFindVisibleObjects( this, this.illuminationStage, viewport );
this.FindVisibleObjects( camera, this.illuminationStage == IlluminationRenderStage.RenderToTexture );
if ( this.PostFindVisibleObjects != null )
PostFindVisibleObjects( this, this.illuminationStage, viewport );
}
// Add overlays, if viewport deems it
if ( viewport.ShowOverlays && this.illuminationStage != IlluminationRenderStage.RenderToTexture )
{
// Queue overlays for rendering
OverlayManager.Instance.QueueOverlaysForRendering( camera, this.GetRenderQueue(), viewport );
}
// queue overlays and skyboxes for rendering
if ( viewport.ShowSkies && this.findVisibleObjects &&
this.illuminationStage != IlluminationRenderStage.RenderToTexture )
{
this.QueueSkiesForRendering( camera );
}
// begin frame geometry count
this.targetRenderSystem.BeginGeometryCount();
// clear the device if need be
if ( viewport.ClearEveryFrame )
{
this.targetRenderSystem.ClearFrameBuffer( viewport.ClearBuffers, viewport.BackgroundColor );
}
// being a frame of animation
this.targetRenderSystem.BeginFrame();
// use the camera's current scene detail level
this.targetRenderSystem.PolygonMode = camera.PolygonMode;
// Set initial camera state
this.targetRenderSystem.ProjectionMatrix = camera.ProjectionMatrixRS;
this.targetRenderSystem.ViewMatrix = camera.ViewMatrix;
// render all visible objects
this.RenderVisibleObjects();
// end the current frame
this.targetRenderSystem.EndFrame();
// Notify camera of the number of rendered faces
camera.NotifyRenderedFaces( this.targetRenderSystem.FaceCount );
// Notify camera of the number of rendered batches
camera.NotifyRenderedBatches( this.targetRenderSystem.BatchCount );
}