Fusion.Engine.Graphics.SpriteEngine.DrawSprites C# (CSharp) Method

DrawSprites() public method

Draws sprite laters and all sublayers.
public DrawSprites ( GameTime gameTime, StereoEye stereoEye, RenderTargetSurface surface, IEnumerable layers ) : void
gameTime Fusion.Engine.Common.GameTime
stereoEye StereoEye
surface Fusion.Drivers.Graphics.RenderTargetSurface
layers IEnumerable
return void
		public void DrawSprites ( GameTime gameTime, StereoEye stereoEye, RenderTargetSurface surface, IEnumerable<SpriteLayer> layers )
		{
			device.ResetStates();
			//device.RestoreBackbuffer();
			device.SetTargets( null, surface );

			DrawSpritesRecursive( gameTime, stereoEye, surface, layers, Matrix.Identity, new Color4(1f,1f,1f,1f) );
		}

Usage Example

Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="gameTime"></param>
        /// <param name="stereoEye"></param>
        internal void Draw(GameTime gameTime, StereoEye stereoEye)
        {
            Counters.Reset();

            var targetColorSurface = Device.Display.BackbufferColor.Surface;
            var targetDepthSurface = Device.Display.BackbufferDepth.Surface;

            //	render world :
            RenderWorld.Render(gameTime, stereoEye, targetColorSurface);

            //	draw sprites :
            SpriteEngine.DrawSprites(gameTime, stereoEye, targetColorSurface, SpriteLayers);

            if (ShowCounters)
            {
                Counters.PrintCounters();
            }
        }