protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); Viewport viewport= this.GraphicsDevice.Viewport; center = new Vector2(viewport.Width / 2, viewport.Height / 2); radius = Math.Min(center.X, center.Y) - 10; lineRenderer = new LineRenderer(this.GraphicsDevice); }
protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); renderTarget = new RenderTarget2D( this.GraphicsDevice, this.GraphicsDevice.PresentationParameters.BackBufferWidth, this.GraphicsDevice.PresentationParameters.BackBufferHeight, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None, 0, RenderTargetUsage.PreserveContents); this.GraphicsDevice.SetRenderTarget(renderTarget); this.GraphicsDevice.Clear(Color.Navy); this.GraphicsDevice.SetRenderTarget(null); vectorRenderer = new LineRenderer(this.GraphicsDevice); }