2012-08-09 09:45:04 +00:00
|
|
|
#region Using Statements
|
2011-10-31 05:36:24 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Collections.ObjectModel;
|
2011-11-03 12:37:07 +00:00
|
|
|
using ANX.Framework.NonXNA;
|
2011-10-31 05:36:24 +00:00
|
|
|
|
|
|
|
#endregion // Using Statements
|
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-10-31 05:36:24 +00:00
|
|
|
|
|
|
|
namespace ANX.Framework.Graphics
|
|
|
|
{
|
|
|
|
public sealed class GraphicsAdapter
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
private static List<GraphicsAdapter> adapters;
|
|
|
|
private DisplayModeCollection supportedDisplayModes;
|
|
|
|
|
|
|
|
static GraphicsAdapter()
|
|
|
|
{
|
|
|
|
adapters = new List<GraphicsAdapter>();
|
|
|
|
|
2011-11-11 15:21:41 +00:00
|
|
|
IRenderSystemCreator renderSystemCreator = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>();
|
2011-11-03 12:37:07 +00:00
|
|
|
adapters.AddRange(renderSystemCreator.GetAdapterList());
|
|
|
|
}
|
2011-10-31 05:36:24 +00:00
|
|
|
|
|
|
|
public static ReadOnlyCollection<GraphicsAdapter> Adapters
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
return new ReadOnlyCollection<GraphicsAdapter>(adapters);
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static GraphicsAdapter DefaultAdapter
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
GraphicsAdapter defaultAdapter = adapters.Where(a => a.IsDefaultAdapter).First<GraphicsAdapter>();
|
|
|
|
return defaultAdapter;
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static bool UseNullDevice
|
|
|
|
{
|
|
|
|
get;
|
|
|
|
set;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static bool UseReferenceDevice
|
|
|
|
{
|
|
|
|
get;
|
|
|
|
set;
|
|
|
|
}
|
|
|
|
|
|
|
|
public DisplayMode CurrentDisplayMode
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public string Description
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int DeviceId
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
get;
|
|
|
|
set;
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public string DeviceName
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
get;
|
|
|
|
set;
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public bool IsDefaultAdapter
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
get;
|
|
|
|
set;
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public bool IsWideScreen
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public IntPtr MonitorHandle
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int Revision
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
get;
|
|
|
|
set;
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int SubSystemId
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
get;
|
|
|
|
set;
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public DisplayModeCollection SupportedDisplayModes
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
return this.supportedDisplayModes;
|
|
|
|
}
|
|
|
|
set
|
|
|
|
{
|
|
|
|
this.supportedDisplayModes = value;
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int VendorId
|
|
|
|
{
|
2011-11-03 12:37:07 +00:00
|
|
|
get;
|
|
|
|
set;
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public bool IsProfileSupported(GraphicsProfile graphicsProfile)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool QueryBackBufferFormat(GraphicsProfile graphicsProfile, SurfaceFormat format, DepthFormat depthFormat, int multiSampleCount, out SurfaceFormat selectedFormat, out DepthFormat selectedDepthFormat, out int selectedMultiSampleCount)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool QueryRenderTargetFormat(GraphicsProfile graphicsProfile, SurfaceFormat format, DepthFormat depthFormat, int multiSampleCount, out SurfaceFormat selectedFormat, out DepthFormat selectedDepthFormat, out int selectedMultiSampleCount)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|