Example #1
0
        public void RenderBorderFront(AGSBoundingBox square)
        {
            if (_settings.WindowSize.Equals(_lastWindowSize) && _lastSquare.SameSize(square) &&
                _glUtils.DrawQuad(_frameBuffer, square, _quad))
            {
                return;
            }

            _frameBuffer?.Dispose();
            _lastSquare     = square;
            _lastWindowSize = _settings.WindowSize;

            float width  = _glUtils.CurrentResolution.Width - _padding;
            float height = _glUtils.CurrentResolution.Height - _padding;

            _frameBuffer = _glUtils.BeginFrameBuffer(square, _settings);
            if (_frameBuffer == null)
            {
                return;
            }
            _glUtils.DrawLine(_padding, _padding, width, height, _lineWidth, _color.R, _color.G, _color.B, _color.A);
            _glUtils.DrawLine(_padding, height, width, _padding, _lineWidth, _color.R, _color.G, _color.B, _color.A);

            _frameBuffer.End();

            _glUtils.DrawQuad(_frameBuffer, square, _quad);
        }
Example #2
0
        public void Render(IObject obj, IViewport viewport)
        {
            float x1 = obj.IgnoreViewport ? X1 : X1 - viewport.X;
            float x2 = obj.IgnoreViewport ? X2 : X2 - viewport.X;

            _glUtils.DrawLine(x1, Y1, x2, Y2, 1f, 1f, 0f, 0f, 1f);
        }
Example #3
0
        public void RenderBorderFront(AGSBoundingBox square)
        {
            if (_glUtils.DrawQuad(_frameBuffer, square, _quad))
            {
                return;
            }

            float width  = _glUtils.CurrentResolution.Width - _padding;
            float height = _glUtils.CurrentResolution.Height - _padding;

            _frameBuffer = _glUtils.BeginFrameBuffer(square, _settings);
            if (_frameBuffer == null)
            {
                return;
            }
            _glUtils.DrawLine(_padding, _padding, width, height, _lineWidth, _color.R, _color.G, _color.B, _color.A);
            _glUtils.DrawLine(_padding, height, width, _padding, _lineWidth, _color.R, _color.G, _color.B, _color.A);

            _frameBuffer.End();

            _glUtils.DrawQuad(_frameBuffer, square, _quad);
        }
Example #4
0
 public void Render()
 {
     _utils.DrawLine(_x1, _y1, _x2, _y2, 1f, 1f, 0f, 0f, 1f);
 }