/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { FlxS.GraphicsDevice = GraphicsDevice; FlxS.GraphicsDevice.Viewport = new Viewport(0, 0, _screenSizeX, _screenSizeY); FlxS.RenderTarget = new RenderTarget2D( FlxS.GraphicsDevice, _gameSizeX, _gameSizeY, false, FlxS.GraphicsDevice.DisplayMode.Format, DepthFormat.None, 0, RenderTargetUsage.DiscardContents); _fxHelperTexture = new Texture2D(FlxS.GraphicsDevice, 1, 1, false, SurfaceFormat.Color); _fxHelperTexture.SetData(new [] { Color.White }); FlxS.SpriteBatch = new SpriteBatch(GraphicsDevice); _flxGame = new FlxGame( _gameSizeX, _gameSizeY, _initialState, _zoom, _gameFramerate, _flashFramerate, _useSystemCursor); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { FlxS.GraphicsDevice = GraphicsDevice; FlxS.GraphicsDevice.Viewport = new Viewport(0, 0, _screenSizeX, _screenSizeY); FlxS.RenderTarget = new RenderTarget2D( FlxS.GraphicsDevice, _gameSizeX, _gameSizeY, false, FlxS.GraphicsDevice.DisplayMode.Format, DepthFormat.None, 0, RenderTargetUsage.DiscardContents); _fxHelperTexture = new Texture2D(FlxS.GraphicsDevice, 1, 1, false, SurfaceFormat.Color); _fxHelperTexture.SetData(new [] { Color.White }); FlxS.SpriteBatch = new SpriteBatch(GraphicsDevice); _flxGame = new FlxGame( _gameSizeX, _gameSizeY, _initialState, _zoom, _gameFramerate, _flashFramerate, _useSystemCursor); }