- Introduced new MediaSystem creator (handling the whole Media namespace)
- Made the plugin handling internally way simpler (no tons of duplicated code anymore) - Added empty MediaSystem to have a default for now (Windows.OpenAL) - Added a PercentageCompleteAttribute which will be used to mark the current state of a class (0-100%)
This commit is contained in:
parent
ec48a838c7
commit
1cebf6f91e
@ -90,7 +90,8 @@ namespace ANX.Framework.TestCenter.Strukturen.Input
|
|||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.Initialize();
|
AddInSystemFactory.Instance.Initialize();
|
||||||
|
|
||||||
AddInSystemFactory.Instance.PreferredInputSystem = "XInput";
|
AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
|
AddInType.InputSystem, "XInput");
|
||||||
XNAGamePadState xnastate = XNAGamePad.GetState(xnaplayer);
|
XNAGamePadState xnastate = XNAGamePad.GetState(xnaplayer);
|
||||||
ANXGamePadState anxstate = ANXGamePad.GetState(anxplayer);
|
ANXGamePadState anxstate = ANXGamePad.GetState(anxplayer);
|
||||||
|
|
||||||
|
@ -76,7 +76,8 @@ namespace ANX.Framework.TestCenter.Strukturen.Input
|
|||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.Initialize();
|
AddInSystemFactory.Instance.Initialize();
|
||||||
AddInSystemFactory.Instance.PreferredInputSystem = "Test";
|
AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
|
AddInType.InputSystem, "Test");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,11 +134,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputDevices.Test", "In
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiRenderTarget", "Samples\MultiRenderTarget\MultiRenderTarget.csproj", "{9C9C6245-35C2-4230-8E17-9038A228227F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiRenderTarget", "Samples\MultiRenderTarget\MultiRenderTarget.csproj", "{9C9C6245-35C2-4230-8E17-9038A228227F}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MediaSystems", "MediaSystems", "{6EDED295-0F32-4D05-A8EA-02F4BF89CF35}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.MediaSystem.Windows.OpenAL", "MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj", "{97185A92-077D-4498-8B6A-8BFF04079044}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SubversionScc) = preSolution
|
|
||||||
Svn-Managed = True
|
|
||||||
Manager = AnkhSVN - Subversion Support for Visual Studio
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||||
@ -456,6 +456,16 @@ Global
|
|||||||
{9C9C6245-35C2-4230-8E17-9038A228227F}.Release|Mixed Platforms.Build.0 = Release|x86
|
{9C9C6245-35C2-4230-8E17-9038A228227F}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{9C9C6245-35C2-4230-8E17-9038A228227F}.Release|x86.ActiveCfg = Release|x86
|
{9C9C6245-35C2-4230-8E17-9038A228227F}.Release|x86.ActiveCfg = Release|x86
|
||||||
{9C9C6245-35C2-4230-8E17-9038A228227F}.Release|x86.Build.0 = Release|x86
|
{9C9C6245-35C2-4230-8E17-9038A228227F}.Release|x86.Build.0 = Release|x86
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -493,5 +503,10 @@ Global
|
|||||||
{E4FFD875-95FC-48F2-8B6D-8483D0B71666} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
{E4FFD875-95FC-48F2-8B6D-8483D0B71666} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||||
{BD648BB8-EF28-453C-B4F5-EE3C93EB4DAF} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
{BD648BB8-EF28-453C-B4F5-EE3C93EB4DAF} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||||
{6285F3EF-07DB-49C9-8CDE-A9092789FE4F} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
{6285F3EF-07DB-49C9-8CDE-A9092789FE4F} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||||
|
{97185A92-077D-4498-8B6A-8BFF04079044} = {6EDED295-0F32-4D05-A8EA-02F4BF89CF35}
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SubversionScc) = preSolution
|
||||||
|
Svn-Managed = True
|
||||||
|
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
@ -41,12 +41,6 @@
|
|||||||
<HintPath>..\lib\NLog\NLog.dll</HintPath>
|
<HintPath>..\lib\NLog\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Audio\AudioCategory.cs" />
|
<Compile Include="Audio\AudioCategory.cs" />
|
||||||
@ -420,7 +414,9 @@
|
|||||||
<Compile Include="Net\WriteLeaderboardsEventArgs.cs" />
|
<Compile Include="Net\WriteLeaderboardsEventArgs.cs" />
|
||||||
<Compile Include="NonXNA\AddIn.cs" />
|
<Compile Include="NonXNA\AddIn.cs" />
|
||||||
<Compile Include="NonXNA\AddInLoadingException.cs" />
|
<Compile Include="NonXNA\AddInLoadingException.cs" />
|
||||||
|
<Compile Include="NonXNA\AddInSystemInfo.cs" />
|
||||||
<Compile Include="NonXNA\AddInType.cs" />
|
<Compile Include="NonXNA\AddInType.cs" />
|
||||||
|
<Compile Include="NonXNA\Development\PercentageCompleteAttribute.cs" />
|
||||||
<Compile Include="NonXNA\InputDeviceFactory.cs" />
|
<Compile Include="NonXNA\InputDeviceFactory.cs" />
|
||||||
<Compile Include="NonXNA\InputSystem\IGamePadCreator.cs" />
|
<Compile Include="NonXNA\InputSystem\IGamePadCreator.cs" />
|
||||||
<Compile Include="NonXNA\InputSystem\IKeyboard.cs" />
|
<Compile Include="NonXNA\InputSystem\IKeyboard.cs" />
|
||||||
@ -430,6 +426,7 @@
|
|||||||
<Compile Include="NonXNA\InputSystem\IKeyboardCreator.cs" />
|
<Compile Include="NonXNA\InputSystem\IKeyboardCreator.cs" />
|
||||||
<Compile Include="NonXNA\InputSystem\IMouseCreator.cs" />
|
<Compile Include="NonXNA\InputSystem\IMouseCreator.cs" />
|
||||||
<Compile Include="NonXNA\InputSystem\IMotionSensingDeviceCreator.cs" />
|
<Compile Include="NonXNA\InputSystem\IMotionSensingDeviceCreator.cs" />
|
||||||
|
<Compile Include="NonXNA\MediaSystem\IMediaSystemCreator.cs" />
|
||||||
<Compile Include="NonXNA\NoInputDeviceException.cs" />
|
<Compile Include="NonXNA\NoInputDeviceException.cs" />
|
||||||
<Compile Include="NonXNA\RenderSystem\EffectProcessorOutputFormat.cs" />
|
<Compile Include="NonXNA\RenderSystem\EffectProcessorOutputFormat.cs" />
|
||||||
<Compile Include="NonXNA\ICreator.cs" />
|
<Compile Include="NonXNA\ICreator.cs" />
|
||||||
|
@ -108,36 +108,24 @@ namespace ANX.Framework
|
|||||||
throw new AddInLoadingException("Error while initializing AddInSystem.", ex);
|
throw new AddInLoadingException("Error while initializing AddInSystem.", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
IInputSystemCreator inputSystemCreator = AddInSystemFactory.Instance.GetDefaultCreator<IInputSystemCreator>();
|
AddSystemCreator<IInputSystemCreator>();
|
||||||
if (inputSystemCreator != null)
|
AddSystemCreator<ISoundSystemCreator>();
|
||||||
{
|
AddSystemCreator<IMediaSystemCreator>();
|
||||||
this.gameServices.AddService(typeof(IInputSystemCreator), inputSystemCreator);
|
IRenderSystemCreator renderSystemCreator =
|
||||||
}
|
AddSystemCreator<IRenderSystemCreator>();
|
||||||
|
|
||||||
ISoundSystemCreator soundSystemCreator = AddInSystemFactory.Instance.GetDefaultCreator<ISoundSystemCreator>();
|
|
||||||
if (soundSystemCreator != null)
|
|
||||||
{
|
|
||||||
this.gameServices.AddService(typeof(ISoundSystemCreator), soundSystemCreator);
|
|
||||||
}
|
|
||||||
|
|
||||||
IRenderSystemCreator renderSystemCreator = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>();
|
|
||||||
if (renderSystemCreator != null)
|
|
||||||
{
|
|
||||||
this.gameServices.AddService(typeof(IRenderSystemCreator), renderSystemCreator);
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.Info("creating GameHost");
|
logger.Info("creating GameHost");
|
||||||
|
|
||||||
if (renderSystemCreator != null)
|
if (renderSystemCreator != null)
|
||||||
{
|
{
|
||||||
this.host = renderSystemCreator.CreateGameHost(this);
|
this.host = renderSystemCreator.CreateGameHost(this);
|
||||||
|
|
||||||
this.host.Activated += new EventHandler<EventArgs>(this.HostActivated);
|
this.host.Activated += HostActivated;
|
||||||
this.host.Deactivated += new EventHandler<EventArgs>(this.HostDeactivated);
|
this.host.Deactivated += HostDeactivated;
|
||||||
this.host.Suspend += new EventHandler<EventArgs>(this.HostSuspend);
|
this.host.Suspend += HostSuspend;
|
||||||
this.host.Resume += new EventHandler<EventArgs>(this.HostResume);
|
this.host.Resume += HostResume;
|
||||||
this.host.Idle += new EventHandler<EventArgs>(this.HostIdle);
|
this.host.Idle += HostIdle;
|
||||||
this.host.Exiting += new EventHandler<EventArgs>(this.HostExiting);
|
this.host.Exiting += HostExiting;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -163,7 +151,19 @@ namespace ANX.Framework
|
|||||||
//TODO: implement
|
//TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void Initialize()
|
#region AddSystemCreator
|
||||||
|
private T AddSystemCreator<T>() where T : class, ICreator
|
||||||
|
{
|
||||||
|
T creator = AddInSystemFactory.Instance.GetDefaultCreator<T>();
|
||||||
|
if (creator != null)
|
||||||
|
{
|
||||||
|
this.gameServices.AddService(typeof(T), creator);
|
||||||
|
}
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
protected virtual void Initialize()
|
||||||
{
|
{
|
||||||
//TODO: implement
|
//TODO: implement
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#region Using Statements
|
using System;
|
||||||
using System;
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
|
||||||
|
|
||||||
#region License
|
#region License
|
||||||
|
|
||||||
@ -52,64 +50,48 @@ using System;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
public class GameTime
|
[PercentageComplete(100)]
|
||||||
{
|
public class GameTime
|
||||||
private TimeSpan elapsedGameTime;
|
{
|
||||||
private bool isRunningSlowly;
|
#region Public
|
||||||
private TimeSpan totalGameTime;
|
public TimeSpan ElapsedGameTime
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
internal set;
|
||||||
|
}
|
||||||
|
|
||||||
public GameTime()
|
public TimeSpan TotalGameTime
|
||||||
{
|
{
|
||||||
|
get;
|
||||||
|
internal set;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public bool IsRunningSlowly
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
internal set;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public GameTime(TimeSpan totalGameTime, TimeSpan elapsedGameTime)
|
#region Constructor
|
||||||
{
|
public GameTime()
|
||||||
this.totalGameTime = totalGameTime;
|
{
|
||||||
this.elapsedGameTime = elapsedGameTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GameTime(TimeSpan totalGameTime, TimeSpan elapsedGameTime, bool isRunningSlowly)
|
}
|
||||||
{
|
|
||||||
this.totalGameTime = totalGameTime;
|
|
||||||
this.elapsedGameTime = elapsedGameTime;
|
|
||||||
this.isRunningSlowly = isRunningSlowly;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimeSpan ElapsedGameTime
|
public GameTime(TimeSpan totalGameTime, TimeSpan elapsedGameTime)
|
||||||
{
|
{
|
||||||
get
|
this.TotalGameTime = totalGameTime;
|
||||||
{
|
this.ElapsedGameTime = elapsedGameTime;
|
||||||
return this.elapsedGameTime;
|
}
|
||||||
}
|
|
||||||
internal set
|
|
||||||
{
|
|
||||||
this.elapsedGameTime = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimeSpan TotalGameTime
|
public GameTime(TimeSpan totalGameTime, TimeSpan elapsedGameTime,
|
||||||
{
|
bool isRunningSlowly)
|
||||||
get
|
{
|
||||||
{
|
this.TotalGameTime = totalGameTime;
|
||||||
return this.totalGameTime;
|
this.ElapsedGameTime = elapsedGameTime;
|
||||||
}
|
this.IsRunningSlowly = isRunningSlowly;
|
||||||
internal set
|
}
|
||||||
{
|
#endregion
|
||||||
this.totalGameTime = value;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsRunningSlowly
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.isRunningSlowly;
|
|
||||||
}
|
|
||||||
internal set
|
|
||||||
{
|
|
||||||
this.isRunningSlowly = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,13 @@ namespace ANX.Framework.Media
|
|||||||
{
|
{
|
||||||
public static class MediaPlayer
|
public static class MediaPlayer
|
||||||
{
|
{
|
||||||
|
#region Events
|
||||||
|
public static event EventHandler<EventArgs> ActiveSongChanged;
|
||||||
|
public static event EventHandler<EventArgs> MediaStateChanged;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public
|
||||||
|
#region IsShuffled (TODO)
|
||||||
public static bool IsShuffled
|
public static bool IsShuffled
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -62,7 +69,9 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IsRepeating (TODO)
|
||||||
public static bool IsRepeating
|
public static bool IsRepeating
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -74,7 +83,9 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Volume (TODO)
|
||||||
public static float Volume
|
public static float Volume
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -86,7 +97,9 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IsMuted (TODO)
|
||||||
public static bool IsMuted
|
public static bool IsMuted
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -98,7 +111,9 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IsVisualizationEnabled (TODO)
|
||||||
public static bool IsVisualizationEnabled
|
public static bool IsVisualizationEnabled
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -110,7 +125,9 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Queue (TODO)
|
||||||
public static MediaQueue Queue
|
public static MediaQueue Queue
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -118,7 +135,9 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region State (TODO)
|
||||||
public static MediaState State
|
public static MediaState State
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -126,7 +145,9 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region PlayPosition (TODO)
|
||||||
public static TimeSpan PlayPosition
|
public static TimeSpan PlayPosition
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -134,7 +155,9 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region GameHasControl (TODO)
|
||||||
public static bool GameHasControl
|
public static bool GameHasControl
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -142,53 +165,76 @@ namespace ANX.Framework.Media
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
public static event EventHandler<EventArgs> ActiveSongChanged;
|
#region Constructor
|
||||||
public static event EventHandler<EventArgs> MediaStateChanged;
|
static MediaPlayer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Play (TODO)
|
||||||
public static void Play(Song song)
|
public static void Play(Song song)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Play (TODO)
|
||||||
public static void Play(SongCollection songCollection)
|
public static void Play(SongCollection songCollection)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Play (TODO)
|
||||||
public static void Play(SongCollection songCollection, int index)
|
public static void Play(SongCollection songCollection, int index)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Pause (TODO)
|
||||||
public static void Pause()
|
public static void Pause()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Resume (TODO)
|
||||||
public static void Resume()
|
public static void Resume()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Stop (TODO)
|
||||||
public static void Stop()
|
public static void Stop()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MoveNext (TODO)
|
||||||
public static void MoveNext()
|
public static void MoveNext()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MovePrevious (TODO)
|
||||||
public static void MovePrevious()
|
public static void MovePrevious()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region GetVisualizationData (TODO)
|
||||||
public static void GetVisualizationData(VisualizationData data)
|
public static void GetVisualizationData(VisualizationData data)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,14 +76,15 @@ namespace ANX.Framework.NonXNA
|
|||||||
|
|
||||||
public AddIn(string fileName)
|
public AddIn(string fileName)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(fileName))
|
if (String.IsNullOrEmpty(fileName))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("fileName");
|
throw new ArgumentNullException("fileName");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!File.Exists(fileName))
|
if (File.Exists(fileName) == false)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(String.Format("The AddIn '{0}' does not exist.", fileName));
|
throw new InvalidOperationException(
|
||||||
|
String.Format("The AddIn '{0}' does not exist.", fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
@ -96,30 +97,14 @@ namespace ANX.Framework.NonXNA
|
|||||||
|
|
||||||
if (this.assembly != null)
|
if (this.assembly != null)
|
||||||
{
|
{
|
||||||
foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IInputSystemCreator).IsAssignableFrom(p) ||
|
foreach (Type t in this.assembly.GetTypes().Where(p =>
|
||||||
typeof(IRenderSystemCreator).IsAssignableFrom(p) ||
|
typeof(IInputSystemCreator).IsAssignableFrom(p) ||
|
||||||
typeof(ISoundSystemCreator).IsAssignableFrom(p)
|
typeof(IRenderSystemCreator).IsAssignableFrom(p) ||
|
||||||
))
|
typeof(ISoundSystemCreator).IsAssignableFrom(p) ||
|
||||||
|
typeof(IMediaSystemCreator).IsAssignableFrom(p)))
|
||||||
{
|
{
|
||||||
this.creatorType = t;
|
this.creatorType = t;
|
||||||
|
this.addInType = AddInSystemFactory.GetAddInType(t);
|
||||||
if (typeof(IInputSystemCreator).IsAssignableFrom(t))
|
|
||||||
{
|
|
||||||
this.addInType = AddInType.InputSystem;
|
|
||||||
}
|
|
||||||
else if (typeof(IRenderSystemCreator).IsAssignableFrom(t))
|
|
||||||
{
|
|
||||||
this.addInType = AddInType.RenderSystem;
|
|
||||||
}
|
|
||||||
else if (typeof(ISoundSystemCreator).IsAssignableFrom(t))
|
|
||||||
{
|
|
||||||
this.addInType = AddInType.SoundSystem;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.addInType = AddInType.Unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,23 +121,27 @@ namespace ANX.Framework.NonXNA
|
|||||||
// Scan the addin for InputDeviceCreators and register them
|
// Scan the addin for InputDeviceCreators and register them
|
||||||
//
|
//
|
||||||
|
|
||||||
foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IGamePadCreator).IsAssignableFrom(p)))
|
foreach (Type t in this.assembly.GetTypes().Where(p =>
|
||||||
|
typeof(IGamePadCreator).IsAssignableFrom(p)))
|
||||||
{
|
{
|
||||||
InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IGamePadCreator);
|
InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IGamePadCreator);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IKeyboardCreator).IsAssignableFrom(p)))
|
foreach (Type t in this.assembly.GetTypes().Where(p =>
|
||||||
|
typeof(IKeyboardCreator).IsAssignableFrom(p)))
|
||||||
{
|
{
|
||||||
InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IKeyboardCreator);
|
InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IKeyboardCreator);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IMouseCreator).IsAssignableFrom(p)))
|
foreach (Type t in this.assembly.GetTypes().Where(p =>
|
||||||
|
typeof(IMouseCreator).IsAssignableFrom(p)))
|
||||||
{
|
{
|
||||||
InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IMouseCreator);
|
InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IMouseCreator);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XNAEXT
|
#if XNAEXT
|
||||||
foreach (Type t in this.assembly.GetTypes().Where(p => typeof(IMotionSensingDeviceCreator).IsAssignableFrom(p)))
|
foreach (Type t in this.assembly.GetTypes().Where(p =>
|
||||||
|
typeof(IMotionSensingDeviceCreator).IsAssignableFrom(p)))
|
||||||
{
|
{
|
||||||
InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IMotionSensingDeviceCreator);
|
InputDeviceFactory.Instance.AddCreator(Activator.CreateInstance(t) as IMotionSensingDeviceCreator);
|
||||||
}
|
}
|
||||||
@ -290,7 +279,9 @@ namespace ANX.Framework.NonXNA
|
|||||||
#endregion // Properties
|
#endregion // Properties
|
||||||
|
|
||||||
#region Private Helpers
|
#region Private Helpers
|
||||||
private string[] FetchSupportedPlattforms(Assembly assembly)
|
|
||||||
|
#region FetchSupportedPlattforms
|
||||||
|
private string[] FetchSupportedPlattforms(Assembly assembly)
|
||||||
{
|
{
|
||||||
string[] platforms = null;
|
string[] platforms = null;
|
||||||
string[] res = assembly.GetManifestResourceNames();
|
string[] res = assembly.GetManifestResourceNames();
|
||||||
@ -323,10 +314,11 @@ namespace ANX.Framework.NonXNA
|
|||||||
|
|
||||||
return platforms;
|
return platforms;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion // Private Helpers
|
#endregion // Private Helpers
|
||||||
|
|
||||||
public int CompareTo(AddIn other)
|
public int CompareTo(AddIn other)
|
||||||
{
|
{
|
||||||
return this.Priority.CompareTo(other.Priority);
|
return this.Priority.CompareTo(other.Priority);
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using ANX.Framework.Input;
|
using System.Reflection;
|
||||||
using NLog;
|
using NLog;
|
||||||
using System.Collections;
|
|
||||||
using System.Resources;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -71,22 +67,14 @@ namespace ANX.Framework.NonXNA
|
|||||||
private OperatingSystem operatingSystem;
|
private OperatingSystem operatingSystem;
|
||||||
private Version operatingSystemVersion;
|
private Version operatingSystemVersion;
|
||||||
|
|
||||||
private string preferredRenderSystem;
|
private Dictionary<AddInType, AddInSystemInfo> addinSystems;
|
||||||
private bool preferredRenderSystemLocked;
|
|
||||||
private string preferredInputSystem;
|
|
||||||
private bool preferredInputSystemLocked;
|
|
||||||
private string preferredSoundSystem;
|
|
||||||
private bool preferredSoundSystemLocked;
|
|
||||||
|
|
||||||
private List<AddIn> renderSystems;
|
|
||||||
private List<AddIn> inputSystems;
|
|
||||||
private List<AddIn> soundSystems;
|
|
||||||
|
|
||||||
private static Logger logger = LogManager.GetCurrentClassLogger();
|
private static Logger logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
#endregion // Private Members
|
#endregion // Private Members
|
||||||
|
|
||||||
public static AddInSystemFactory Instance
|
#region Public
|
||||||
|
public static AddInSystemFactory Instance
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -98,24 +86,46 @@ namespace ANX.Framework.NonXNA
|
|||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private AddInSystemFactory()
|
public OperatingSystem OperatingSystem
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.operatingSystem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Version OperatingSystemVersion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.operatingSystemVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
private AddInSystemFactory()
|
||||||
{
|
{
|
||||||
this.renderSystems = new List<AddIn>();
|
addinSystems = new Dictionary<AddInType, AddInSystemInfo>();
|
||||||
this.inputSystems = new List<AddIn>();
|
addinSystems.Add(AddInType.InputSystem, new AddInSystemInfo());
|
||||||
this.soundSystems = new List<AddIn>();
|
addinSystems.Add(AddInType.MediaSystem, new AddInSystemInfo());
|
||||||
|
addinSystems.Add(AddInType.RenderSystem, new AddInSystemInfo());
|
||||||
|
addinSystems.Add(AddInType.SoundSystem, new AddInSystemInfo());
|
||||||
|
|
||||||
this.creators = new Dictionary<string, ICreator>();
|
this.creators = new Dictionary<string, ICreator>();
|
||||||
|
|
||||||
this.operatingSystem = Environment.OSVersion;
|
this.operatingSystem = Environment.OSVersion;
|
||||||
this.operatingSystemVersion = this.operatingSystem.Version;
|
this.operatingSystemVersion = this.operatingSystem.Version;
|
||||||
logger.Info("Operating System: {0} ({1})", operatingSystem.VersionString, operatingSystemVersion.ToString());
|
logger.Info("Operating System: {0} ({1})", operatingSystem.VersionString, operatingSystemVersion.ToString());
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public void Initialize()
|
#region Initialize
|
||||||
|
public void Initialize()
|
||||||
{
|
{
|
||||||
if (!initialized)
|
if (initialized == false)
|
||||||
{
|
{
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
@ -125,25 +135,14 @@ namespace ANX.Framework.NonXNA
|
|||||||
|
|
||||||
foreach (String file in Directory.EnumerateFiles(Path.GetDirectoryName(executingAssembly), "*.dll", SearchOption.TopDirectoryOnly))
|
foreach (String file in Directory.EnumerateFiles(Path.GetDirectoryName(executingAssembly), "*.dll", SearchOption.TopDirectoryOnly))
|
||||||
{
|
{
|
||||||
if (!file.Equals(executingAssembly))
|
if (file.Equals(executingAssembly) == false)
|
||||||
{
|
{
|
||||||
logger.Info("[ANX] trying to load '{0}'...", file);
|
logger.Info("[ANX] trying to load '{0}'...", file);
|
||||||
|
|
||||||
AddIn addin = new AddIn(file);
|
AddIn addin = new AddIn(file);
|
||||||
if (addin.IsValid && addin.IsSupported)
|
if (addin.IsValid && addin.IsSupported)
|
||||||
{
|
{
|
||||||
switch (addin.Type)
|
addinSystems[addin.Type].AvailableSystems.Add(addin);
|
||||||
{
|
|
||||||
case AddInType.InputSystem:
|
|
||||||
this.inputSystems.Add(addin);
|
|
||||||
break;
|
|
||||||
case AddInType.RenderSystem:
|
|
||||||
this.renderSystems.Add(addin);
|
|
||||||
break;
|
|
||||||
case AddInType.SoundSystem:
|
|
||||||
this.soundSystems.Add(addin);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
logger.Info("[ANX] successfully loaded addin...");
|
logger.Info("[ANX] successfully loaded addin...");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -156,8 +155,10 @@ namespace ANX.Framework.NonXNA
|
|||||||
SortAddIns();
|
SortAddIns();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public void AddCreator(ICreator creator)
|
#region AddCreator
|
||||||
|
public void AddCreator(ICreator creator)
|
||||||
{
|
{
|
||||||
string creatorName = creator.Name.ToLowerInvariant();
|
string creatorName = creator.Name.ToLowerInvariant();
|
||||||
|
|
||||||
@ -170,13 +171,17 @@ namespace ANX.Framework.NonXNA
|
|||||||
|
|
||||||
logger.Debug("added creator '{0}'. Total count of registered creators is now {1}.", creatorName, creators.Count);
|
logger.Debug("added creator '{0}'. Total count of registered creators is now {1}.", creatorName, creators.Count);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public bool HasFramework(String name)
|
#region HasFramework
|
||||||
|
public bool HasFramework(String name)
|
||||||
{
|
{
|
||||||
return creators.ContainsKey(name.ToLowerInvariant());
|
return creators.ContainsKey(name.ToLowerInvariant());
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public T GetCreator<T>(String name) where T : class, ICreator
|
#region GetCreator
|
||||||
|
public T GetCreator<T>(String name) where T : class, ICreator
|
||||||
{
|
{
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
{
|
{
|
||||||
@ -186,9 +191,11 @@ namespace ANX.Framework.NonXNA
|
|||||||
ICreator creator = null;
|
ICreator creator = null;
|
||||||
creators.TryGetValue(name.ToLowerInvariant(), out creator);
|
creators.TryGetValue(name.ToLowerInvariant(), out creator);
|
||||||
return creator as T;
|
return creator as T;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public IEnumerable<T> GetCreators<T>() where T : class, ICreator
|
#region GetCreators
|
||||||
|
public IEnumerable<T> GetCreators<T>() where T : class, ICreator
|
||||||
{
|
{
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
{
|
{
|
||||||
@ -197,18 +204,18 @@ namespace ANX.Framework.NonXNA
|
|||||||
|
|
||||||
Type t = typeof(T);
|
Type t = typeof(T);
|
||||||
|
|
||||||
foreach (ICreator creator in this.creators.Values)
|
foreach (ICreator creator in this.creators.Values.Where(p =>
|
||||||
|
p.GetType().GetInterfaces()[0].Equals(t)))
|
||||||
{
|
{
|
||||||
if (creator.GetType().GetInterfaces()[0].Equals(t))
|
yield return creator as T;
|
||||||
{
|
|
||||||
yield return creator as T;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public T GetDefaultCreator<T>() where T : class, ICreator
|
#region GetDefaultCreator
|
||||||
|
public T GetDefaultCreator<T>() where T : class, ICreator
|
||||||
{
|
{
|
||||||
if (!initialized)
|
if (initialized == false)
|
||||||
{
|
{
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
@ -216,172 +223,80 @@ namespace ANX.Framework.NonXNA
|
|||||||
Type type = typeof(T);
|
Type type = typeof(T);
|
||||||
AddInType addInType = GetAddInType(type);
|
AddInType addInType = GetAddInType(type);
|
||||||
|
|
||||||
switch (addInType)
|
AddInSystemInfo info = addinSystems[addInType];
|
||||||
{
|
if (String.IsNullOrEmpty(info.PreferredName))
|
||||||
case AddInType.InputSystem:
|
{
|
||||||
if (string.IsNullOrEmpty(preferredInputSystem))
|
if (info.AvailableSystems.Count > 0)
|
||||||
{
|
{
|
||||||
if (inputSystems.Count > 0)
|
return info.AvailableSystems[0].Instance as T;
|
||||||
{
|
}
|
||||||
return inputSystems[0].Instance as T;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new AddInLoadingException("couldn't get default input system because there are no registered input systems available");
|
throw new AddInLoadingException(String.Format(
|
||||||
}
|
"Couldn't get default {0} because there are no " +
|
||||||
else
|
"registered {0}s available!", addInType));
|
||||||
{
|
}
|
||||||
foreach (AddIn addin in this.inputSystems)
|
else
|
||||||
{
|
{
|
||||||
if (addin.Name.Equals(preferredInputSystem, StringComparison.InvariantCultureIgnoreCase))
|
foreach (AddIn addin in info.AvailableSystems)
|
||||||
{
|
{
|
||||||
return addin.Instance as T;
|
if (addin.Name.Equals(info.PreferredName,
|
||||||
}
|
StringComparison.InvariantCultureIgnoreCase))
|
||||||
}
|
{
|
||||||
|
return addin.Instance as T;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw new AddInLoadingException(String.Format("couldn't get default input system '{0}' because it was not found in the list of registered creators", preferredInputSystem));
|
throw new AddInLoadingException(String.Format(
|
||||||
}
|
"Couldn't get default {0} '{1}' because it was not found in the " +
|
||||||
case AddInType.RenderSystem:
|
"list of registered creators!", addInType, info.PreferredName));
|
||||||
if (string.IsNullOrEmpty(preferredRenderSystem))
|
}
|
||||||
{
|
|
||||||
if (renderSystems.Count > 0)
|
|
||||||
{
|
|
||||||
return renderSystems[0].Instance as T;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new AddInLoadingException("couldn't get default render system because there are no registered render systems available");
|
throw new AddInLoadingException(String.Format(
|
||||||
}
|
"Couldn't find a DefaultCreator of type '{0}'!", type.FullName));
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (AddIn addin in this.renderSystems)
|
|
||||||
{
|
|
||||||
if (addin.Name.Equals(preferredRenderSystem, StringComparison.InvariantCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
return addin.Instance as T;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new AddInLoadingException(String.Format("couldn't get default render system '{0}' because it was not found in the list of registered creators", preferredRenderSystem));
|
|
||||||
}
|
|
||||||
case AddInType.SoundSystem:
|
|
||||||
if (string.IsNullOrEmpty(preferredSoundSystem))
|
|
||||||
{
|
|
||||||
if (soundSystems.Count > 0)
|
|
||||||
{
|
|
||||||
return soundSystems[0].Instance as T;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new AddInLoadingException("couldn't get default sound system because there are no registered sound systems available");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (AddIn addin in this.soundSystems)
|
|
||||||
{
|
|
||||||
if (addin.Name.Equals(preferredSoundSystem, StringComparison.InvariantCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
return addin.Instance as T;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new AddInLoadingException(String.Format("couldn't get default sound system '{0}' because it was not found in the list of registered creators", preferredSoundSystem));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new AddInLoadingException(String.Format("couldn't find a DefaultCreator of type '{0}'", type.FullName));
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public void SortAddIns()
|
#region SortAddIns
|
||||||
|
public void SortAddIns()
|
||||||
{
|
{
|
||||||
this.inputSystems.Sort();
|
foreach (AddInSystemInfo info in addinSystems.Values)
|
||||||
this.renderSystems.Sort();
|
{
|
||||||
this.soundSystems.Sort();
|
info.AvailableSystems.Sort();
|
||||||
|
}
|
||||||
|
|
||||||
this.creators = this.creators.OrderBy(x => x.Value.Priority).ToDictionary(x => x.Key, x => x.Value);
|
this.creators = this.creators.OrderBy(x => x.Value.Priority).ToDictionary(x => x.Key, x => x.Value);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public OperatingSystem OperatingSystem
|
#region GetPreferredSystem
|
||||||
|
public string GetPreferredSystem(AddInType addInType)
|
||||||
|
{
|
||||||
|
return addinSystems[addInType].PreferredName;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SetPreferredSystem
|
||||||
|
public void SetPreferredSystem(AddInType addInType, string preferredName)
|
||||||
|
{
|
||||||
|
if (addinSystems[addInType].PreferredLocked)
|
||||||
|
{
|
||||||
|
throw new AddInLoadingException(String.Format(
|
||||||
|
"Can't set preferred {0} because a {0} is alread in use.", addInType));
|
||||||
|
}
|
||||||
|
|
||||||
|
addinSystems[addInType].PreferredName = preferredName;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region PreventSystemChange
|
||||||
|
public void PreventSystemChange(AddInType addInType)
|
||||||
{
|
{
|
||||||
get
|
addinSystems[addInType].PreferredLocked = true;
|
||||||
{
|
|
||||||
return this.operatingSystem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public Version OperatingSystemVersion
|
#region GetAddInType
|
||||||
{
|
internal static AddInType GetAddInType(Type t)
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.operatingSystemVersion;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string PreferredRenderSystem
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.preferredRenderSystem;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (this.preferredRenderSystemLocked)
|
|
||||||
{
|
|
||||||
throw new AddInLoadingException("can't set preferred RenderSystem because a RenderSystem is alread in use.");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.preferredRenderSystem = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string PreferredInputSystem
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.preferredInputSystem;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (this.preferredInputSystemLocked)
|
|
||||||
{
|
|
||||||
throw new AddInLoadingException("can't set preferred InputSystem because a InputSystem is alread in use.");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.preferredInputSystem = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string PreferredSoundSystem
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.preferredSoundSystem;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (this.preferredSoundSystemLocked)
|
|
||||||
{
|
|
||||||
throw new AddInLoadingException("can't set preferred SoundSystem because a SoundSystem is alread in use.");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.preferredSoundSystem = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PreventRenderSystemChange()
|
|
||||||
{
|
|
||||||
this.preferredRenderSystemLocked = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PreventInputSystemChange()
|
|
||||||
{
|
|
||||||
this.preferredInputSystemLocked = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PreventSoundSystemChange()
|
|
||||||
{
|
|
||||||
this.preferredSoundSystemLocked = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private AddInType GetAddInType(Type t)
|
|
||||||
{
|
{
|
||||||
if (typeof(IRenderSystemCreator).IsAssignableFrom(t))
|
if (typeof(IRenderSystemCreator).IsAssignableFrom(t))
|
||||||
{
|
{
|
||||||
@ -394,11 +309,16 @@ namespace ANX.Framework.NonXNA
|
|||||||
else if (typeof(ISoundSystemCreator).IsAssignableFrom(t))
|
else if (typeof(ISoundSystemCreator).IsAssignableFrom(t))
|
||||||
{
|
{
|
||||||
return AddInType.SoundSystem;
|
return AddInType.SoundSystem;
|
||||||
}
|
}
|
||||||
|
else if (typeof(IMediaSystemCreator).IsAssignableFrom(t))
|
||||||
|
{
|
||||||
|
return AddInType.MediaSystem;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return AddInType.Unknown;
|
return AddInType.Unknown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
#endregion
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
88
ANX.Framework/NonXNA/AddInSystemInfo.cs
Normal file
88
ANX.Framework/NonXNA/AddInSystemInfo.cs
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
#region License
|
||||||
|
|
||||||
|
//
|
||||||
|
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||||
|
//
|
||||||
|
// This file is released under the Ms-PL license.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Microsoft Public License (Ms-PL)
|
||||||
|
//
|
||||||
|
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||||
|
// If you do not accept the license, do not use the software.
|
||||||
|
//
|
||||||
|
// 1.Definitions
|
||||||
|
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||||
|
// here as under U.S. copyright law.
|
||||||
|
// A "contribution" is the original software, or any additions or changes to the software.
|
||||||
|
// A "contributor" is any person that distributes its contribution under this license.
|
||||||
|
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||||
|
//
|
||||||
|
// 2.Grant of Rights
|
||||||
|
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||||
|
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||||
|
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||||
|
// or any derivative works that you create.
|
||||||
|
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||||
|
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||||
|
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||||
|
// in the software or derivative works of the contribution in the software.
|
||||||
|
//
|
||||||
|
// 3.Conditions and Limitations
|
||||||
|
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||||
|
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||||
|
// patent license from such contributor to the software ends automatically.
|
||||||
|
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||||
|
// notices that are present in the software.
|
||||||
|
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||||
|
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||||
|
// object code form, you may only do so under a license that complies with this license.
|
||||||
|
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||||
|
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||||
|
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||||
|
// particular purpose and non-infringement.
|
||||||
|
|
||||||
|
#endregion // License
|
||||||
|
|
||||||
|
namespace ANX.Framework.NonXNA
|
||||||
|
{
|
||||||
|
internal class AddInSystemInfo
|
||||||
|
{
|
||||||
|
#region Public
|
||||||
|
#region PreferredName
|
||||||
|
public string PreferredName
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region PreferredLocked
|
||||||
|
public bool PreferredLocked
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region AvailableSystems
|
||||||
|
public List<AddIn> AvailableSystems
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
public AddInSystemInfo()
|
||||||
|
{
|
||||||
|
AvailableSystems = new List<AddIn>();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,4 @@
|
|||||||
#region Using Statements
|
#region License
|
||||||
using System;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region License
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||||
@ -57,6 +52,7 @@ namespace ANX.Framework.NonXNA
|
|||||||
Unknown,
|
Unknown,
|
||||||
RenderSystem,
|
RenderSystem,
|
||||||
InputSystem,
|
InputSystem,
|
||||||
SoundSystem
|
SoundSystem,
|
||||||
|
MediaSystem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,74 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
#region License
|
||||||
|
|
||||||
|
//
|
||||||
|
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||||
|
//
|
||||||
|
// This file is released under the Ms-PL license.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Microsoft Public License (Ms-PL)
|
||||||
|
//
|
||||||
|
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||||
|
// If you do not accept the license, do not use the software.
|
||||||
|
//
|
||||||
|
// 1.Definitions
|
||||||
|
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||||
|
// here as under U.S. copyright law.
|
||||||
|
// A "contribution" is the original software, or any additions or changes to the software.
|
||||||
|
// A "contributor" is any person that distributes its contribution under this license.
|
||||||
|
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||||
|
//
|
||||||
|
// 2.Grant of Rights
|
||||||
|
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||||
|
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||||
|
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||||
|
// or any derivative works that you create.
|
||||||
|
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||||
|
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||||
|
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||||
|
// in the software or derivative works of the contribution in the software.
|
||||||
|
//
|
||||||
|
// 3.Conditions and Limitations
|
||||||
|
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||||
|
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||||
|
// patent license from such contributor to the software ends automatically.
|
||||||
|
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||||
|
// notices that are present in the software.
|
||||||
|
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||||
|
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||||
|
// object code form, you may only do so under a license that complies with this license.
|
||||||
|
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||||
|
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||||
|
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||||
|
// particular purpose and non-infringement.
|
||||||
|
|
||||||
|
#endregion // License
|
||||||
|
|
||||||
|
namespace ANX.Framework.NonXNA.Development
|
||||||
|
{
|
||||||
|
public class PercentageCompleteAttribute : Attribute
|
||||||
|
{
|
||||||
|
#region Public
|
||||||
|
public int Percentage
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new percentage complete attribute.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="setPercentage">The percentage [0-100] value defining how
|
||||||
|
/// "complete" the class is.</param>
|
||||||
|
public PercentageCompleteAttribute(int setPercentage)
|
||||||
|
{
|
||||||
|
Percentage = setPercentage;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -1,14 +1,4 @@
|
|||||||
#region Using Statements
|
#region License
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using ANX.Framework.Input;
|
|
||||||
|
|
||||||
#endregion // Using Statements
|
|
||||||
|
|
||||||
#region License
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||||
|
55
ANX.Framework/NonXNA/MediaSystem/IMediaSystemCreator.cs
Normal file
55
ANX.Framework/NonXNA/MediaSystem/IMediaSystemCreator.cs
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
#region License
|
||||||
|
|
||||||
|
//
|
||||||
|
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||||
|
//
|
||||||
|
// This file is released under the Ms-PL license.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Microsoft Public License (Ms-PL)
|
||||||
|
//
|
||||||
|
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||||
|
// If you do not accept the license, do not use the software.
|
||||||
|
//
|
||||||
|
// 1.Definitions
|
||||||
|
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||||
|
// here as under U.S. copyright law.
|
||||||
|
// A "contribution" is the original software, or any additions or changes to the software.
|
||||||
|
// A "contributor" is any person that distributes its contribution under this license.
|
||||||
|
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||||
|
//
|
||||||
|
// 2.Grant of Rights
|
||||||
|
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||||
|
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||||
|
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||||
|
// or any derivative works that you create.
|
||||||
|
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||||
|
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||||
|
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||||
|
// in the software or derivative works of the contribution in the software.
|
||||||
|
//
|
||||||
|
// 3.Conditions and Limitations
|
||||||
|
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||||
|
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||||
|
// patent license from such contributor to the software ends automatically.
|
||||||
|
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||||
|
// notices that are present in the software.
|
||||||
|
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||||
|
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||||
|
// object code form, you may only do so under a license that complies with this license.
|
||||||
|
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||||
|
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||||
|
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||||
|
// particular purpose and non-infringement.
|
||||||
|
|
||||||
|
#endregion // License
|
||||||
|
|
||||||
|
namespace ANX.Framework.NonXNA
|
||||||
|
{
|
||||||
|
public interface IMediaSystemCreator : ICreator
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -67,8 +67,9 @@ namespace ANX.InputDevices.Test
|
|||||||
public IGamePad GamePad
|
public IGamePad GamePad
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
if (_gamePad == null)
|
if (_gamePad == null)
|
||||||
{
|
{
|
||||||
_gamePad = new GamePad();
|
_gamePad = new GamePad();
|
||||||
@ -80,8 +81,9 @@ namespace ANX.InputDevices.Test
|
|||||||
public IMouse Mouse
|
public IMouse Mouse
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
if (_mouse == null)
|
if (_mouse == null)
|
||||||
{
|
{
|
||||||
_mouse = new Mouse();
|
_mouse = new Mouse();
|
||||||
@ -93,8 +95,9 @@ namespace ANX.InputDevices.Test
|
|||||||
public IKeyboard Keyboard
|
public IKeyboard Keyboard
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
if (_keyboard == null)
|
if (_keyboard == null)
|
||||||
{
|
{
|
||||||
_keyboard = new Keyboard();
|
_keyboard = new Keyboard();
|
||||||
|
@ -68,9 +68,10 @@ namespace ANX.InputSystem.Recording
|
|||||||
|
|
||||||
public IGamePad GamePad
|
public IGamePad GamePad
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
if (gamePad == null)
|
if (gamePad == null)
|
||||||
gamePad = new RecordingGamePad();
|
gamePad = new RecordingGamePad();
|
||||||
return gamePad;
|
return gamePad;
|
||||||
@ -79,9 +80,10 @@ namespace ANX.InputSystem.Recording
|
|||||||
|
|
||||||
public IMouse Mouse
|
public IMouse Mouse
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
if (mouse == null)
|
if (mouse == null)
|
||||||
mouse = new RecordingMouse();
|
mouse = new RecordingMouse();
|
||||||
return mouse;
|
return mouse;
|
||||||
@ -90,9 +92,10 @@ namespace ANX.InputSystem.Recording
|
|||||||
|
|
||||||
public IKeyboard Keyboard
|
public IKeyboard Keyboard
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
if (keyboard == null)
|
if (keyboard == null)
|
||||||
keyboard = new RecordingKeyboard();
|
keyboard = new RecordingKeyboard();
|
||||||
return keyboard;
|
return keyboard;
|
||||||
@ -102,9 +105,10 @@ namespace ANX.InputSystem.Recording
|
|||||||
#if XNAEXT
|
#if XNAEXT
|
||||||
public IMotionSensingDevice MotionSensingDevice
|
public IMotionSensingDevice MotionSensingDevice
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
if (msd == null)
|
if (msd == null)
|
||||||
msd = new RecordingMotionSensingDevice();
|
msd = new RecordingMotionSensingDevice();
|
||||||
return msd;
|
return msd;
|
||||||
|
@ -98,7 +98,8 @@ namespace ANX.InputDevices.Windows.XInput
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
logger.Debug("returning a new GamePad device");
|
logger.Debug("returning a new GamePad device");
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
return InputDeviceFactory.Instance.GetDefaultGamePad();
|
return InputDeviceFactory.Instance.GetDefaultGamePad();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,8 +115,9 @@ namespace ANX.InputDevices.Windows.XInput
|
|||||||
{
|
{
|
||||||
throw new NoInputDeviceException("couldn't find a default mouse device creator. Unable to create a mouse instance.");
|
throw new NoInputDeviceException("couldn't find a default mouse device creator. Unable to create a mouse instance.");
|
||||||
}
|
}
|
||||||
logger.Debug("created a new Mouse device");
|
logger.Debug("created a new Mouse device");
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.mouse;
|
return this.mouse;
|
||||||
@ -133,8 +135,9 @@ namespace ANX.InputDevices.Windows.XInput
|
|||||||
{
|
{
|
||||||
throw new NoInputDeviceException("couldn't find a default keyboard device creator. Unable to create a keyboard instance.");
|
throw new NoInputDeviceException("couldn't find a default keyboard device creator. Unable to create a keyboard instance.");
|
||||||
}
|
}
|
||||||
logger.Debug("created a new Keyboard device");
|
logger.Debug("created a new Keyboard device");
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.keyboard;
|
return this.keyboard;
|
||||||
@ -146,8 +149,9 @@ namespace ANX.InputDevices.Windows.XInput
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
logger.Debug("returning a new MotionSensingDevice device");
|
logger.Debug("returning a new MotionSensingDevice device");
|
||||||
AddInSystemFactory.Instance.PreventInputSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.InputSystem);
|
||||||
return InputDeviceFactory.Instance.GetDefaultMotionSensingDevice();
|
return InputDeviceFactory.Instance.GetDefaultMotionSensingDevice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{97185A92-077D-4498-8B6A-8BFF04079044}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>ANX.MediaSystem.Windows.OpenAL</RootNamespace>
|
||||||
|
<AssemblyName>ANX.MediaSystem.Windows.OpenAL</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Creator.cs" />
|
||||||
|
<Compile Include="Metadata.Designer.cs">
|
||||||
|
<DependentUpon>Metadata.resx</DependentUpon>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework.csproj">
|
||||||
|
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
|
||||||
|
<Name>ANX.Framework</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Metadata.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Metadata.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
90
MediaSystems/ANX.MediaSystem.Windows.OpenAL/Creator.cs
Normal file
90
MediaSystems/ANX.MediaSystem.Windows.OpenAL/Creator.cs
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
using System;
|
||||||
|
using ANX.Framework.NonXNA;
|
||||||
|
|
||||||
|
#region License
|
||||||
|
|
||||||
|
//
|
||||||
|
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||||
|
//
|
||||||
|
// This file is released under the Ms-PL license.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Microsoft Public License (Ms-PL)
|
||||||
|
//
|
||||||
|
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||||
|
// If you do not accept the license, do not use the software.
|
||||||
|
//
|
||||||
|
// 1.Definitions
|
||||||
|
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||||
|
// here as under U.S. copyright law.
|
||||||
|
// A "contribution" is the original software, or any additions or changes to the software.
|
||||||
|
// A "contributor" is any person that distributes its contribution under this license.
|
||||||
|
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||||
|
//
|
||||||
|
// 2.Grant of Rights
|
||||||
|
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||||
|
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||||
|
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||||
|
// or any derivative works that you create.
|
||||||
|
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||||
|
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||||
|
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||||
|
// in the software or derivative works of the contribution in the software.
|
||||||
|
//
|
||||||
|
// 3.Conditions and Limitations
|
||||||
|
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||||
|
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||||
|
// patent license from such contributor to the software ends automatically.
|
||||||
|
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||||
|
// notices that are present in the software.
|
||||||
|
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||||
|
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||||
|
// object code form, you may only do so under a license that complies with this license.
|
||||||
|
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||||
|
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||||
|
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||||
|
// particular purpose and non-infringement.
|
||||||
|
|
||||||
|
#endregion // License
|
||||||
|
|
||||||
|
namespace ANX.MediaSystem.Windows.OpenAL
|
||||||
|
{
|
||||||
|
public class Creator : IMediaSystemCreator
|
||||||
|
{
|
||||||
|
#region Public
|
||||||
|
#region Name
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get { return "OpenAL"; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Priority
|
||||||
|
public int Priority
|
||||||
|
{
|
||||||
|
get { return 10; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IsSupported
|
||||||
|
public bool IsSupported
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
//TODO: this is just a very basic version of test for support
|
||||||
|
return AddInSystemFactory.Instance.OperatingSystem.Platform ==
|
||||||
|
PlatformID.Win32NT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region RegisterCreator
|
||||||
|
public void RegisterCreator(AddInSystemFactory factory)
|
||||||
|
{
|
||||||
|
factory.AddCreator(this);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
72
MediaSystems/ANX.MediaSystem.Windows.OpenAL/Metadata.Designer.cs
generated
Normal file
72
MediaSystems/ANX.MediaSystem.Windows.OpenAL/Metadata.Designer.cs
generated
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.488
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ANX.MediaSystem.Windows.OpenAL {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||||
|
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class Metadata {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Metadata() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ANX.MediaSystem.Windows.OpenAL.Metadata", typeof(Metadata).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Zeichenfolge, die Win32NT ähnelt.
|
||||||
|
/// </summary>
|
||||||
|
public static string SupportedPlatforms {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SupportedPlatforms", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
123
MediaSystems/ANX.MediaSystem.Windows.OpenAL/Metadata.resx
Normal file
123
MediaSystems/ANX.MediaSystem.Windows.OpenAL/Metadata.resx
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="SupportedPlatforms" xml:space="preserve">
|
||||||
|
<value>Win32NT</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die mit einer Assembly verknüpft sind.
|
||||||
|
[assembly: AssemblyTitle("ANX.MediaSystem.Windows.OpenAL")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("ANX.Framework Tea")]
|
||||||
|
[assembly: AssemblyProduct("ANX.MediaSystem.Windows.OpenAL")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © ANX.Framework Tea 2012")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||||
|
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||||
|
[assembly: Guid("1395f0f5-84f8-4336-9c40-e9d80a3fef6b")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -9,7 +9,8 @@ namespace RecordingSample
|
|||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
//This is technically unessasary, because there is only a reference to the RecordingSystem...
|
//This is technically unessasary, because there is only a reference to the RecordingSystem...
|
||||||
AddInSystemFactory.Instance.PreferredInputSystem = "Recording";
|
AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
|
AddInType.InputSystem, "Recording");
|
||||||
|
|
||||||
using (Game1 game = new Game1())
|
using (Game1 game = new Game1())
|
||||||
{
|
{
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
<Project>{DB88DDEB-7281-405D-8FCA-5681B6B2BD7A}</Project>
|
<Project>{DB88DDEB-7281-405D-8FCA-5681B6B2BD7A}</Project>
|
||||||
<Name>ANX.InputSystem.Recording</Name>
|
<Name>ANX.InputSystem.Recording</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -83,32 +83,37 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
}
|
}
|
||||||
|
|
||||||
public GameHost CreateGameHost(Game game)
|
public GameHost CreateGameHost(Game game)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new WindowsGameHost(game);
|
return new WindowsGameHost(game);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeGraphicsDevice CreateGraphicsDevice(PresentationParameters presentationParameters)
|
public INativeGraphicsDevice CreateGraphicsDevice(PresentationParameters presentationParameters)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new GraphicsDeviceWindowsDX10(presentationParameters);
|
return new GraphicsDeviceWindowsDX10(presentationParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeBuffer CreateIndexBuffer(GraphicsDevice graphics, IndexElementSize size, int indexCount, BufferUsage usage)
|
public INativeBuffer CreateIndexBuffer(GraphicsDevice graphics, IndexElementSize size, int indexCount, BufferUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new IndexBuffer_DX10(graphics, size, indexCount, usage);
|
return new IndexBuffer_DX10(graphics, size, indexCount, usage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeBuffer CreateVertexBuffer(GraphicsDevice graphics, VertexDeclaration vertexDeclaration, int vertexCount, BufferUsage usage)
|
public INativeBuffer CreateVertexBuffer(GraphicsDevice graphics, VertexDeclaration vertexDeclaration, int vertexCount, BufferUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new VertexBuffer_DX10(graphics, vertexDeclaration, vertexCount, usage);
|
return new VertexBuffer_DX10(graphics, vertexDeclaration, vertexCount, usage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, Stream vertexShaderByteCode, Stream pixelShaderByteCode)
|
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, Stream vertexShaderByteCode, Stream pixelShaderByteCode)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
Effect_DX10 effect = new Effect_DX10(graphics, managedEffect, vertexShaderByteCode, pixelShaderByteCode);
|
Effect_DX10 effect = new Effect_DX10(graphics, managedEffect, vertexShaderByteCode, pixelShaderByteCode);
|
||||||
|
|
||||||
@ -116,8 +121,9 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
}
|
}
|
||||||
|
|
||||||
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, System.IO.Stream byteCode)
|
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, System.IO.Stream byteCode)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
Effect_DX10 effect = new Effect_DX10(graphics, managedEffect, byteCode);
|
Effect_DX10 effect = new Effect_DX10(graphics, managedEffect, byteCode);
|
||||||
|
|
||||||
@ -125,8 +131,9 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Texture2D CreateTexture(GraphicsDevice graphics, string fileName)
|
public Texture2D CreateTexture(GraphicsDevice graphics, string fileName)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
//TODO: implement
|
//TODO: implement
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
@ -140,32 +147,37 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
}
|
}
|
||||||
|
|
||||||
public INativeBlendState CreateBlendState()
|
public INativeBlendState CreateBlendState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new BlendState_DX10();
|
return new BlendState_DX10();
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeRasterizerState CreateRasterizerState()
|
public INativeRasterizerState CreateRasterizerState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new RasterizerState_DX10();
|
return new RasterizerState_DX10();
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeDepthStencilState CreateDepthStencilState()
|
public INativeDepthStencilState CreateDepthStencilState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new DepthStencilState_DX10();
|
return new DepthStencilState_DX10();
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeSamplerState CreateSamplerState()
|
public INativeSamplerState CreateSamplerState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new SamplerState_DX10();
|
return new SamplerState_DX10();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] GetShaderByteCode(PreDefinedShader type)
|
public byte[] GetShaderByteCode(PreDefinedShader type)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
if (type == PreDefinedShader.SpriteBatch)
|
if (type == PreDefinedShader.SpriteBatch)
|
||||||
{
|
{
|
||||||
@ -202,8 +214,9 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
|
|
||||||
|
|
||||||
public System.Collections.ObjectModel.ReadOnlyCollection<GraphicsAdapter> GetAdapterList()
|
public System.Collections.ObjectModel.ReadOnlyCollection<GraphicsAdapter> GetAdapterList()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
SharpDX.DXGI.Factory factory = new Factory();
|
SharpDX.DXGI.Factory factory = new Factory();
|
||||||
|
|
||||||
@ -256,15 +269,17 @@ namespace ANX.Framework.Windows.DX10
|
|||||||
}
|
}
|
||||||
|
|
||||||
public INativeTexture2D CreateTexture(GraphicsDevice graphics, SurfaceFormat surfaceFormat, int width, int height, int mipCount)
|
public INativeTexture2D CreateTexture(GraphicsDevice graphics, SurfaceFormat surfaceFormat, int width, int height, int mipCount)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
return new Texture2D_DX10(graphics, width, height, surfaceFormat, mipCount);
|
return new Texture2D_DX10(graphics, width, height, surfaceFormat, mipCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeRenderTarget2D CreateRenderTarget(GraphicsDevice graphics, int width, int height, bool mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat, int preferredMultiSampleCount, RenderTargetUsage usage)
|
public INativeRenderTarget2D CreateRenderTarget(GraphicsDevice graphics, int width, int height, bool mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat, int preferredMultiSampleCount, RenderTargetUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
return new RenderTarget2D_DX10(graphics, width, height, mipMap, preferredFormat, preferredDepthFormat, preferredMultiSampleCount, usage);
|
return new RenderTarget2D_DX10(graphics, width, height, mipMap, preferredFormat, preferredDepthFormat, preferredMultiSampleCount, usage);
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,8 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
public GameHost CreateGameHost(Game game)
|
public GameHost CreateGameHost(Game game)
|
||||||
{
|
{
|
||||||
logger.Info("creating OpenGL3 GameHost");
|
logger.Info("creating OpenGL3 GameHost");
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new WindowsGameHost(game);
|
return new WindowsGameHost(game);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -115,7 +116,8 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
public INativeEffect CreateEffect(GraphicsDevice graphics, Effect managedEffect,
|
public INativeEffect CreateEffect(GraphicsDevice graphics, Effect managedEffect,
|
||||||
Stream byteCode)
|
Stream byteCode)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
return new EffectGL3(managedEffect, byteCode);
|
return new EffectGL3(managedEffect, byteCode);
|
||||||
}
|
}
|
||||||
@ -123,7 +125,8 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
public INativeEffect CreateEffect(GraphicsDevice graphics, Effect managedEffect,
|
public INativeEffect CreateEffect(GraphicsDevice graphics, Effect managedEffect,
|
||||||
Stream vertexShaderByteCode, Stream pixelShaderByteCode)
|
Stream vertexShaderByteCode, Stream pixelShaderByteCode)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
|
|
||||||
return new EffectGL3(managedEffect, vertexShaderByteCode, pixelShaderByteCode);
|
return new EffectGL3(managedEffect, vertexShaderByteCode, pixelShaderByteCode);
|
||||||
}
|
}
|
||||||
@ -133,7 +136,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
INativeGraphicsDevice IRenderSystemCreator.CreateGraphicsDevice(
|
INativeGraphicsDevice IRenderSystemCreator.CreateGraphicsDevice(
|
||||||
PresentationParameters presentationParameters)
|
PresentationParameters presentationParameters)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new GraphicsDeviceWindowsGL3(presentationParameters);
|
return new GraphicsDeviceWindowsGL3(presentationParameters);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -151,7 +154,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
public INativeTexture2D CreateTexture(GraphicsDevice graphics,
|
public INativeTexture2D CreateTexture(GraphicsDevice graphics,
|
||||||
SurfaceFormat surfaceFormat, int width, int height, int mipCount)
|
SurfaceFormat surfaceFormat, int width, int height, int mipCount)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new Texture2DGL3(surfaceFormat, width, height, mipCount);
|
return new Texture2DGL3(surfaceFormat, width, height, mipCount);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -169,7 +172,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
public INativeBuffer CreateIndexBuffer(GraphicsDevice graphics,
|
public INativeBuffer CreateIndexBuffer(GraphicsDevice graphics,
|
||||||
IndexElementSize size, int indexCount, BufferUsage usage)
|
IndexElementSize size, int indexCount, BufferUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new IndexBufferGL3(size, indexCount, usage);
|
return new IndexBufferGL3(size, indexCount, usage);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -188,7 +191,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
VertexDeclaration vertexDeclaration, int vertexCount,
|
VertexDeclaration vertexDeclaration, int vertexCount,
|
||||||
BufferUsage usage)
|
BufferUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new VertexBufferGL3(vertexDeclaration, vertexCount, usage);
|
return new VertexBufferGL3(vertexDeclaration, vertexCount, usage);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -200,7 +203,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
/// <returns>Native Blend State.</returns>
|
/// <returns>Native Blend State.</returns>
|
||||||
public INativeBlendState CreateBlendState()
|
public INativeBlendState CreateBlendState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new BlendStateGL3();
|
return new BlendStateGL3();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -212,7 +215,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
/// <returns>Native Rasterizer State.</returns>
|
/// <returns>Native Rasterizer State.</returns>
|
||||||
public INativeRasterizerState CreateRasterizerState()
|
public INativeRasterizerState CreateRasterizerState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new RasterizerStateGL3();
|
return new RasterizerStateGL3();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -224,7 +227,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
/// <returns>Native Depth Stencil State.</returns>
|
/// <returns>Native Depth Stencil State.</returns>
|
||||||
public INativeDepthStencilState CreateDepthStencilState()
|
public INativeDepthStencilState CreateDepthStencilState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new DepthStencilStateGL3();
|
return new DepthStencilStateGL3();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -236,7 +239,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
/// <returns>Native Sampler State.</returns>
|
/// <returns>Native Sampler State.</returns>
|
||||||
public INativeSamplerState CreateSamplerState()
|
public INativeSamplerState CreateSamplerState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new SamplerStateGL3();
|
return new SamplerStateGL3();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -249,7 +252,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
/// <returns>Byte code of the shader.</returns>
|
/// <returns>Byte code of the shader.</returns>
|
||||||
public byte[] GetShaderByteCode(PreDefinedShader type)
|
public byte[] GetShaderByteCode(PreDefinedShader type)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
if (type == PreDefinedShader.SpriteBatch)
|
if (type == PreDefinedShader.SpriteBatch)
|
||||||
{
|
{
|
||||||
@ -287,7 +290,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
/// <returns>List of graphics adapters.</returns>
|
/// <returns>List of graphics adapters.</returns>
|
||||||
public ReadOnlyCollection<GraphicsAdapter> GetAdapterList()
|
public ReadOnlyCollection<GraphicsAdapter> GetAdapterList()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
var result = new List<GraphicsAdapter>();
|
var result = new List<GraphicsAdapter>();
|
||||||
foreach (DisplayDevice device in DisplayDevice.AvailableDisplays)
|
foreach (DisplayDevice device in DisplayDevice.AvailableDisplays)
|
||||||
@ -348,7 +351,7 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
DepthFormat preferredDepthFormat, int preferredMultiSampleCount,
|
DepthFormat preferredDepthFormat, int preferredMultiSampleCount,
|
||||||
RenderTargetUsage usage)
|
RenderTargetUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new RenderTarget2DGL3(width, height, mipMap, preferredFormat,
|
return new RenderTarget2DGL3(width, height, mipMap, preferredFormat,
|
||||||
preferredDepthFormat, preferredMultiSampleCount, usage);
|
preferredDepthFormat, preferredMultiSampleCount, usage);
|
||||||
}
|
}
|
||||||
|
@ -55,12 +55,15 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
internal class WindowsGameWindow : ANX.Framework.GameWindow
|
internal class WindowsGameWindow : ANX.Framework.GameWindow
|
||||||
{
|
{
|
||||||
#region Public
|
#region Public
|
||||||
|
#region Form
|
||||||
internal static Form Form
|
internal static Form Form
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Handle
|
||||||
public override IntPtr Handle
|
public override IntPtr Handle
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -68,7 +71,9 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
return Form.Handle;
|
return Form.Handle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IsMinimized
|
||||||
public override bool IsMinimized
|
public override bool IsMinimized
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -76,6 +81,17 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
return Form.WindowState == FormWindowState.Minimized;
|
return Form.WindowState == FormWindowState.Minimized;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ScreenDeviceName
|
||||||
|
public override string ScreenDeviceName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region AllowUserResizing
|
#region AllowUserResizing
|
||||||
public override bool AllowUserResizing
|
public override bool AllowUserResizing
|
||||||
@ -147,23 +163,19 @@ namespace ANX.Framework.Windows.GL3
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region BeginScreenDeviceChange
|
||||||
public override void BeginScreenDeviceChange(bool willBeFullScreen)
|
public override void BeginScreenDeviceChange(bool willBeFullScreen)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region EndScreenDeviceChange
|
||||||
public override void EndScreenDeviceChange(string screenDeviceName,
|
public override void EndScreenDeviceChange(string screenDeviceName,
|
||||||
int clientWidth, int clientHeight)
|
int clientWidth, int clientHeight)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
public override string ScreenDeviceName
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,32 +84,35 @@ namespace ANX.RenderSystem.Windows.DX11
|
|||||||
}
|
}
|
||||||
|
|
||||||
public GameHost CreateGameHost(Game game)
|
public GameHost CreateGameHost(Game game)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new WindowsGameHost(game);
|
return new WindowsGameHost(game);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeGraphicsDevice CreateGraphicsDevice(PresentationParameters presentationParameters)
|
public INativeGraphicsDevice CreateGraphicsDevice(PresentationParameters presentationParameters)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new GraphicsDeviceWindowsDX11(presentationParameters);
|
return new GraphicsDeviceWindowsDX11(presentationParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeBuffer CreateIndexBuffer(GraphicsDevice graphics, IndexElementSize size, int indexCount, BufferUsage usage)
|
public INativeBuffer CreateIndexBuffer(GraphicsDevice graphics, IndexElementSize size, int indexCount, BufferUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(
|
||||||
|
AddInType.RenderSystem);
|
||||||
return new IndexBuffer_DX11(graphics, size, indexCount, usage);
|
return new IndexBuffer_DX11(graphics, size, indexCount, usage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeBuffer CreateVertexBuffer(GraphicsDevice graphics, VertexDeclaration vertexDeclaration, int vertexCount, BufferUsage usage)
|
public INativeBuffer CreateVertexBuffer(GraphicsDevice graphics, VertexDeclaration vertexDeclaration, int vertexCount, BufferUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new VertexBuffer_DX11(graphics, vertexDeclaration, vertexCount, usage);
|
return new VertexBuffer_DX11(graphics, vertexDeclaration, vertexCount, usage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, Stream vertexShaderByteCode, Stream pixelShaderByteCode)
|
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, Stream vertexShaderByteCode, Stream pixelShaderByteCode)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
Effect_DX11 effect = new Effect_DX11(graphics, managedEffect, vertexShaderByteCode, pixelShaderByteCode);
|
Effect_DX11 effect = new Effect_DX11(graphics, managedEffect, vertexShaderByteCode, pixelShaderByteCode);
|
||||||
|
|
||||||
@ -117,8 +120,8 @@ namespace ANX.RenderSystem.Windows.DX11
|
|||||||
}
|
}
|
||||||
|
|
||||||
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, System.IO.Stream byteCode)
|
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, System.IO.Stream byteCode)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
Effect_DX11 effect = new Effect_DX11(graphics, managedEffect, byteCode);
|
Effect_DX11 effect = new Effect_DX11(graphics, managedEffect, byteCode);
|
||||||
|
|
||||||
@ -126,8 +129,8 @@ namespace ANX.RenderSystem.Windows.DX11
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Texture2D CreateTexture(GraphicsDevice graphics, string fileName)
|
public Texture2D CreateTexture(GraphicsDevice graphics, string fileName)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
//TODO: implement
|
//TODO: implement
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
@ -141,32 +144,32 @@ namespace ANX.RenderSystem.Windows.DX11
|
|||||||
}
|
}
|
||||||
|
|
||||||
public INativeBlendState CreateBlendState()
|
public INativeBlendState CreateBlendState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new BlendState_DX11();
|
return new BlendState_DX11();
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeRasterizerState CreateRasterizerState()
|
public INativeRasterizerState CreateRasterizerState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new RasterizerState_DX11();
|
return new RasterizerState_DX11();
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeDepthStencilState CreateDepthStencilState()
|
public INativeDepthStencilState CreateDepthStencilState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new DepthStencilState_DX11();
|
return new DepthStencilState_DX11();
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeSamplerState CreateSamplerState()
|
public INativeSamplerState CreateSamplerState()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
return new SamplerState_DX11();
|
return new SamplerState_DX11();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] GetShaderByteCode(PreDefinedShader type)
|
public byte[] GetShaderByteCode(PreDefinedShader type)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
if (type == PreDefinedShader.SpriteBatch)
|
if (type == PreDefinedShader.SpriteBatch)
|
||||||
{
|
{
|
||||||
@ -203,8 +206,8 @@ namespace ANX.RenderSystem.Windows.DX11
|
|||||||
|
|
||||||
|
|
||||||
public System.Collections.ObjectModel.ReadOnlyCollection<GraphicsAdapter> GetAdapterList()
|
public System.Collections.ObjectModel.ReadOnlyCollection<GraphicsAdapter> GetAdapterList()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
SharpDX.DXGI.Factory factory = new Factory();
|
SharpDX.DXGI.Factory factory = new Factory();
|
||||||
|
|
||||||
@ -257,15 +260,15 @@ namespace ANX.RenderSystem.Windows.DX11
|
|||||||
}
|
}
|
||||||
|
|
||||||
public INativeTexture2D CreateTexture(GraphicsDevice graphics, SurfaceFormat surfaceFormat, int width, int height, int mipCount)
|
public INativeTexture2D CreateTexture(GraphicsDevice graphics, SurfaceFormat surfaceFormat, int width, int height, int mipCount)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
return new Texture2D_DX11(graphics, width, height, surfaceFormat, mipCount);
|
return new Texture2D_DX11(graphics, width, height, surfaceFormat, mipCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public INativeRenderTarget2D CreateRenderTarget(GraphicsDevice graphics, int width, int height, bool mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat, int preferredMultiSampleCount, RenderTargetUsage usage)
|
public INativeRenderTarget2D CreateRenderTarget(GraphicsDevice graphics, int width, int height, bool mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat, int preferredMultiSampleCount, RenderTargetUsage usage)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventRenderSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
|
||||||
|
|
||||||
return new RenderTarget2D_DX11(graphics, width, height, mipMap, preferredFormat, preferredDepthFormat, preferredMultiSampleCount, usage);
|
return new RenderTarget2D_DX11(graphics, width, height, mipMap, preferredFormat, preferredDepthFormat, preferredMultiSampleCount, usage);
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -122,6 +122,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -106,6 +106,10 @@
|
|||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\SampleContent\SampleContent.contentproj">
|
<ProjectReference Include="..\SampleContent\SampleContent.contentproj">
|
||||||
<Project>{FA6E229D-4504-47B1-8A23-2D3FCC13F778}</Project>
|
<Project>{FA6E229D-4504-47B1-8A23-2D3FCC13F778}</Project>
|
||||||
<Name>SampleContent</Name>
|
<Name>SampleContent</Name>
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -10,9 +10,11 @@ namespace RenderTarget
|
|||||||
/// Der Haupteinstiegspunkt für die Anwendung.
|
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
//AddInSystemFactory.Instance.PreferredRenderSystem = "OpenGL3";
|
//AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
//AddInSystemFactory.Instance.PreferredRenderSystem = "DirectX11";
|
// AddInType.RenderSystem, "OpenGL3");
|
||||||
|
//AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
|
// AddInType.RenderSystem, "DirectX11");
|
||||||
|
|
||||||
using (Game1 game = new Game1())
|
using (Game1 game = new Game1())
|
||||||
{
|
{
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -10,9 +10,10 @@ namespace WindowsGame1
|
|||||||
/// The main entry point for the application.
|
/// The main entry point for the application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
//AddInSystemFactory.Instance.PreferredRenderSystem = "OpenGL3";
|
AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
//AddInSystemFactory.Instance.PreferredRenderSystem = "DirectX11";
|
AddInType.RenderSystem, "OpenGL3");
|
||||||
|
//AddInType.RenderSystem, "DirectX11");
|
||||||
|
|
||||||
using (Game1 game = new Game1())
|
using (Game1 game = new Game1())
|
||||||
{
|
{
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -128,6 +128,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -10,8 +10,11 @@ namespace TextRendering
|
|||||||
/// Der Haupteinstiegspunkt für die Anwendung.
|
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreferredRenderSystem = "OpenGL3";
|
//AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
|
// AddInType.RenderSystem, "OpenGL3");
|
||||||
|
//AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
|
// AddInType.RenderSystem, "DirectX11");
|
||||||
|
|
||||||
using (Game1 game = new Game1())
|
using (Game1 game = new Game1())
|
||||||
{
|
{
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -18,10 +18,15 @@ namespace WindowsGame1
|
|||||||
|
|
||||||
AddInSelector selector = new AddInSelector();
|
AddInSelector selector = new AddInSelector();
|
||||||
if (selector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
if (selector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreferredRenderSystem = selector.cbRenderSystem.Text;
|
AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
AddInSystemFactory.Instance.PreferredSoundSystem = selector.cbAudioSystem.Text;
|
AddInType.RenderSystem, selector.cbRenderSystem.Text);
|
||||||
AddInSystemFactory.Instance.PreferredInputSystem = selector.cbInputSystem.Text;
|
|
||||||
|
AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
|
AddInType.SoundSystem, selector.cbAudioSystem.Text);
|
||||||
|
|
||||||
|
AddInSystemFactory.Instance.SetPreferredSystem(
|
||||||
|
AddInType.InputSystem, selector.cbInputSystem.Text);
|
||||||
|
|
||||||
using (Game1 game = new Game1())
|
using (Game1 game = new Game1())
|
||||||
{
|
{
|
||||||
|
@ -119,6 +119,10 @@
|
|||||||
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
|
||||||
<Name>ANX.InputSystem.Standard</Name>
|
<Name>ANX.InputSystem.Standard</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MediaSystems\ANX.MediaSystem.Windows.OpenAL\ANX.MediaSystem.Windows.OpenAL.csproj">
|
||||||
|
<Project>{97185A92-077D-4498-8B6A-8BFF04079044}</Project>
|
||||||
|
<Name>ANX.MediaSystem.Windows.OpenAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.Framework.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.Framework.Windows.DX10</Name>
|
<Name>ANX.Framework.Windows.DX10</Name>
|
||||||
|
@ -157,7 +157,7 @@ namespace ANX.SoundSystem.OpenAL
|
|||||||
public ISoundEffectInstance CreateSoundEffectInstance(
|
public ISoundEffectInstance CreateSoundEffectInstance(
|
||||||
ISoundEffect nativeSoundEffect)
|
ISoundEffect nativeSoundEffect)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventSoundSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.SoundSystem);
|
||||||
return new OpenALSoundEffectInstance((OpenALSoundEffect)nativeSoundEffect);
|
return new OpenALSoundEffectInstance((OpenALSoundEffect)nativeSoundEffect);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -165,7 +165,7 @@ namespace ANX.SoundSystem.OpenAL
|
|||||||
#region CreateSoundEffect
|
#region CreateSoundEffect
|
||||||
public ISoundEffect CreateSoundEffect(SoundEffect parent, Stream stream)
|
public ISoundEffect CreateSoundEffect(SoundEffect parent, Stream stream)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventSoundSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.SoundSystem);
|
||||||
return new OpenALSoundEffect(parent, stream);
|
return new OpenALSoundEffect(parent, stream);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -175,7 +175,7 @@ namespace ANX.SoundSystem.OpenAL
|
|||||||
int offset, int count, int sampleRate, AudioChannels channels,
|
int offset, int count, int sampleRate, AudioChannels channels,
|
||||||
int loopStart, int loopLength)
|
int loopStart, int loopLength)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventSoundSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.SoundSystem);
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -183,7 +183,7 @@ namespace ANX.SoundSystem.OpenAL
|
|||||||
#region CreateAudioListener (TODO)
|
#region CreateAudioListener (TODO)
|
||||||
public IAudioListener CreateAudioListener()
|
public IAudioListener CreateAudioListener()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventSoundSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.SoundSystem);
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -191,7 +191,7 @@ namespace ANX.SoundSystem.OpenAL
|
|||||||
#region CreateAudioEmitter (TODO)
|
#region CreateAudioEmitter (TODO)
|
||||||
public IAudioEmitter CreateAudioEmitter()
|
public IAudioEmitter CreateAudioEmitter()
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.PreventSoundSystemChange();
|
AddInSystemFactory.Instance.PreventSystemChange(AddInType.SoundSystem);
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user