public override void Initialize() { var settings = services.GetService <IDirectXDeviceSettings>(); BitmapTarget = ToDispose(BitmapTarget.New(Name, Device, settings.PreferredBackBufferWidth, settings.PreferredBackBufferHeight, settings.PreferredBackBufferFormat)); Initialize(BitmapTarget); }
public override void Initialize() { try { var swapChainService = Services.GetService <ISwapChainPresenterService>(); BitmapTarget = ToDispose(BitmapTarget.New("BT_Backbuffer", Device, swapChainService.SwapChain.GetBackBuffer <Surface2>(0))); Initialize(BitmapTarget); } catch (ArgumentException e) { LogEvent.Engine.Warning("A SwapChain is required"); LogEvent.Engine.Error(e); } }