DrawAfter2D() публичный Метод

public DrawAfter2D ( Microsoft.Xna.Framework.Graphics.GraphicsDevice gd, FSO.LotView.WorldState state ) : void
gd Microsoft.Xna.Framework.Graphics.GraphicsDevice
state FSO.LotView.WorldState
Результат void
Пример #1
0
        protected virtual void InternalDraw(GraphicsDevice device)
        {
            device.RasterizerState = RasterizerState.CullNone;
            State.PrepareLighting();
            State._2D.OutputDepth = true;

            State._3D.Begin(device);
            State._2D.Begin(this.State.Camera);

            var pxOffset = -State.WorldSpace.GetScreenOffset();

            //State._2D.PreciseZoom = State.PreciseZoom;
            State._2D.ResetMatrices(device.Viewport.Width, device.Viewport.Height);
            _3DWorld.DrawBefore2D(device, State);

            _2DWorld.Draw(device, State);

            State._2D.Pause();
            State._2D.Resume();

            _3DWorld.DrawAfter2D(device, State);
            State._2D.SetScroll(pxOffset);
            State._2D.End();
            State._3D.End();

            foreach (var particle in Blueprint.Particles)
            {
                particle.Draw(device, State);
            }

            State._2D.OutputDepth = false;
        }
Пример #2
0
        private void InternalDraw(GraphicsDevice device)
        {
            State.PrepareLighting();
            State._2D.OutputDepth = true;

            State._3D.Begin(device);
            State._2D.Begin(this.State.Camera);

            var pxOffset = -State.WorldSpace.GetScreenOffset();

            //State._2D.PreciseZoom = State.PreciseZoom;
            State._2D.ResetMatrices(device.Viewport.Width, device.Viewport.Height);
            _3DWorld.DrawBefore2D(device, State);

            _2DWorld.Draw(device, State);

            State._2D.Pause();
            State._2D.Resume();

            _3DWorld.DrawAfter2D(device, State);
            State._2D.SetScroll(pxOffset);
            State._2D.End();
            State._3D.End();
            State._2D.OutputDepth = false;
        }
Пример #3
0
        /// <summary>
        /// We will just take over the whole rendering of this scene :)
        /// </summary>
        /// <param name="device"></param>
        public override void Draw(GraphicsDevice device)
        {
            if (HasInit == false)
            {
                return;
            }

            State._3D.Begin(device);
            State._2D.Begin(this.State.Camera);

            var pxOffset = -State.WorldSpace.GetScreenOffset();

            State._2D.ResetMatrices(device.Viewport.Width, device.Viewport.Height);
            _3DWorld.DrawBefore2D(device, State);

            _2DWorld.Draw(device, State);
            State._2D.Pause();
            State._2D.Resume();
            _3DWorld.DrawAfter2D(device, State);
            State._2D.SetScroll(pxOffset);
            State._2D.End();
            State._3D.End();
        }