private void Init() { this.GraphicsDevice = window.CreateDevice(Settings.Debug ? DeviceCreationFlags.Debug : DeviceCreationFlags.None); GraphicsDevice.MakeCurrent(); Log.Debug("Got GraphicsDevice: " + GraphicsDevice.GetType().FullName); Log.Debug("Got window: [width: {0}, height: {1}]", GraphicsDevice.DefaultWindow.Width, GraphicsDevice.DefaultWindow.Height); Log.WriteFields(LogLevel.Verbose, Settings); switch (Settings.AudioAPI) { case AudioAPI.OpenAL: this.AudioDevice = new DotGame.OpenAL.AudioDevice(Settings.AudioDevice); break; } AssetManager = new AssetManager(this); ShaderManager = new ShaderManager(this); RenderStatePool = new RenderStatePool(this); Log.Debug("Got AudioDevice: " + this.AudioDevice.GetType().FullName); GraphicsDevice.DetachCurrent(); }