Пример #1
0
        public override Result Render()
        {
            Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);
            if (Device.BeginScene().IsSuccess&& MainWindow != null)
            {
                if (_hmRenderer != null)
                {
                    _hmRenderer.Render();
                }

                var rs = new[] {
                    new Rectangle(10, 10, 0, 0),
                    new Rectangle(10, 30, 0, 0),
                    new Rectangle(10, 50, 0, 0),
                    new Rectangle(10, 70, 0, 0)
                };

                Font.DrawString(null, String.Format("Arrows: Move camera"), rs[0], DrawTextFormat.Left | DrawTextFormat.Top | DrawTextFormat.NoClip, Color.White);
                Font.DrawString(null, String.Format("WASD: Move selection"), rs[1], DrawTextFormat.Left | DrawTextFormat.Top | DrawTextFormat.NoClip, Color.White);
                Font.DrawString(null, String.Format("+/-: Raise/Lower terrain"), rs[2], DrawTextFormat.Left | DrawTextFormat.Top | DrawTextFormat.NoClip, Color.White);
                Font.DrawString(null, String.Format("Space: Smooth terrain"), rs[3], DrawTextFormat.Left | DrawTextFormat.Top | DrawTextFormat.NoClip, Color.White);
                Device.EndScene();
                Device.Present();
            }
            return(ResultCode.Success);
        }
Пример #2
0
        public override Result Render()
        {
            Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);
            if (Device.BeginScene().IsSuccess&& MainWindow != null)
            {
                if (_hmRenderer != null)
                {
                    _hmRenderer.Render();
                }

                Font.DrawString(null, String.Format("Size: {0} \t(UP/DOWN Arrow)", _size), new Rectangle(110, 10, 0, 0), DrawTextFormat.Left | DrawTextFormat.Top | DrawTextFormat.NoClip, Color.White);
                Font.DrawString(null, String.Format("Persistence: {0} \t(Left/Right Arrow)", _amplitude), new Rectangle(110, 30, 0, 0), DrawTextFormat.Left | DrawTextFormat.Top | DrawTextFormat.NoClip, Color.White);
                Font.DrawString(null, String.Format("Redraw: (SPACE)"), new Rectangle(110, 50, 0, 0), DrawTextFormat.Left | DrawTextFormat.Top | DrawTextFormat.NoClip, Color.White);
                Device.EndScene();
                Device.Present();
            }
            return(ResultCode.Success);
        }
Пример #3
0
        public override Result Render()
        {
            Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);

            if (Device.BeginScene().IsSuccess&& MainWindow != null)
            {
                if (_hmRenderer != null)
                {
                    _hmRenderer.Render();
                }

                var r = MainWindow.ClientRectangle;

                Font.DrawString(null, "Space: Change Image", r, DrawTextFormat.Left | DrawTextFormat.NoClip | DrawTextFormat.Top, Color.White);

                Device.EndScene();
                Device.Present();
            }
            return(ResultCode.Success);
        }