public GraphicsManager(GraphicsDevice graphicsDevice, GameWindow gameWindow, ContentManager content) { if (graphicsDevice == null) { throw new ArgumentNullException("graphicsDevice"); } if (content == null) { throw new ArgumentNullException("content"); } GraphicsDevice = graphicsDevice; graphicsDevice.DeviceResetting += OnGraphicsDeviceResetting; //graphicsDevice.DeviceReset += OnGraphicsDeviceReset; GraphicsDevice.Disposing += OnGraphicsDeviceDisposing; Content = content; RenderTargetPool = new RenderTargetPool(this); Screens = new GraphicsScreenCollection(); if (gameWindow != null) { GameForm = PlatformHelper.GetForm(gameWindow.Handle); } PresentationTargets = new PresentationTargetCollection(); PresentationTargets.CollectionChanged += OnPresentationTargetsChanged; EffectInterpreters = new EffectInterpreterCollection { new StockEffectInterpreter(), new DefaultEffectInterpreter(), new SceneEffectInterpreter(), #if !WINDOWS_PHONE && !XBOX360 new TerrainEffectInterpreter(), #endif new Dxsas08EffectInterpreter(), }; EffectBinders = new EffectBinderCollection { new StockEffectBinder(), new DefaultEffectBinder(this), new SceneEffectBinder(), #if !WINDOWS_PHONE && !XBOX360 new TerrainEffectBinder(), #endif }; Data = new Dictionary <string, object>(); Frame = -1; ShapeMeshCache = new ShapeMeshCache(this); }
public GraphicsManager(GraphicsDevice graphicsDevice, GameWindow gameWindow, ContentManager content) { if (graphicsDevice == null) throw new ArgumentNullException("graphicsDevice"); if (content == null) throw new ArgumentNullException("content"); GraphicsDevice = graphicsDevice; graphicsDevice.DeviceResetting += OnGraphicsDeviceResetting; //graphicsDevice.DeviceReset += OnGraphicsDeviceReset; GraphicsDevice.Disposing += OnGraphicsDeviceDisposing; Content = content; RenderTargetPool = new RenderTargetPool(this); Screens = new GraphicsScreenCollection(); if (gameWindow != null) GameForm = PlatformHelper.GetForm(gameWindow.Handle); PresentationTargets = new PresentationTargetCollection(); PresentationTargets.CollectionChanged += OnPresentationTargetsChanged; EffectInterpreters = new EffectInterpreterCollection { new StockEffectInterpreter(), new DefaultEffectInterpreter(), new SceneEffectInterpreter(), #if !WINDOWS_PHONE && !XBOX360 new TerrainEffectInterpreter(), #endif new Dxsas08EffectInterpreter(), }; EffectBinders = new EffectBinderCollection { new StockEffectBinder(), new DefaultEffectBinder(this), new SceneEffectBinder(), #if !WINDOWS_PHONE && !XBOX360 new TerrainEffectBinder(), #endif }; Data = new Dictionary<string, object>(); Frame = -1; ShapeMeshCache = new ShapeMeshCache(this); }