GraphicsDeviceManager is now marked as complete by ANXStatusComparer but there are still many NotImplementedException in this class.
This commit is contained in:
parent
593f33b541
commit
2177c31d66
@ -58,13 +58,21 @@ namespace ANX.Framework
|
|||||||
{
|
{
|
||||||
public class GraphicsDeviceManager : IGraphicsDeviceManager, IDisposable, IGraphicsDeviceService
|
public class GraphicsDeviceManager : IGraphicsDeviceManager, IDisposable, IGraphicsDeviceService
|
||||||
{
|
{
|
||||||
|
#region Private Members
|
||||||
private Game game;
|
private Game game;
|
||||||
private GraphicsDevice graphicsDevice;
|
private GraphicsDevice graphicsDevice;
|
||||||
|
|
||||||
|
public static readonly int DefaultBackBufferWidth = 800;
|
||||||
|
public static readonly int DefaultBackBufferHeight = 600; //TODO: this is 480 in the original XNA
|
||||||
|
|
||||||
|
public event EventHandler<EventArgs> Disposed;
|
||||||
public event EventHandler<EventArgs> DeviceCreated;
|
public event EventHandler<EventArgs> DeviceCreated;
|
||||||
public event EventHandler<EventArgs> DeviceDisposing;
|
public event EventHandler<EventArgs> DeviceDisposing;
|
||||||
public event EventHandler<EventArgs> DeviceReset;
|
public event EventHandler<EventArgs> DeviceReset;
|
||||||
public event EventHandler<EventArgs> DeviceResetting;
|
public event EventHandler<EventArgs> DeviceResetting;
|
||||||
|
public event EventHandler<PreparingDeviceSettingsEventArgs> PreparingDeviceSettings;
|
||||||
|
|
||||||
|
#endregion // Private Members
|
||||||
|
|
||||||
public GraphicsDeviceManager(Game game)
|
public GraphicsDeviceManager(Game game)
|
||||||
{
|
{
|
||||||
@ -95,8 +103,8 @@ namespace ANX.Framework
|
|||||||
|
|
||||||
PresentationParameters presentationParameters = new PresentationParameters();
|
PresentationParameters presentationParameters = new PresentationParameters();
|
||||||
presentationParameters.DeviceWindowHandle = game.Window.Handle;
|
presentationParameters.DeviceWindowHandle = game.Window.Handle;
|
||||||
presentationParameters.BackBufferWidth = 800; //TODO: set real default sizes
|
presentationParameters.BackBufferWidth = DefaultBackBufferWidth; //TODO: set real default sizes
|
||||||
presentationParameters.BackBufferHeight = 600;
|
presentationParameters.BackBufferHeight = DefaultBackBufferHeight;
|
||||||
this.graphicsDevice = new GraphicsDevice(presentationParameters);
|
this.graphicsDevice = new GraphicsDevice(presentationParameters);
|
||||||
|
|
||||||
//TODO: hookup events
|
//TODO: hookup events
|
||||||
@ -107,14 +115,139 @@ namespace ANX.Framework
|
|||||||
this.graphicsDevice.Present();
|
this.graphicsDevice.Present();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ApplyChanges()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleFullScreen()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected GraphicsDeviceInformation FindBestDevice(bool anySuitableDevice)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual bool CanResetDevice(GraphicsDeviceInformation newDeviceInfo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void RankDevices(List<GraphicsDeviceInformation> foundDevices)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void OnDeviceCreated(Object sender, EventArgs args)
|
||||||
|
{
|
||||||
|
if (DeviceCreated != null)
|
||||||
|
{
|
||||||
|
DeviceCreated(sender, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void OnDeviceDisposing(Object sender, EventArgs args)
|
||||||
|
{
|
||||||
|
if (DeviceDisposing != null)
|
||||||
|
{
|
||||||
|
DeviceDisposing(sender, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void OnDeviceReset(Object sender, EventArgs args)
|
||||||
|
{
|
||||||
|
if (DeviceReset != null)
|
||||||
|
{
|
||||||
|
DeviceReset(sender, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void OnDeviceResetting(Object sender, EventArgs args)
|
||||||
|
{
|
||||||
|
if (DeviceResetting != null)
|
||||||
|
{
|
||||||
|
DeviceResetting(sender, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void OnPreparingDeviceSettings(Object sender, PreparingDeviceSettingsEventArgs args)
|
||||||
|
{
|
||||||
|
if (PreparingDeviceSettings != null)
|
||||||
|
{
|
||||||
|
PreparingDeviceSettings(sender, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing
|
||||||
|
)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public GraphicsDevice GraphicsDevice
|
public GraphicsDevice GraphicsDevice
|
||||||
{
|
{
|
||||||
get { return this.graphicsDevice; }
|
get { return this.graphicsDevice; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GraphicsProfile GraphicsProfile
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public DepthFormat PreferredDepthStencilFormat
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public SurfaceFormat PreferredBackBufferFormat
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int PreferredBackBufferWidth
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int PreferredBackBufferHeight
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsFullScreen
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool SynchronizeWithVerticalRetrace
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool PreferMultiSampling
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public DisplayOrientation SupportedOrientations
|
||||||
|
{
|
||||||
|
get { throw new NotImplementedException(); }
|
||||||
|
set { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user