agate-svn-commit Mailing List for AgateLib (Page 3)
Status: Alpha
Brought to you by:
kanato
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
(86) |
May
(77) |
Jun
|
Jul
(1) |
Aug
(31) |
Sep
(12) |
Oct
(31) |
Nov
(53) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(53) |
Feb
(14) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(13) |
2011 |
Jan
(17) |
Feb
(5) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(21) |
Dec
|
2012 |
Jan
(6) |
Feb
(14) |
Mar
(5) |
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(8) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
(5) |
Nov
(9) |
Dec
(5) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
|
Jun
(5) |
Jul
(33) |
Aug
(69) |
Sep
(35) |
Oct
(4) |
Nov
(1) |
Dec
|
From: <ka...@us...> - 2014-08-31 00:41:39
|
Revision: 1487 http://sourceforge.net/p/agate/code/1487 Author: kanato Date: 2014-08-31 00:41:35 +0000 (Sun, 31 Aug 2014) Log Message: ----------- Clean up models for windows store apps. Modified Paths: -------------- trunk/AgateLib/ApplicationModels/AgateAppModel.cs trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SerialModel.cs trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Display.cs trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs trunk/AgateLib.Tests/Tests.WindowsPhone/TestContainer.xaml.cs Added Paths: ----------- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SerialModel.cs trunk/AgateLib.Platform.WindowsStoreCommon/ApplicationModels/WindowsStoreSerialModel.cs Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs =================================================================== --- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -89,12 +89,13 @@ /// </summary> public void Exit() { - Instance = null; QuitModel = true; SceneStack.Clear(); Dispose(); + + Instance = null; } /// <summary> Modified: trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SceneModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SceneModel.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SceneModel.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -35,6 +35,8 @@ context.DeviceReset += context_DeviceReset; Parameters.RenderTarget.BindContextToRenderTarget(context); + + SDX_Display.PauseWhenNotRendering = false; } void context_DeviceReset(object sender, DeviceResetEventArgs e) Modified: trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SerialModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SerialModel.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SerialModel.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -10,86 +10,19 @@ namespace AgateLib.Platform.WindowsMetro.ApplicationModels { - public class SerialModel : EntryPointAppModelBase + public class SerialModel : WindowsStoreSerialModel { - SharpDXContext context; - - IAsyncAction gameThread; - bool exit; - bool threadRunning; - int retval; - public SerialModel(WindowsStoreSerialModelParameters parameters) : base(parameters) { } - public new WindowsStoreSerialModelParameters Parameters { get { return (WindowsStoreSerialModelParameters)base.Parameters; } } - protected override void InitializeImpl() { WindowsInitializer.Initialize(Parameters.RenderTarget, Parameters.AssetLocations); - context = SDX_Display.InitializerContext; - context.Render += context_Render; - context.DeviceReset += context_DeviceReset; - - Parameters.RenderTarget.BindContextToRenderTarget(context); - - SDX_Display.PauseWhenNotRendering = true; + InitWindowsStoreCommon(); } - void context_DeviceReset(object sender, DeviceResetEventArgs e) - { - } - - void context_Render(object sender, EventArgs e) - { - SDX_Display.RenderingFrame = true; - - while (SDX_Display.RenderingFrame) ; - } - - int ExecuteEntry(Func<int> entryPoint) - { - try - { - threadRunning = true; - - try - { - return entryPoint(); - } - catch (ExitGameException) - { - return 0; - } - } - finally - { - threadRunning = false; - } - } - - protected override int BeginModel(Func<int> entryPoint) - { - gameThread = Windows.System.Threading.ThreadPool.RunAsync( - (workItem) => { retval = ExecuteEntry(entryPoint); }); - - return 0; - } - - public override void KeepAlive() - { - if (exit) - throw new ExitGameException(); - - base.KeepAlive(); - } - - protected override void window_Closing(object sender, ref bool cancel) - { - exit = true; - } } } Modified: trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-31 00:41:35 UTC (rev 1487) @@ -98,6 +98,7 @@ </ItemGroup> <ItemGroup> <Compile Include="ApplicationModels\SceneModel.cs" /> + <Compile Include="ApplicationModels\SerialModel.cs" /> <Compile Include="Factories\WindowsPhoneFactory.cs" /> <Compile Include="Factories\WPPlatformFactory.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> Modified: trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -35,6 +35,8 @@ context.DeviceReset += context_DeviceReset; Parameters.RenderTarget.BindContextToRenderTarget(context); + + SDX_Display.PauseWhenNotRendering = false; } void context_DeviceReset(object sender, DeviceResetEventArgs e) Added: trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SerialModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SerialModel.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SerialModel.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -0,0 +1,24 @@ +using AgateLib.Platform.WindowsStore.ApplicationModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Platform.WindowsPhone.ApplicationModels +{ + public class SerialModel : WindowsStoreSerialModel + { + public SerialModel(WindowsStoreSerialModelParameters parameters) + : base(parameters) + { + } + + protected override void InitializeImpl() + { + WindowsPhoneInitializer.Initialize(Parameters.RenderTarget, Parameters.AssetLocations); + + InitWindowsStoreCommon(); + } + } +} Modified: trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj 2014-08-31 00:41:35 UTC (rev 1487) @@ -51,6 +51,7 @@ <None Include="Resources\fxc.bat" /> </ItemGroup> <ItemGroup> + <Compile Include="ApplicationModels\WindowsStoreSerialModel.cs" /> <Compile Include="ApplicationModels\WindowsStoreSerialModelParameters.cs" /> <Compile Include="DisplayImplementation\D3DDevice.cs" /> <Compile Include="DisplayImplementation\DrawBuffer.cs" /> Added: trunk/AgateLib.Platform.WindowsStoreCommon/ApplicationModels/WindowsStoreSerialModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/ApplicationModels/WindowsStoreSerialModel.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsStoreCommon/ApplicationModels/WindowsStoreSerialModel.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -0,0 +1,141 @@ +using AgateLib.ApplicationModels; +using AgateLib.Platform.WindowsStore.DisplayImplementation; +using SharpDX.SimpleInitializer; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Windows.Foundation; + +namespace AgateLib.Platform.WindowsStore.ApplicationModels +{ + public abstract class WindowsStoreSerialModel : EntryPointAppModelBase + { + SharpDXContext mContext; + + IAsyncAction gameThread; + bool exit; + bool threadRunning; + int retval; + + public WindowsStoreSerialModel(WindowsStoreSerialModelParameters parameters) + : base(parameters) + { + } + + public new WindowsStoreSerialModelParameters Parameters { get { return (WindowsStoreSerialModelParameters)base.Parameters; } } + + protected SharpDXContext Context + { + get { return mContext; } + set + { + DetachContextEvents(); + mContext = value; + AttachContextEvents(); + } + } + + protected void InitWindowsStoreCommon() + { + Context = SDX_Display.InitializerContext; + + Parameters.RenderTarget.BindContextToRenderTarget(Context); + SDX_Display.FrameCount = 0; + + SDX_Display.PauseWhenNotRendering = true; + + Parameters.RenderTarget.Disposed += RenderTarget_Disposed; + } + + protected override void Dispose(bool disposing) + { + KillThread(); + + base.Dispose(disposing); + } + void RenderTarget_Disposed(object sender, EventArgs e) + { + KillThread(); + } + + private void AttachContextEvents() + { + Context.Render += context_Render; + Context.DeviceReset += context_DeviceReset; + } + + private void DetachContextEvents() + { + if (mContext != null) + { + Context.Render -= context_Render; + Context.DeviceReset -= context_DeviceReset; + } + } + + void context_DeviceReset(object sender, DeviceResetEventArgs e) + { + } + + void context_Render(object sender, EventArgs e) + { + SDX_Display.RenderingFrame = true; + + while (threadRunning && SDX_Display.RenderingFrame && SDX_Display.WaitingForMainThread) ; + } + + int ExecuteEntry(Func<int> entryPoint) + { + try + { + threadRunning = true; + + try + { + return entryPoint(); + } + catch (ExitGameException) + { + return 0; + } + } + finally + { + threadRunning = false; + } + } + + protected override int BeginModel(Func<int> entryPoint) + { + gameThread = Windows.System.Threading.ThreadPool.RunAsync( + (workItem) => { retval = ExecuteEntry(entryPoint); }); + + return 0; + } + + public override void KeepAlive() + { + if (exit) + throw new ExitGameException(); + + base.KeepAlive(); + } + + protected override void window_Closing(object sender, ref bool cancel) + { + KillThread(); + } + + private void KillThread() + { + exit = true; + + while (threadRunning) + { + SDX_Display.RenderingFrame = true; + } + } + } +} Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -88,10 +88,8 @@ { if (SDX_Display.PauseWhenNotRendering) { - while (SDX_Display.RenderingFrame == false) - { - - } + SDX_Display.WaitingForMainThread = true; + while (SDX_Display.RenderingFrame == false && SDX_Display.WaitingForMainThread) ; } mContext.D3DContext.OutputMerger.SetTargets( @@ -102,6 +100,7 @@ public override void EndRender() { SDX_Display.RenderingFrame = false; + SDX_Display.WaitingForMainThread = false; } public override AgateLib.DisplayLib.DisplayWindow AttachedWindow Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Display.cs =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Display.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Display.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -227,17 +227,26 @@ #region --- BeginFrame stuff and DeltaTime --- + public bool InFrame { get; private set; } + protected override void OnBeginFrame() { + if (mRenderTarget is FrameBufferWindow) + FrameCount++; + mRenderTarget.BeginRender(); SetClipRect(new AgateLib.Geometry.Rectangle(new AgateLib.Geometry.Point(0, 0), mRenderTarget.Size)); mDevice.DeviceContext.OutputMerger.SetDepthStencilState(mDepthStencilState); + + InFrame = true; } protected override void OnEndFrame() { mDevice.DrawBuffer.Flush(); mRenderTarget.EndRender(); + + InFrame = false; } #endregion @@ -813,5 +822,9 @@ InitializeDeviceWrapper(); } + + public static int FrameCount { get; set; } + + public static bool WaitingForMainThread { get; set; } } } \ No newline at end of file Modified: trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo =================================================================== (Binary files differ) Modified: trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo =================================================================== (Binary files differ) Modified: trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -15,8 +15,20 @@ public SwapChainBackgroundPanelAdapter(SwapChainBackgroundPanel renderTarget) { mRenderTarget = renderTarget; + renderTarget.Unloaded += renderTarget_Unloaded; } + void renderTarget_Unloaded(object sender, Windows.UI.Xaml.RoutedEventArgs e) + { + OnDisposed(); + } + + private void OnDisposed() + { + if (Disposed != null) + Disposed(this, EventArgs.Empty); + } + public SwapChainBackgroundPanel RenderTarget { get { return mRenderTarget; } } public DisplayLib.DisplayWindow Owner { get; set; } Modified: trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -24,6 +24,7 @@ AttachEvents(); } + public SwapChainPanel RenderTarget { get { return mRenderTarget; } } public DisplayLib.DisplayWindow Owner { get; set; } @@ -54,8 +55,21 @@ mRenderTarget.KeyDown += mRenderTarget_KeyDown; mRenderTarget.KeyUp += mRenderTarget_KeyUp; + + mRenderTarget.Unloaded += renderTarget_Unloaded; } + void renderTarget_Unloaded(object sender, Windows.UI.Xaml.RoutedEventArgs e) + { + OnDisposed(); + } + + private void OnDisposed() + { + if (Disposed != null) + Disposed(this, EventArgs.Empty); + } + void mRenderTarget_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e) { } Modified: trunk/AgateLib.Tests/Tests.WindowsPhone/TestContainer.xaml.cs =================================================================== --- trunk/AgateLib.Tests/Tests.WindowsPhone/TestContainer.xaml.cs 2014-08-30 23:55:55 UTC (rev 1486) +++ trunk/AgateLib.Tests/Tests.WindowsPhone/TestContainer.xaml.cs 2014-08-31 00:41:35 UTC (rev 1487) @@ -33,7 +33,7 @@ } public TestInfo Info { get; set;} - SceneModel model; + AgateAppModel model; /// <summary> /// Invoked when this page is about to be displayed in a Frame. @@ -47,26 +47,45 @@ IAgateTest t = (IAgateTest)Activator.CreateInstance(Info.Class); if (t is ISceneModelTest) - { RunTest((ISceneModelTest)t); - } + else if (t is ISerialModelTest) + RunTest((ISerialModelTest)t); } protected override void OnNavigatedFrom(NavigationEventArgs e) { AgateAppModel.Instance.Exit(); } + private void RunTest(ISerialModelTest t) + { + var parameters = new WindowsStoreSerialModelParameters(new SwapChainPanelAdapter(RenderTarget)); + + SetAssetPath(t, parameters.AssetLocations); + + t.ModifyModelParameters(parameters); + + var smodel = new SerialModel(parameters); + model = smodel; + smodel.Run(new Action(t.EntryPoint)); + } private void RunTest(ISceneModelTest t) { - var assemblyName = t.GetType().GetTypeInfo().Assembly.GetName().Name; - var parameters = new WindowsStoreSceneModelParameters(new SwapChainPanelAdapter(RenderTarget)); - parameters.AssetLocations.Path = "ms-appx:///" + assemblyName + "/Assets"; + SetAssetPath(t, parameters.AssetLocations); + t.ModifyModelParameters(parameters); - model = new SceneModel(parameters); - model.Run(t.StartScene); + var smodel = new SceneModel(parameters); + model = smodel; + smodel.Run(t.StartScene); } + + private static void SetAssetPath(IAgateTest t, AssetLocations assets) + { + var assemblyName = t.GetType().GetTypeInfo().Assembly.GetName().Name; + assets.Path = "ms-appx:///" + assemblyName + "/Assets"; + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-30 23:56:13
|
Revision: 1486 http://sourceforge.net/p/agate/code/1486 Author: kanato Date: 2014-08-30 23:55:55 +0000 (Sat, 30 Aug 2014) Log Message: ----------- Operation on Windows Phone greatly improved. Surfaces and clip rects work, running multiple tests in a row works. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/ApplicationModels/AgateAppModel.cs trunk/AgateLib/ApplicationModels/AssetLocations.cs trunk/AgateLib/ApplicationModels/EntryPointAppModelBase.cs trunk/AgateLib/ApplicationModels/ModelParameters.cs trunk/AgateLib/ApplicationModels/Scene.cs trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs trunk/AgateLib/ApplicationModels/SceneStack.cs trunk/AgateLib/Core.cs trunk/AgateLib/DisplayLib/Display.cs trunk/AgateLib/DisplayLib/Font.cs trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs trunk/AgateLib/DisplayLib/Surface.cs trunk/AgateLib/Drivers/IDisplayFactory.cs trunk/AgateLib/Geometry/Color.cs trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs trunk/AgateLib/Particles/Emitters/SpriteEmitter.cs trunk/AgateLib/Settings/PersistantSettings.cs trunk/AgateLib/Sprites/Sprite.cs trunk/AgateLib-Windows.sln trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj trunk/AgateLib.OpenGL/GL3/DrawBuffer.cs trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj trunk/AgateLib.Platform.WinForms/ApplicationModels/PassiveModel.cs trunk/AgateLib.Platform.WinForms/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WinForms/ApplicationModels/SerialModel.cs trunk/AgateLib.Platform.WinForms/Data/AgateDatabase.cs trunk/AgateLib.Platform.WinForms/Data/AgateTableDictionary.cs trunk/AgateLib.Platform.WinForms/DisplayImplementation/ContextInfo.cs trunk/AgateLib.Platform.WinForms/DisplayImplementation/DesktopGLDisplay.cs trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_DisplayControl.cs trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_GameWindow.cs trunk/AgateLib.Platform.WinForms/DisplayImplementation/GL_Surface.cs trunk/AgateLib.Platform.WinForms/DisplayImplementation/IPrimaryWindow.cs trunk/AgateLib.Platform.WinForms/DisplayImplementation/frmFullScreen.Designer.cs trunk/AgateLib.Platform.WinForms/DisplayImplementation/frmFullScreen.cs trunk/AgateLib.Platform.WinForms/Factories/DisplayFactory.cs trunk/AgateLib.Platform.WinForms/Factories/FormsFactory.cs trunk/AgateLib.Platform.WinForms/Factories/PlatformFactory.cs trunk/AgateLib.Platform.WinForms/Factories/SdlFactory.cs trunk/AgateLib.Platform.WinForms/Factories/SysIoFile.cs trunk/AgateLib.Platform.WinForms/Factories/SysIoPath.cs trunk/AgateLib.Platform.WinForms/PixelBufferExtensions.cs trunk/AgateLib.Platform.WinForms/PlatformImplementation/FormsPlatformInfo.cs trunk/AgateLib.Platform.WinForms/Resources/BuiltinResources.cs trunk/AgateLib.Platform.WinForms/SurfaceExtensions.cs trunk/AgateLib.Platform.WindowsMetro/AgateLib.Platform.WindowsMetro.csproj trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsMetro/Factories/WinPlatformFactory.cs trunk/AgateLib.Platform.WindowsMetro/Factories/WindowsFactory.cs trunk/AgateLib.Platform.WindowsMetro/WindowsInitializer.cs trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/D3DDevice.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferSurface.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Display.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_DisplayWindow.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_FrameBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_IndexBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_VertexBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Lighting2DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Lighting3DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/ShaderFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/ShaderSourceProvider.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/FakeFile.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/FakePath.cs trunk/AgateLib.Platform.WindowsStoreCommon/IRenderTargetAdapter.cs trunk/AgateLib.Platform.WindowsStoreCommon/Interop.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/DiagnosticsStopwatch.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStorePlatformFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/ShaderSource/Basic2Dpixel.hlsl trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeAgateFactory.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeDisplayDriver.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeDisplayWindow.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeFontSurface.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakeFrameBuffer.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakePlatformFactory.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/FakePlatformInfo.cs trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj trunk/AgateLib.Tests/Tests.WinForms/AudioTests/AudioPlayer/AudioPlayer.cs trunk/AgateLib.Tests/Tests.WinForms/AudioTests/AudioPlayer/frmAudioPlayer.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/AudioTests/AudioPlayer/frmAudioPlayer.cs trunk/AgateLib.Tests/Tests.WinForms/AudioTests/SoundbufferStopTester.cs trunk/AgateLib.Tests/Tests.WinForms/AudioTests/StreamAudio.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/ErrorReport/ErrorReport.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/ErrorReport/frmErrorReport.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/ErrorReport/frmErrorReport.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/PersistantSettingsTest.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/PlatformDetection/PlatformDetection.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/PlatformDetection/PlatformDetection.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/PlatformDetection/PlatformDetector.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Resources.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Timers/Timers.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Timers/frmTimers.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Timers/frmTimers.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/BasicDrawing/BasicDrawing.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/BasicDrawing/DrawingTester.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/BasicDrawing/DrawingTester.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/Capabilities/Capabilities.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/Capabilities/frmCapabilities.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/Capabilities/frmCapabilities.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/DisplayWindowEvents.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/FullScreen.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/LargeImage.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleFramebufferTest.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleRenderTargetExample.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleRenderTargetExample.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/MultipleWindows/MultipleWindowTest.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/PixelBufferMask.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/PixelBufferTest/PixelBufferForm.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/PixelBufferTest/PixelBufferForm.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/PixelBufferTest/PixelBufferTest.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/Prerendered.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/RenderStates/RenderStates.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/RenderStates/frmRenderStateTest.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/RenderStates/frmRenderStateTest.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/RenderTargetContinuous.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/ScreenCapture.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SpriteTester/SpriteTester.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SpriteTester/frmChooseSprite.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SpriteTester/frmChooseSprite.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SpriteTester/frmSpriteTester.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SpriteTester/frmSpriteTester.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SurfaceTester/SurfaceTester.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SurfaceTester/frmSurfaceTester.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/SurfaceTester/frmSurfaceTester.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/TestPacker/TestPacker.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/TestPacker/frmTestPacker.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/TestPacker/frmTestPacker.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/TileTester/TileTester.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/TileTester/frmTileTester.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/TileTester/frmTileTester.cs trunk/AgateLib.Tests/Tests.WinForms/FontTests/BitmapFonts.cs trunk/AgateLib.Tests/Tests.WinForms/FontTests/FontAlignment.cs trunk/AgateLib.Tests/Tests.WinForms/FontTests/FontLineTester.cs trunk/AgateLib.Tests/Tests.WinForms/FontTests/Fonts.cs trunk/AgateLib.Tests/Tests.WinForms/FontTests/Kerning.cs trunk/AgateLib.Tests/Tests.WinForms/InputTests/Input/InputTester.cs trunk/AgateLib.Tests/Tests.WinForms/InputTests/Input/frmInputTester.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/InputTests/Input/frmInputTester.cs trunk/AgateLib.Tests/Tests.WinForms/Shaders/Hlsl.cs trunk/AgateLib.Tests/Tests.WinForms/Shaders/Lighting3DTest.cs trunk/AgateLib.Tests/Tests.WinForms/Shaders/LightingTest/LightingTest.cs trunk/AgateLib.Tests/Tests.WinForms/Shaders/LightingTest/LightingTestForm.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/Shaders/LightingTest/LightingTestForm.cs trunk/AgateLib.Tests/Tests.WinForms/TestLauncher.cs trunk/AgateLib.Tests/Tests.WinForms/UserInterfaceTests/Form1.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/UserInterfaceTests/Form1.cs trunk/AgateLib.Tests/Tests.WinForms/UserInterfaceTests/GuiStuff.cs trunk/AgateLib.Tests/Tests.WinForms/UserInterfaceTests/GuiTest.cs trunk/AgateLib.Tests/Tests.WinForms/WinFormsTests/Converters.cs trunk/AgateLib.Tests/Tests.WinForms/frmLauncher.Designer.cs trunk/AgateLib.Tests/Tests.WinForms/frmLauncher.cs trunk/AgateLib.Tests/Tests.WinForms/frmLauncher.resx trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj trunk/AgateLib.Tests/UnitTests/Algorithms/EMathTest.cs trunk/AgateLib.Tests/UnitTests/ApplicationModels/ArgumentProcessing.cs trunk/AgateLib.Tests/UnitTests/ApplicationModels/CoordinateSystemTest.cs trunk/AgateLib.Tests/UnitTests/Display/DisplayTests.cs trunk/AgateLib.Tests/UnitTests/Display/DisplayWindowTest.cs trunk/AgateLib.Tests/UnitTests/Display/FontTests.cs trunk/AgateLib.Tests/UnitTests/Extensions/ListExtensions.cs trunk/AgateLib.Tests/UnitTests/Resources/SerializationTest.cs trunk/AgateLib.Tests/UnitTests/Serialization/Xle/XSTests.cs trunk/AgateLib.Tests/UnitTests/UserInterface/Css/LayoutTest.cs trunk/AgateLib.Tests/UnitTests/Utility/RefTest.cs Added Paths: ----------- trunk/AgateLib/ApplicationModels/PassiveModelParameters.cs trunk/AgateLib/ApplicationModels/SceneModelParameters.cs trunk/AgateLib/ApplicationModels/SerialModelParameters.cs trunk/AgateLib/Assets/ trunk/AgateLib/Assets/Fonts.cs trunk/AgateLib/Geometry/CoordinateSystems/FixedCoordinateSystem.cs trunk/AgateLib.Platform.WinForms/Controls/ trunk/AgateLib.Platform.WinForms/Controls/AgateRenderTarget.Designer.cs trunk/AgateLib.Platform.WinForms/Controls/AgateRenderTarget.cs trunk/AgateLib.Platform.WinForms/Controls/DisplayWindowForm.Designer.cs trunk/AgateLib.Platform.WinForms/Controls/DisplayWindowForm.cs trunk/AgateLib.Platform.WinForms/Controls/DisplayWindowForm.resx trunk/AgateLib.Platform.WinForms/Controls/FormUtil.cs trunk/AgateLib.Platform.WinForms/Controls/Icons.Designer.cs trunk/AgateLib.Platform.WinForms/Controls/Icons.resx trunk/AgateLib.Platform.WinForms/Fonts/ trunk/AgateLib.Platform.WinForms/Fonts/BitmapFontUtil.cs trunk/AgateLib.Platform.WinForms/Fonts/BitmapFontUtilRenderers.cs trunk/AgateLib.Platform.WinForms/FormsInterop.cs trunk/AgateLib.Platform.WinForms/Geometry/ trunk/AgateLib.Platform.WinForms/Geometry/TypeConverters.cs trunk/AgateLib.Platform.WinForms/IO/ trunk/AgateLib.Platform.WinForms/IO/FileProviderList.cs trunk/AgateLib.Platform.WinForms/IO/FileSystemProvider.cs trunk/AgateLib.Platform.WinForms/IO/TgzFileProvider.cs trunk/AgateLib.Platform.WinForms/IO/ZipFileProvider.cs trunk/AgateLib.Platform.WinForms/WinFormsInitializer.cs trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SerialModel.cs trunk/AgateLib.Platform.WindowsStoreCommon/ApplicationModels/ trunk/AgateLib.Platform.WindowsStoreCommon/ApplicationModels/WindowsStoreSceneModelParameters.cs trunk/AgateLib.Platform.WindowsStoreCommon/ApplicationModels/WindowsStoreSerialModelParameters.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStoreAssetFileProvider.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStorePlatformInfo.cs trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainPanelAdapter.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/boxsprite.png trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/tile1.png trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/tile2.png trunk/AgateLib.Tests/AgateLib.Tests.Portable/Assets/wallpaper.png trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/BasicSprite.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ClipRect.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ColorTest.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/Interpolation.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/ParticleTests.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/RotatingSpriteTester.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/DisplayTests/Tiling.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/Fakes/ trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/ trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/Builtin.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/FontTests/TextLayout.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/IAgateTest.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/IDiscreteAgateTest.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/ISceneModelTest.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/ISerialModelTest.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/TestCollection.cs trunk/AgateLib.Tests/AgateLib.Tests.Portable/TestInfo.cs trunk/AgateLib.Tests/Tests.WinForms/Assets/ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/CoordinateSystem.cs trunk/AgateLib.Tests/Tests.WinForms/FontTests/ trunk/AgateLib.Tests/Tests.WinForms/InputTests/InputStateTester.cs trunk/AgateLib.Tests/Tests.WindowsPhone/ trunk/AgateLib.Tests/Tests.WindowsPhone/App.xaml trunk/AgateLib.Tests/Tests.WindowsPhone/App.xaml.cs trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/ trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/Logo.scale-240.png trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/SmallLogo.scale-240.png trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/SplashScreen.scale-240.png trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/Square71x71Logo.scale-240.png trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/StoreLogo.scale-240.png trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/WideLogo.scale-240.png trunk/AgateLib.Tests/Tests.WindowsPhone/Assets/boxsprite.png trunk/AgateLib.Tests/Tests.WindowsPhone/MainPage.xaml trunk/AgateLib.Tests/Tests.WindowsPhone/MainPage.xaml.cs trunk/AgateLib.Tests/Tests.WindowsPhone/Package.appxmanifest trunk/AgateLib.Tests/Tests.WindowsPhone/Properties/ trunk/AgateLib.Tests/Tests.WindowsPhone/Properties/AssemblyInfo.cs trunk/AgateLib.Tests/Tests.WindowsPhone/TestContainer.xaml trunk/AgateLib.Tests/Tests.WindowsPhone/TestContainer.xaml.cs trunk/AgateLib.Tests/Tests.WindowsPhone/Tests.WindowsPhone.csproj trunk/AgateLib.Tests/UnitTests/Algorithms/PathFinding/ trunk/AgateLib.Tests/UnitTests/Algorithms/PathFinding/AStarTest.cs trunk/AgateLib.Tests/UnitTests/Diagnostics/ trunk/AgateLib.Tests/UnitTests/Diagnostics/ConsoleTests.cs trunk/AgateLib.Tests/UnitTests/Platform/ trunk/AgateLib.Tests/UnitTests/Platform/PlatformTests.cs trunk/AgateLib.Tests/UnitTests/Serialization/Xle/TestSerializable.cs trunk/Tests/ trunk/Tests/Tests.WindowsMetro/ trunk/Tests/Tests.WindowsMetro/App.xaml trunk/Tests/Tests.WindowsMetro/App.xaml.cs trunk/Tests/Tests.WindowsMetro/Assets/ trunk/Tests/Tests.WindowsMetro/Assets/Logo.scale-100.png trunk/Tests/Tests.WindowsMetro/Assets/SmallLogo.scale-100.png trunk/Tests/Tests.WindowsMetro/Assets/SplashScreen.scale-100.png trunk/Tests/Tests.WindowsMetro/Assets/StoreLogo.scale-100.png trunk/Tests/Tests.WindowsMetro/MainPage.xaml trunk/Tests/Tests.WindowsMetro/MainPage.xaml.cs trunk/Tests/Tests.WindowsMetro/Package.appxmanifest trunk/Tests/Tests.WindowsMetro/Properties/ trunk/Tests/Tests.WindowsMetro/Properties/AssemblyInfo.cs trunk/Tests/Tests.WindowsMetro/TestContainer.xaml trunk/Tests/Tests.WindowsMetro/TestContainer.xaml.cs trunk/Tests/Tests.WindowsMetro/Tests.WindowsMetro.csproj trunk/Tests/Tests.WindowsMetro/Tests.WindowsMetro_TemporaryKey.pfx Removed Paths: ------------- trunk/AgateLib/AgateGame.cs trunk/AgateLib/AgateSetup.cs trunk/AgateLib.Platform.WinForms/ApplicationModels/FormsModelParameters.cs trunk/AgateLib.Platform.WinForms/ApplicationModels/PassiveModelParameters.cs trunk/AgateLib.Platform.WinForms/ApplicationModels/SceneModelParameters.cs trunk/AgateLib.Platform.WinForms/ApplicationModels/SerialModelParameters.cs trunk/AgateLib.Platform.WinForms/Initializer.cs trunk/AgateLib.Platform.WinForms/PlatformImplementation/FileProviderList.cs trunk/AgateLib.Platform.WinForms/PlatformImplementation/FileSystemProvider.cs trunk/AgateLib.Platform.WinForms/PlatformImplementation/TgzFileProvider.cs trunk/AgateLib.Platform.WinForms/PlatformImplementation/ZipFileProvider.cs trunk/AgateLib.Platform.WinForms/WinForms/ trunk/AgateLib.Platform.WindowsMetro/ApplicationModels/SceneModelParameters.cs trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModelParameters.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WPAssetFileProvider.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WPPlatformInfo.cs trunk/AgateLib.Tests/Tests.WinForms/AgateTestAttribute.cs trunk/AgateLib.Tests/Tests.WinForms/Assets/boxsprite.png trunk/AgateLib.Tests/Tests.WinForms/Assets/wallpaper.png trunk/AgateLib.Tests/Tests.WinForms/CoreTests/App.cs trunk/AgateLib.Tests/Tests.WinForms/CoreTests/Performance/ trunk/AgateLib.Tests/Tests.WinForms/CoreTests/RefCounters.cs trunk/AgateLib.Tests/Tests.WinForms/Data/ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/BasicSprite.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/ClipRect.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/ColorTest.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/Interpolation.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/ParticleTests/ trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/RotatingSpriteTester.cs trunk/AgateLib.Tests/Tests.WinForms/DisplayTests/Tiling.cs trunk/AgateLib.Tests/Tests.WinForms/FontTests/Builtin.cs trunk/AgateLib.Tests/Tests.WinForms/FontTests/TextLayout.cs trunk/AgateLib.Tests/Tests.WinForms/Fonts/ trunk/AgateLib.Tests/Tests.WinForms/IAgateTest.cs trunk/AgateLib.Tests/Tests.WinForms/InputTests/InputState/ trunk/AgateLib.Tests/Tests.WinForms/Service References/ trunk/AgateLib.Tests/Tests.WinForms/Shaders/CoordinateSystem.cs trunk/AgateLib.Tests/UnitTests/Algorithms/AStarTest.cs trunk/AgateLib.Tests/UnitTests/Core/ trunk/AgateLib.Tests/UnitTests/Fakes/ trunk/AgateLib.Tests/UnitTests/PlatformTests.cs trunk/AgateLib.Tests/UnitTests/Serialization/Xle/Serializable.cs Deleted: trunk/AgateLib/AgateGame.cs =================================================================== --- trunk/AgateLib/AgateGame.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/AgateGame.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -1,363 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using AgateLib.Geometry; -using AgateLib.DisplayLib; - -namespace AgateLib -{ - /// <summary> - /// Application framework for a game. Using AgateGame can simplify the application - /// source code and start up. - /// </summary> - /// <example> - /// <code> - /// using AgateLib; - /// - /// namespace MyApplication - /// { - /// class MyApp : AgateGame - /// { - /// public static void Main(string[] args) - /// { - /// new MyApp().Run(args); - /// } - /// - /// protected override void Initialize() - /// { - /// // do any needed initialization, loading of surfaces, etc. here. - /// } - /// protected override void Update(double time_ms) - /// { - /// // update game logic here. - /// } - /// protected override void Render() - /// { - /// // render game here. - /// } - /// } - /// } - /// </code> - /// </example> - public class AgateGame - { - DisplayWindow mWindow; - AppInitParameters mInitParams; - FontSurface mFont; - //Gui.GuiRoot mGui; - - double mTotalSplashTime = 0; - bool mSplashFadeDone = false; - - #region --- Run Method --- - - /// <summary> - /// Runs the application. - /// </summary> - /// <returns></returns> - public int Run() - { - return Run(null); - } - /// <summary> - /// Runs the application. - /// </summary> - /// <param name="args"></param> - /// <returns></returns> - public int Run(string[] args) - { - CreateDisplayWindow(); - - mFont = new FontSurface("Arial", 14); - - if (InitParams.ShowSplashScreen) - { - DoSplash(); - } - - Initialize(); - - while (MainWindow.IsClosed == false) - { - Update(Display.DeltaTime); - - if (MainWindow.IsClosed) - break; - - // if (GuiRoot != null) - // GuiRoot.DoUpdate(); - - - Display.RenderTarget = MainWindow.FrameBuffer; - Display.BeginFrame(); - - Render(); - - // if (GuiRoot != null) - // GuiRoot.Draw(); - - Display.EndFrame(); - Core.KeepAlive(); - } - - return 0; - } - - private AppInitParameters InitParams - { - get - { - if (mInitParams == null) - { - mInitParams = new AppInitParameters(); - AdjustAppInitParameters(ref mInitParams); - } - return mInitParams; - } - } - - #endregion - #region --- Initialization --- - - /// <summary> - /// Override Initialize() to do any needed initialization for your application, - /// such as creating <see cref="AgateLib.DisplayLib.Surface">Surface</see> objects. - /// </summary> - protected virtual void Initialize() - { - } - - private void CreateDisplayWindow() - { - CreateWindowParams windp; - - if (FullScreen) - { - windp = CreateWindowParams.FullScreen(ApplicationTitle, - WindowSize.Width, WindowSize.Height, 32, null); - - windp.IconFile = InitParams.IconFile; - } - else - { - windp = CreateWindowParams.Windowed(ApplicationTitle, - WindowSize.Width, WindowSize.Height, - InitParams.AllowResize, InitParams.IconFile, null); - } - - mWindow = new DisplayWindow(windp); - } - - #endregion - #region --- Rendering and Updating --- - - /// <summary> - /// Override this method to update your game logic. - /// </summary> - /// <param name="time_ms">The amount of time that has passed since the last - /// update, in milliseconds.</param> - protected virtual void Update(double time_ms) - { - - } - - /// <summary> - /// Override this method to render your game. - /// Do not call Display.BeginFrame or Display.EndFrame. - /// </summary> - /// <remarks>Do not call Display.BeginFrame or Display.EndFrame or change - /// render targets in this method.</remarks> - protected virtual void Render() - { - RenderSplashScreen(); - - if (mSplashFadeDone) - { - Surface powered = null;// InternalResources.Data.PoweredBy; - Size size = Size.Empty;// powered.SurfaceSize; - - int bottom = MainWindow.Height - size.Height; - int h = mFont.FontHeight; - - mFont.DisplayAlignment = OriginAlignment.BottomLeft; - mFont.Color = Color.Black; - - mFont.DrawText(0, bottom - 2 * h, "Welcome to AgateLib."); - mFont.DrawText(0, bottom - h, "Your application framework is ready."); - mFont.DrawText(0, bottom, "Override the Render method in order to do your own drawing."); - } - } - - #endregion - #region --- Splash Screen --- - - private void DoSplash() - { - while (UpdateSplashScreen(Display.DeltaTime) == true) - { - Display.BeginFrame(); - - RenderSplashScreen(); - - Display.EndFrame(); - Core.KeepAlive(); - - if (MainWindow.IsClosed) - return; - } - } - - /// <summary> - /// Override this method to update the logic for a custom splash screen, - /// if there are any animations. - /// Return false to cancel the splash screen and move on. - /// </summary> - /// <param name="time_ms"></param> - protected virtual bool UpdateSplashScreen(double time_ms) - { - mTotalSplashTime += time_ms / 1000.0; - - if (mTotalSplashTime > 3.0) - return false; - else - return true; - } - /// <summary> - /// Override this method to provide a custom splash screen. This method - /// is called before the Initialize method is called. - /// </summary> - protected virtual void RenderSplashScreen() - { - Display.Clear(Color.White); - - Surface powered = null;//= InternalResources.Data.PoweredBy; - Size size = Size.Empty;// powered.SurfaceSize; - - int left = (int)(mTotalSplashTime * size.Width - size.Width) + 1; - Rectangle gradientRect = new Rectangle(left, MainWindow.Height - size.Height, - size.Width, size.Height); - - if (left < 0) - Display.PushClipRect(gradientRect); - else if (left > size.Width) - mSplashFadeDone = true; - - if (powered != null) - { - powered.DisplayAlignment = OriginAlignment.BottomLeft; - powered.Draw(0, MainWindow.Height); - } - - Gradient g = new Gradient( - Color.FromArgb(0, Color.White), - Color.White, - Color.FromArgb(0, Color.White), - Color.White); - - Display.FillRect(gradientRect, g); - if (left < 0) - { - Display.PopClipRect(); - } - } - - #endregion - - #region --- Virtual Properties --- - - /// <summary> - /// Override this to set the title of the window which is created. - /// </summary> - protected virtual string ApplicationTitle - { - get { return "AgateLib Application"; } - } - /// <summary> - /// Gets the initialization parameters. - /// </summary> - /// <returns></returns> - [Obsolete("Override AdjustAppInitParameters", true)] - protected virtual AppInitParameters GetAppInitParameters() - { - return new AppInitParameters(); - } - /// <summary> - /// Adjusts the initialization parameters. - /// </summary> - /// <param name="initParams"></param> - protected virtual void AdjustAppInitParameters(ref AppInitParameters initParams) - { - - } - - /// <summary> - /// Gets the initial size of the window. - /// </summary> - protected virtual Size WindowSize { get { return new Size(800, 600); } } - /// <summary> - /// Gets whether or not the initial window should be created full screen. - /// </summary> - protected virtual bool FullScreen { get { return false; } } - - #endregion - #region --- Public Properties --- - - /// <summary> - /// Gets the main display window. - /// </summary> - public DisplayWindow MainWindow - { - get { return mWindow; } - } - - // / <summary> - // / Gets or sets the GuiRoot object. - // / </summary> - // public Gui.GuiRoot GuiRoot - // { - // get { return mGui; } - // set - // { - // if (value == null && mGui == null) - // return; - // - // if (mGui != null) - // mGui.EnableInteraction = false; - // - // mGui = value; - // - // if (mGui != null) - // mGui.EnableInteraction = true; - // } - // } - - #endregion - - /// <summary> - /// Closes the main window. - /// </summary> - public void Quit() - { - MainWindow.Dispose(); - } - } -} Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/AgateLib.csproj 2014-08-30 23:55:55 UTC (rev 1486) @@ -15,6 +15,8 @@ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <TargetFrameworkProfile>Profile344</TargetFrameworkProfile> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> + <RestorePackages>true</RestorePackages> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -42,13 +44,15 @@ <Compile Include="AgateException.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="AgateGame.cs"> - <SubType>Code</SubType> - </Compile> <Compile Include="Algorithms\PathFinding\AStar.cs" /> <Compile Include="Algorithms\PathFinding\AStarNode.cs" /> <Compile Include="Algorithms\PathFinding\AStarState.cs" /> <Compile Include="Algorithms\Inverting.cs" /> + <Compile Include="ApplicationModels\PassiveModelParameters.cs" /> + <Compile Include="ApplicationModels\SceneModelParameters.cs" /> + <Compile Include="ApplicationModels\SerialModelParameters.cs" /> + <Compile Include="Assets\Fonts.cs" /> + <Compile Include="Geometry\CoordinateSystems\FixedCoordinateSystem.cs" /> <Compile Include="Geometry\CoordinateSystems\NativeCoordinates.cs" /> <Compile Include="ApplicationModels\EntryPointAppModelBase.cs" /> <Compile Include="ApplicationModels\Scene.cs" /> @@ -578,6 +582,13 @@ <None Include="packages.config" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> + <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /> + </Target> <!-- 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"> Deleted: trunk/AgateLib/AgateSetup.cs =================================================================== --- trunk/AgateLib/AgateSetup.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/AgateSetup.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -1,345 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Text; - -using AgateLib.AudioLib; -using AgateLib.DisplayLib; -using AgateLib.Drivers; - -namespace AgateLib -{ - /// <summary> - /// Class which is designed to simplify initialization and de-initialization of the - /// library. It is recommended to have a Setup object in a using block around your game - /// code so that calling Dispose is guaranteed. - /// - /// If the program arguments are supplied, you can allow the user to choose which drivers - /// are used, if the --choose option is specified. - /// - /// <example>This example shows a typical development pattern for the use of an AgateSetup object. - /// <code> - /// using System; - /// using System.Collections.Generic; - /// using AgateLib; - /// - /// public static void Main(string[] args) - /// { - /// using(AgateSetup setup = new AgateSetup("My Application Name", args)) - /// { - /// setup.InitializeAll(); - /// if (setup.WasCanceled) - /// return; - /// - /// // TODO: write game here - /// } - /// } - /// </code> - /// </example> - /// </summary> - public sealed class AgateSetup : IDisposable - { - private static AgateSetup sCreatedSetup; - - private bool mWasCanceled = false; - private bool mAskUser = false; - private bool mAlreadyAsked = false; - private string mTitle = "AgateLib"; - - private bool mUseDisplay = true; - private bool mUseAudio = true; - private bool mUseInput = true; - - private DisplayTypeID mPreferredDisplay = DisplayTypeID.AutoSelect; - private AudioTypeID mPreferredAudio = AudioTypeID.AutoSelect; - private InputTypeID mPreferredInput = InputTypeID.AutoSelect; - - private DisplayTypeID mSelectDisplay = DisplayTypeID.AutoSelect; - private AudioTypeID mSelectAudio = AudioTypeID.AutoSelect; - private InputTypeID mSelectInput = InputTypeID.AutoSelect; - - private string mCompanyName; - private string mAppName; - - /// <summary> - /// Indicates the display id that is preferred by the user or application. - /// </summary> - public DisplayTypeID PreferredDisplay - { - get { return mPreferredDisplay; } - set { mPreferredDisplay = value; } - } - /// <summary> - /// Indicates the audio id that is preferred by the user or application. - /// </summary> - public AudioTypeID PreferredAudio - { - get { return mPreferredAudio; } - set { mPreferredAudio = value; } - } - /// <summary> - /// Indicates the input id that is preferred by the user or application. - /// </summary> - public InputTypeID PreferredInput - { - get { return mPreferredInput; } - set { mPreferredInput = value; } - } - - /// <summary> - /// Constructs a Setup object. - /// </summary> - public AgateSetup() : this("AgateLib", null) - { - } - /// <summary> - /// Constructs a Setup object. - /// </summary> - /// <param name="title"></param> - public AgateSetup(string title) - : this(title, null) - { - } - /// <summary> - /// Constructs a Setup object. - /// </summary> - /// <param name="args">Command line arguments to the program.</param> - public AgateSetup(IEnumerable<string> args) - : this("AgateLib", args) - { - } - /// <summary> - /// Constructs a Setup object. - /// </summary> - /// <param name="title"></param> - /// <param name="args">Command line arguments to the program.</param> - public AgateSetup(string title, IEnumerable<string> args) - { - if (sCreatedSetup != null) - { - throw new AgateException("Error: You have created a second AgateSetup object without disposing the previous one."); - } - - sCreatedSetup = this; - - mTitle = title; - - if (args != null) - { - foreach (string s in args) - { - if (s == "--choose") - mAskUser = true; - } - } - } - /// <summary> - /// Initializes the specified components. This sets the values of UseDisplay, - /// UseAudio, and UseInput to the values passed in. - /// </summary> - /// <param name="display"></param> - /// <param name="audio"></param> - /// <param name="input"></param> - public void Initialize(bool display, bool audio, bool input) - { - mUseDisplay = display; - mUseAudio = audio; - mUseInput = input; - - InitializeAll(); - } - /// <summary> - /// Initializes the Display, Audio and Input controllers. - /// </summary> - public void InitializeAll() - { - if (mUseDisplay) - InitializeDisplay(); - - if (mUseAudio) - InitializeAudio(); - - if (mUseInput) - InitializeInput(); - - if (string.IsNullOrEmpty(mAppName) == false) - { - Core.Platform.SetFolderPaths(mCompanyName, mAppName); - } - } - - /// <summary> - /// Gets or sets the company name. - /// </summary> - public string CompanyName { get { return mCompanyName; } set { mCompanyName = value; } } - /// <summary> - /// Gets or sets the application name. - /// </summary> - public string ApplicationName { get { return mAppName; } set { mAppName = value; } } - - /// <summary> - /// Initializes the Display. - /// Automatically selects the driver to use, or asks the user which - /// driver to use if appropriate. - /// </summary> - private void InitializeDisplay() - { - DoAskUser(); - InitializeDisplay(); - } - - ///// <summary> - ///// Initializes the display to the specified subsystem. - ///// </summary> - ///// <param name="type"></param> - //public void InitializeDisplay(DisplayTypeID type) - //{ - // if (WasCanceled) - // return; - - // Display.Initialize(type); - //} - /// <summary> - /// Initializes the Audio subsystem. - /// Automatically picks which driver to use. - /// </summary> - private void InitializeAudio() - { - DoAskUser(); - InitializeAudio(); - } - ///// <summary> - ///// Initializes the Audio subsystem, to the specified driver. - ///// </summary> - ///// <param name="type"></param> - //public void InitializeAudio(AudioTypeID type) - //{ - // if (WasCanceled) - // return; - - // AudioLib.Audio.Initialize(type); - //} - - /// <summary> - /// Initializes the Input subsystem. - /// Automatically picks which driver to use. - /// </summary> - private void InitializeInput() - { - DoAskUser(); - InitializeInput(); - } - /// <summary> - /// Initializes the Input subsystem, to the specified driver. - /// </summary> - /// <param name="inputTypeID"></param> - //public void InitializeInput(InputTypeID inputTypeID) - //{ - // if (WasCanceled) - // return; - - // InputLib.JoystickInput.Initialize(inputTypeID); - - //} - /// <summary> - /// Disposes of the SetupDisplay object and all initialized sub-systems. - /// </summary> - public void Dispose() - { - Display.Dispose(); - Audio.Dispose(); - InputLib.JoystickInput.Dispose(); - - if (sCreatedSetup == this) - sCreatedSetup = null; - } - - /// <summary> - /// Returns true if the user hit cancel in any dialog box that showed up - /// asking the user what driver to use, or if initialization failed. - /// </summary> - public bool WasCanceled - { - get { return mWasCanceled; } - } - /// <summary> - /// Gets or sets a bool value which indicates whether or not the user - /// should be asked which driver(s) to use when Agate is initialized. - /// </summary> - /// <remarks> - /// This setting can be useful for debugging, especially when comparing - /// OpenGL vs. DirectX behavior and performance. - /// It is recommended to have AskUser turned off for release builds, however. - /// </remarks> - public bool AskUser - { - get { return mAskUser; } - set { mAskUser = value; } - } - /// <summary> - /// Gets or sets a bool value which indicates whether or not the display - /// should be initialized. - /// </summary> - public bool UseDisplay - { - get { return mUseDisplay; } - set { mUseDisplay = value; } - } - /// <summary> - /// Gets or sets a bool value which indicates whether or not the audio system - /// should be initialized. - /// </summary> - public bool UseAudio - { - get { return mUseAudio; } - set { mUseAudio = value; } - } - /// <summary> - /// Gets or sets a bool value which indicates whether or not the input system - /// should be initialized. - /// </summary> - public bool UseInput - { - get { return mUseInput; } - set { mUseInput = value; } - } - - /// <summary> - /// Checks to see whether or not the user needs to be asked, and asks them - /// if so. - /// </summary> - private void DoAskUser() - { - if (mAlreadyAsked) - return; - if (mAskUser == false) - return; - - mWasCanceled = !Registrar.UserSelectDrivers(mUseDisplay, mUseAudio, mUseInput, - mPreferredDisplay, mPreferredAudio, mPreferredInput , - out mSelectDisplay, out mSelectAudio, out mSelectInput); - - mAlreadyAsked = true; - } - - } - -} Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs =================================================================== --- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -32,8 +32,14 @@ { #region --- Static Members --- - public static AgateAppModel Instance { get; private set; } + static AgateAppModel sInstance; + public static AgateAppModel Instance + { + get { return sInstance; } + private set { sInstance = value; } + } + public static bool IsAlive { get @@ -55,6 +61,7 @@ #endregion DisplayWindow window; + protected bool QuitModel { get; private set; } public AgateAppModel(ModelParameters parameters) { @@ -66,7 +73,7 @@ Instance = this; } /// <summary> - /// Initializes the applicatin model. This will process command line arguments and initialize AgateLib. + /// Initializes the application model. This will process command line arguments and initialize AgateLib. /// It is not required to call this function manually, it will be called by the Run method if it has not /// been called. /// </summary> @@ -78,10 +85,22 @@ } /// <summary> + /// Call to exit the application model. + /// </summary> + public void Exit() + { + Instance = null; + QuitModel = true; + + SceneStack.Clear(); + + Dispose(); + } + + /// <summary> /// Override this to provide proper platform initialization of AgateLib. /// </summary> - protected virtual void InitializeImpl() - { } + protected abstract void InitializeImpl(); public void Dispose() { @@ -133,7 +152,7 @@ int extraArguments = Parameters.Arguments.Length - i - 1; p.Clear(); - for (int j = i+1; j < Parameters.Arguments.Length; j++) + for (int j = i + 1; j < Parameters.Arguments.Length; j++) { if (Parameters.Arguments[j].StartsWith("-") == false) p.Add(Parameters.Arguments[j]); Modified: trunk/AgateLib/ApplicationModels/AssetLocations.cs =================================================================== --- trunk/AgateLib/ApplicationModels/AssetLocations.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/ApplicationModels/AssetLocations.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -31,6 +31,7 @@ { public AssetLocations() { + Path = "."; } /// <summary> @@ -53,5 +54,10 @@ /// Path prefix to load user interface files from. /// </summary> public string UserInterface { get; set; } + + /// <summary> + /// Root path used to load all assets. + /// </summary> + public string Path { get; set; } } } Modified: trunk/AgateLib/ApplicationModels/EntryPointAppModelBase.cs =================================================================== --- trunk/AgateLib/ApplicationModels/EntryPointAppModelBase.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/ApplicationModels/EntryPointAppModelBase.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -100,9 +100,9 @@ } finally { - DisposeAutoCreatedWindow(); + //DisposeAutoCreatedWindow(); - Dispose(); + //Dispose(); } } Modified: trunk/AgateLib/ApplicationModels/ModelParameters.cs =================================================================== --- trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -107,5 +107,6 @@ /// implementation. /// </summary> public DeviceType EmulateDeviceType { get; set; } + } } Copied: trunk/AgateLib/ApplicationModels/PassiveModelParameters.cs (from rev 1484, trunk/AgateLib.Platform.WinForms/ApplicationModels/PassiveModelParameters.cs) =================================================================== --- trunk/AgateLib/ApplicationModels/PassiveModelParameters.cs (rev 0) +++ trunk/AgateLib/ApplicationModels/PassiveModelParameters.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -0,0 +1,22 @@ +using AgateLib.ApplicationModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.ApplicationModels +{ + public class PassiveModelParameters : ModelParameters + { + public PassiveModelParameters() + { + AutoCreateDisplayWindow = false; + } + + public PassiveModelParameters(string[] args) : this() + { + Arguments = args; + } + } +} Modified: trunk/AgateLib/ApplicationModels/Scene.cs =================================================================== --- trunk/AgateLib/ApplicationModels/Scene.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/ApplicationModels/Scene.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -1,4 +1,5 @@ -using System; +using AgateLib.Geometry; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,6 +9,8 @@ { public abstract class Scene { + public bool SceneFinished { get; set; } + public bool UpdateBelow { get; set; } public bool DrawBelow { get; set; } Modified: trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs =================================================================== --- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -1,4 +1,5 @@ -using System; +using AgateLib.DisplayLib; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -34,5 +35,22 @@ } protected abstract void BeginModel(); + + + protected void RunSingleFrame() + { + foreach (var sc in SceneStack.UpdateScenes) + sc.Update(Display.DeltaTime); + + SceneStack.CheckForFinishedScenes(); + Display.BeginFrame(); + + foreach (var sc in SceneStack.DrawScenes) + sc.Draw(); + + Display.EndFrame(); + Core.KeepAlive(); + } + } } Copied: trunk/AgateLib/ApplicationModels/SceneModelParameters.cs (from rev 1484, trunk/AgateLib.Platform.WinForms/ApplicationModels/SceneModelParameters.cs) =================================================================== --- trunk/AgateLib/ApplicationModels/SceneModelParameters.cs (rev 0) +++ trunk/AgateLib/ApplicationModels/SceneModelParameters.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.ApplicationModels +{ + public class SceneModelParameters : ModelParameters + { + } +} Modified: trunk/AgateLib/ApplicationModels/SceneStack.cs =================================================================== --- trunk/AgateLib/ApplicationModels/SceneStack.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/ApplicationModels/SceneStack.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -29,6 +29,11 @@ mScenes.Remove(scene); } + public static Scene CurrentScene + { + get { return mScenes[mScenes.Count - 1]; } + } + static IEnumerable<Scene> ScenesAbove(Func<Scene, bool> pred) { if (mScenes.Count == 0) @@ -61,5 +66,18 @@ { return mScenes.Contains(scene); } + + public static void CheckForFinishedScenes() + { + while (mScenes.Count > 0 && CurrentScene.SceneFinished) + { + mScenes.Remove(CurrentScene); + } + } + + public static void Clear() + { + mScenes.Clear(); + } } } Copied: trunk/AgateLib/ApplicationModels/SerialModelParameters.cs (from rev 1484, trunk/AgateLib.Platform.WinForms/ApplicationModels/SerialModelParameters.cs) =================================================================== --- trunk/AgateLib/ApplicationModels/SerialModelParameters.cs (rev 0) +++ trunk/AgateLib/ApplicationModels/SerialModelParameters.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -0,0 +1,22 @@ +using AgateLib.ApplicationModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.ApplicationModels +{ + public class SerialModelParameters : ModelParameters + { + public SerialModelParameters() + { + } + + public SerialModelParameters(string[] args) + : this() + { + Arguments = args; + } + } +} Added: trunk/AgateLib/Assets/Fonts.cs =================================================================== --- trunk/AgateLib/Assets/Fonts.cs (rev 0) +++ trunk/AgateLib/Assets/Fonts.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -0,0 +1,49 @@ +using AgateLib.DisplayLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Assets +{ + /// <summary> + /// Collection of default fonts. + /// </summary> + public static class Fonts + { + public static void Initialize() + { + AgateSans = Font.Create("AgateSans", 8, 64, FontStyles.Bold); + AgateSerif = Font.Create("AgateSerif", 8, 64, FontStyles.Bold); + AgateMono = Font.Create("AgateMono", 8, 64, FontStyles.Bold); + + Display.DisposeDisplay += Display_DisposeDisplay; + } + + static void Display_DisposeDisplay() + { + AgateSans.Dispose(); + AgateSerif.Dispose(); + AgateMono.Dispose(); + + AgateSans = null; + AgateSerif = null; + AgateMono = null; + + Display.DisposeDisplay -= Display_DisposeDisplay; + } + + /// <summary> + /// Default sans serif font. + /// </summary> + public static Font AgateSans { get; private set; } + /// <summary> + /// Default serif font. + /// </summary> + public static Font AgateSerif { get; private set; } + /// <summary> + /// Default monospace font. + /// </summary> + public static Font AgateMono { get; private set; } + } +} Modified: trunk/AgateLib/Core.cs =================================================================== --- trunk/AgateLib/Core.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/Core.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -318,7 +318,7 @@ /// Initializes Core class. Also causes the Registrar to probe drivers. /// Can be called multiple times without adverse effects. /// </summary> - public static void Initialize(IAgateFactory factory, AssetLocations assets) + public static void Initialize(IAgateFactory factory) { if (sInititalized) return; @@ -329,8 +329,7 @@ FileSystem.File = factory.PlatformFactory.CreateFile(); FileSystem.Path = factory.PlatformFactory.CreatePath(); - FileProvider.Initialize(factory.PlatformFactory.AssetFileProvider, assets); - + Display.Initialize(factory.DisplayFactory.DisplayImpl); Audio.Initialize(factory.AudioFactory.CreateAudioImpl()); JoystickInput.Initialize(factory.InputFactory.CreateJoystickInputImpl()); @@ -338,6 +337,11 @@ sInititalized = true; } + public static void InitAssetLocations(AssetLocations assets) + { + FileProvider.Initialize(mFactory.PlatformFactory.AssetFileProvider, assets); + } + public static IAgateFactory Factory { get { return mFactory; } @@ -413,6 +417,9 @@ { var appmodel = AgateAppModel.Instance; + if (appmodel == null) + return; + appmodel.KeepAlive(); while (IsActive == false && AutoPause) Modified: trunk/AgateLib/DisplayLib/Display.cs =================================================================== --- trunk/AgateLib/DisplayLib/Display.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/DisplayLib/Display.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -26,6 +26,7 @@ using AgateLib.Geometry; using AgateLib.Utility; using AgateLib.Diagnostics; +using AgateLib.ApplicationModels; namespace AgateLib.DisplayLib { @@ -283,7 +284,7 @@ if (RenderTarget == null) throw new AgateException("A render target must be set before beginning to render."); if (CurrentWindow.IsClosed) - throw new AgateException("The current window has been closed, and a new render target has not been set. A render target must be set to continue rendering."); + throw new ExitGameException("The current window has been closed, and a new render target has not been set. A render target must be set to continue rendering."); sImpl.BeginFrame(); Modified: trunk/AgateLib/DisplayLib/Font.cs =================================================================== --- trunk/AgateLib/DisplayLib/Font.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/DisplayLib/Font.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -8,7 +8,7 @@ namespace AgateLib.DisplayLib { - public class Font + public class Font : IDisposable { Dictionary<FontSettings, FontSurface> mFontSurfaces = new Dictionary<FontSettings, FontSurface>(); FontSettings mSettings; @@ -19,6 +19,12 @@ Name = name; } + public void Dispose() + { + foreach (var fs in mFontSurfaces.Values) + fs.Dispose(); + } + public void AddFont(FontSurface fontSurface, int size, FontStyles style) { AddFont(new FontSettings(size, style), fontSurface); @@ -165,6 +171,38 @@ { return FontSurface.MeasureString(text); } + + [Obsolete("This needs to be thought through more carefully.")] + internal static Font Create(string name, int minSize, int maxSize, FontStyles styles) + { + Font retval = new Font(name); + + int inc = FontSizeStep(minSize); + bool bold = (styles & FontStyles.Bold) == FontStyles.Bold; + bool italic = (styles & FontStyles.Italic) == FontStyles.Italic; + + for (int size = minSize; size <= maxSize; size += inc) + { + retval.AddFont(new FontSurface(name, size, FontStyles.None), size, FontStyles.None); + + if (bold) + retval.AddFont(new FontSurface(name, size, FontStyles.Bold), size, FontStyles.Bold); + if (italic) + retval.AddFont(new FontSurface(name, size, FontStyles.Italic), size, FontStyles.Italic); + if (bold && italic) + retval.AddFont(new FontSurface(name, size, FontStyles.Bold | FontStyles.Italic), size, FontStyles.Bold | FontStyles.Italic); + } + + return retval; + } + + private static int FontSizeStep(int minSize) + { + if (minSize < 18) + return 2; + else + return 4; + } } } Modified: trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -236,5 +236,7 @@ } #endregion + + public abstract bool IsLoaded { get; } }; } Modified: trunk/AgateLib/DisplayLib/Surface.cs =================================================================== --- trunk/AgateLib/DisplayLib/Surface.cs 2014-08-28 04:36:57 UTC (rev 1485) +++ trunk/AgateLib/DisplayLib/Surface.cs 2014-08-30 23:55:55 UTC (rev 1486) @@ -135,20 +135,21 @@ mImpl = Core.Factory.DisplayFactory.CreateSurface(size); - Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose); - Display.PackAllSurfacesEvent += new EventHandler(Display_PackAllSurfacesEvent); + AttachEvents(); } + /// <summary> /// Constructs a surface object from the specified PixelBuffer object. /// </summary> /// <param name="pixels">The PixelBuffer containing the pixel data to use.</param> public Surface(PixelBuffer pixels) - : this(pixels.Size) { if (Display.Impl == null) throw new AgateException("AgateLib's display system has not been initialized."); - WritePixels(pixels); + mImpl = Core.Factory.DisplayFactory.CreateSurface(pixels); + + AttachEvents(); } /// <summary> /// Creates a surface object and to be ready to attach to an implemented object. @@ -162,8 +163,7 @@ if (fromImpl == null) throw new ArgumentNullException("The argument fromImpl must not be null."); - Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose); - Display.PackAllSurfacesEvent += new EventHandler(Display_PackAllSurfacesEvent); + AttachEvents(); mImpl = fromImpl; } @@ -175,9 +175,9 @@ {... [truncated message content] |
From: <ka...@us...> - 2014-08-28 04:37:03
|
Revision: 1485 http://sourceforge.net/p/agate/code/1485 Author: kanato Date: 2014-08-28 04:36:57 +0000 (Thu, 28 Aug 2014) Log Message: ----------- Readd test project. Added Paths: ----------- trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj Removed Paths: ------------- trunk/AgateLib.Tests/Tests.WinForms/Tests.csproj Copied: trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj (from rev 1484, trunk/AgateLib.Tests/Tests.WinForms/Tests.csproj) =================================================================== --- trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj (rev 0) +++ trunk/AgateLib.Tests/Tests.WinForms/AgateLib.Tests.WinForms.csproj 2014-08-28 04:36:57 UTC (rev 1485) @@ -0,0 +1,628 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>Tests</AssemblyName> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> + <OutputType>WinExe</OutputType> + <AppDesignerFolder> + </AppDesignerFolder> + <RootNamespace>Tests</RootNamespace> + <StartupObject>Tests.TestLauncher</StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <OldToolsVersion>3.5</OldToolsVersion> + <UpgradeBackupLocation /> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <BaseAddress>285212672</BaseAddress> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE;</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <Optimize>false</Optimize> + <OutputPath>..\Binaries\Debug\</OutputPath> + <RegisterForComInterop>False</RegisterForComInterop> + <RemoveIntegerChecks>False</RemoveIntegerChecks> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <BaseAddress>285212672</BaseAddress> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE;</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <FileAlignment>4096</FileAlignment> + <Optimize>true</Optimize> + <OutputPath>..\Binaries\Release\</OutputPath> + <RegisterForComInterop>False</RegisterForComInterop> + <RemoveIntegerChecks>False</RemoveIntegerChecks> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Binaries\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;</DefineConstants> + <BaseAddress>285212672</BaseAddress> + <FileAlignment>4096</FileAlignment> + <PlatformTarget>x64</PlatformTarget> + <DebugType>full</DebugType> + <WarningLevel>4</WarningLevel> + <Optimize>false</Optimize> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE;</DefineConstants> + <BaseAddress>285212672</BaseAddress> + <Optimize>true</Optimize> + <FileAlignment>4096</FileAlignment> + <PlatformTarget>x64</PlatformTarget> + <DebugType>none</DebugType> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Binaries\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;</DefineConstants> + <BaseAddress>285212672</BaseAddress> + <FileAlignment>4096</FileAlignment> + <PlatformTarget>x86</PlatformTarget> + <DebugType>full</DebugType> + <WarningLevel>4</WarningLevel> + <Optimize>false</Optimize> + <UseVSHostingProcess>false</UseVSHostingProcess> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <OutputPath>..\Binaries\Release\</OutputPath> + <DefineConstants>TRACE;</DefineConstants> + <BaseAddress>285212672</BaseAddress> + <Optimize>true</Optimize> + <FileAlignment>4096</FileAlignment> + <PlatformTarget>x86</PlatformTarget> + <DebugType>none</DebugType> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <ItemGroup> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Core"> + <Name>System.Core</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Drawing"> + <Name>System.Drawing</Name> + </Reference> + <Reference Include="System.Windows.Forms"> + <Name>System.Windows.Forms</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.Xml</Name> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="AgateTestAttribute.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioTests\SoundbufferStopTester.cs" /> + <Compile Include="AudioTests\StreamAudio.cs" /> + <Compile Include="CoreTests\PersistantSettingsTest.cs" /> + <Compile Include="CoreTests\PlatformDetection\PlatformDetection.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="CoreTests\PlatformDetection\PlatformDetection.Designer.cs"> + <DependentUpon>PlatformDetection.cs</DependentUpon> + </Compile> + <Compile Include="CoreTests\PlatformDetection\PlatformDetector.cs" /> + <Compile Include="DisplayTests\Capabilities\Capabilities.cs" /> + <Compile Include="DisplayTests\Capabilities\frmCapabilities.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\Capabilities\frmCapabilities.Designer.cs"> + <DependentUpon>frmCapabilities.cs</DependentUpon> + </Compile> + <Compile Include="DisplayTests\ColorTest.cs" /> + <Compile Include="DisplayTests\LargeImage.cs" /> + <Compile Include="DisplayTests\DisplayWindowEvents.cs" /> + <Compile Include="DisplayTests\MultipleFramebufferTest.cs" /> + <Compile Include="DisplayTests\PixelBufferMask.cs" /> + <Compile Include="DisplayTests\ClipRect.cs" /> + <Compile Include="DisplayTests\Prerendered.cs" /> + <Compile Include="DisplayTests\RenderTargetContinuous.cs" /> + <Compile Include="Fonts\Builtin.cs" /> + <Compile Include="Fonts\FontAlignment.cs" /> + <Compile Include="Fonts\Kerning.cs" /> + <Compile Include="frmLauncher.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmLauncher.Designer.cs"> + <DependentUpon>frmLauncher.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="IAgateTest.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="TestLauncher.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioTests\AudioPlayer\AudioPlayer.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="AudioTests\AudioPlayer\frmAudioPlayer.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="AudioTests\AudioPlayer\frmAudioPlayer.Designer.cs"> + <DependentUpon>frmAudioPlayer.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="CoreTests\App.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="CoreTests\RefCounters.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="CoreTests\Resources.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="CoreTests\ErrorReport\ErrorReport.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="CoreTests\ErrorReport\frmErrorReport.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="CoreTests\ErrorReport\frmErrorReport.Designer.cs"> + <DependentUpon>frmErrorReport.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="CoreTests\Timers\frmTimers.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="CoreTests\Timers\frmTimers.Designer.cs"> + <DependentUpon>frmTimers.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="CoreTests\Timers\Timers.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\BasicSprite.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\FullScreen.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\Interpolation.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Shaders\CoordinateSystem.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\RotatingSpriteTester.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\ScreenCapture.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\Tiling.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\BasicDrawing\BasicDrawing.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\BasicDrawing\DrawingTester.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\BasicDrawing\DrawingTester.Designer.cs"> + <DependentUpon>DrawingTester.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\MultipleWindows\MultipleRenderTargetExample.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\MultipleWindows\MultipleRenderTargetExample.Designer.cs"> + <DependentUpon>MultipleRenderTargetExample.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\MultipleWindows\MultipleWindowTest.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\ParticleTests\ParticleTests.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\PixelBufferTest\PixelBufferForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\PixelBufferTest\PixelBufferForm.Designer.cs"> + <DependentUpon>PixelBufferForm.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\PixelBufferTest\PixelBufferTest.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\RenderStates\frmRenderStateTest.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\RenderStates\frmRenderStateTest.Designer.cs"> + <DependentUpon>frmRenderStateTest.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\RenderStates\RenderStates.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\SpriteTester\frmChooseSprite.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\SpriteTester\frmChooseSprite.Designer.cs"> + <DependentUpon>frmChooseSprite.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\SpriteTester\frmSpriteTester.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\SpriteTester\frmSpriteTester.Designer.cs"> + <DependentUpon>frmSpriteTester.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\SpriteTester\SpriteTester.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\SurfaceTester\frmSurfaceTester.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\SurfaceTester\frmSurfaceTester.Designer.cs"> + <DependentUpon>frmSurfaceTester.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\SurfaceTester\SurfaceTester.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\TestPacker\frmTestPacker.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\TestPacker\frmTestPacker.Designer.cs"> + <DependentUpon>frmTestPacker.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\TestPacker\TestPacker.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\TileTester\frmTileTester.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayTests\TileTester\frmTileTester.Designer.cs"> + <DependentUpon>frmTileTester.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="DisplayTests\TileTester\TileTester.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Fonts\BitmapFonts.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Fonts\FontLineTester.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Fonts\Fonts.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Fonts\TextLayout.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputTests\Input\frmInputTester.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="InputTests\Input\frmInputTester.Designer.cs"> + <DependentUpon>frmInputTester.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputTests\Input\InputTester.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="InputTests\InputState\InputStateTester.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Shaders\Hlsl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Shaders\Lighting3DTest.cs" /> + <Compile Include="Shaders\LightingTest\LightingTest.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Shaders\LightingTest\LightingTestForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Shaders\LightingTest\LightingTestForm.Designer.cs"> + <DependentUpon>LightingTestForm.cs</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="UserInterfaceTests\Form1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="UserInterfaceTests\Form1.Designer.cs"> + <DependentUpon>Form1.cs</DependentUpon> + </Compile> + <Compile Include="UserInterfaceTests\GuiStuff.cs" /> + <Compile Include="UserInterfaceTests\GuiTest.cs" /> + <Compile Include="WinFormsTests\Converters.cs"> + <SubType>Code</SubType> + </Compile> + <EmbeddedResource Include="CoreTests\PlatformDetection\PlatformDetection.resx"> + <DependentUpon>PlatformDetection.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\Capabilities\frmCapabilities.resx"> + <DependentUpon>frmCapabilities.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmLauncher.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmLauncher.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="AudioTests\AudioPlayer\frmAudioPlayer.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmAudioPlayer.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="CoreTests\ErrorReport\frmErrorReport.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmErrorReport.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="CoreTests\Timers\frmTimers.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmTimers.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\BasicDrawing\DrawingTester.resx"> + <SubType>Designer</SubType> + <DependentUpon>DrawingTester.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\MultipleWindows\MultipleRenderTargetExample.resx"> + <SubType>Designer</SubType> + <DependentUpon>MultipleRenderTargetExample.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\PixelBufferTest\PixelBufferForm.resx"> + <SubType>Designer</SubType> + <DependentUpon>PixelBufferForm.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\RenderStates\frmRenderStateTest.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmRenderStateTest.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\SpriteTester\frmChooseSprite.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmChooseSprite.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\SpriteTester\frmSpriteTester.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmSpriteTester.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\SurfaceTester\frmSurfaceTester.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmSurfaceTester.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\TestPacker\frmTestPacker.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmTestPacker.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DisplayTests\TileTester\frmTileTester.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmTileTester.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="InputTests\Input\frmInputTester.resx"> + <SubType>Designer</SubType> + <DependentUpon>frmInputTester.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="Shaders\LightingTest\LightingTestForm.resx"> + <SubType>Designer</SubType> + <DependentUpon>LightingTestForm.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="UserInterfaceTests\Form1.resx"> + <DependentUpon>Form1.cs</DependentUpon> + </EmbeddedResource> + <None Include="app.config" /> + <None Include="Data\9ball.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\attacke.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\ball.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\bg-bricks-heightmap.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\bg-bricks.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\boxsprite.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\gui.zip"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\dogs.tar.gz"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\dogs.zip"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\jellybean.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\lotafont.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\smoke.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\smoke2.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\spike.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\TestResourceFile.xml"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + <SubType>Designer</SubType> + </None> + <None Include="Data\wallpaper.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\fonts\sample_font.png"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\shaders\glsl\BumpMap_fragment.txt"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\shaders\glsl\BumpMap_vertex.txt"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\shaders\glsl\PerPixelLighting_fragment.txt"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\shaders\glsl\PerPixelLighting_vertex.txt"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\shaders\hlsl\Lighting.fx"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\shaders\hlsl\PerPixelLighting.fx"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Data\CssTest.css"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="packages.config" /> + <None Include="Data\settings_list.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + </ItemGroup> + <ItemGroup> + <None Include="Data\Style.css"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Data\largeimage.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <Content Include="Data\fonts\MedievalSharp14.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\fonts\MedievalSharp18.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\fonts\MedievalSharpBold14.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\fonts\MedievalSharpBold18.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\fonts\MedievalSharpBold22.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Images\ui_back_1.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Images\ui_border_1.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Images\ui_border_2.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Images\ui_widget.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\mask_bg-bricks.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\mask_circle.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Resources\fonts.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Resources\Fonts\MedievalSharp14.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Resources\Fonts\MedievalSharp18.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Resources\Fonts\MedievalSharpBold14.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Resources\Fonts\MedievalSharpBold18.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\Resources\Fonts\MedievalSharpBold22.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\snda.wav"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Data\sndb.wav"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> + <ItemGroup> + <WCFMetadata Include="Service References\" /> + </ItemGroup> + <ItemGroup> + <Folder Include="CoreTests\Performance\" /> + <Folder Include="ResourceTests\" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\AgateLib.AgateSDL\AgateLib.AgateSDL.csproj"> + <Project>{935d67a0-931e-46de-9f6a-2d6dbc99aff3}</Project> + <Name>AgateLib.AgateSDL</Name> + </ProjectReference> + <ProjectReference Include="..\..\AgateLib.OpenGL\AgateLib.OpenGL.csproj"> + <Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project> + <Name>AgateLib.OpenGL</Name> + </ProjectReference> + <ProjectReference Include="..\..\AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj"> + <Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project> + <Name>AgateLib.Platform.WinForms</Name> + </ProjectReference> + <ProjectReference Include="..\..\AgateLib\AgateLib.csproj"> + <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> + <Name>AgateLib</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib.Tests.Portable\AgateLib.Tests.Portable.csproj"> + <Project>{3aaa6832-55d7-47a9-af95-9393792ecb2c}</Project> + <Name>AgateLib.Tests.Portable</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Deleted: trunk/AgateLib.Tests/Tests.WinForms/Tests.csproj =================================================================== --- trunk/AgateLib.Tests/Tests.WinForms/Tests.csproj 2014-08-28 04:30:28 UTC (rev 1484) +++ trunk/AgateLib.Tests/Tests.WinForms/Tests.csproj 2014-08-28 04:36:57 UTC (rev 1485) @@ -1,616 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0"> - <PropertyGroup> - <ProjectType>Local</ProjectType> - <ProductVersion>9.0.21022</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}</ProjectGuid> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <AssemblyKeyContainerName> - </AssemblyKeyContainerName> - <AssemblyName>Tests</AssemblyName> - <DefaultClientScript>JScript</DefaultClientScript> - <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> - <DefaultTargetSchema>IE50</DefaultTargetSchema> - <DelaySign>false</DelaySign> - <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> - <OutputType>WinExe</OutputType> - <AppDesignerFolder> - </AppDesignerFolder> - <RootNamespace>Tests</RootNamespace> - <StartupObject>Tests.TestLauncher</StartupObject> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>3.5</OldToolsVersion> - <UpgradeBackupLocation /> - <TargetFrameworkProfile /> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <BaseAddress>285212672</BaseAddress> - <ConfigurationOverrideFile> - </ConfigurationOverrideFile> - <DefineConstants>DEBUG;TRACE;</DefineConstants> - <DocumentationFile> - </DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <FileAlignment>4096</FileAlignment> - <Optimize>false</Optimize> - <OutputPath>..\Binaries\Debug\</OutputPath> - <RegisterForComInterop>False</RegisterForComInterop> - <RemoveIntegerChecks>False</RemoveIntegerChecks> - <WarningLevel>4</WarningLevel> - <DebugType>full</DebugType> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <BaseAddress>285212672</BaseAddress> - <ConfigurationOverrideFile> - </ConfigurationOverrideFile> - <DefineConstants>TRACE;</DefineConstants> - <DocumentationFile> - </DocumentationFile> - <FileAlignment>4096</FileAlignment> - <Optimize>true</Optimize> - <OutputPath>..\Binaries\Release\</OutputPath> - <RegisterForComInterop>False</RegisterForComInterop> - <RemoveIntegerChecks>False</RemoveIntegerChecks> - <WarningLevel>4</WarningLevel> - <DebugType>none</DebugType> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> - <DebugSymbols>true</DebugSymbols> - <OutputPath>..\Binaries\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;</DefineConstants> - <BaseAddress>285212672</BaseAddress> - <FileAlignment>4096</FileAlignment> - <PlatformTarget>x64</PlatformTarget> - <DebugType>full</DebugType> - <WarningLevel>4</WarningLevel> - <Optimize>false</Optimize> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> - <OutputPath>bin\x64\Release\</OutputPath> - <DefineConstants>TRACE;</DefineConstants> - <BaseAddress>285212672</BaseAddress> - <Optimize>true</Optimize> - <FileAlignment>4096</FileAlignment> - <PlatformTarget>x64</PlatformTarget> - <DebugType>none</DebugType> - <WarningLevel>4</WarningLevel> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> - <DebugSymbols>true</DebugSymbols> - <OutputPath>..\Binaries\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;</DefineConstants> - <BaseAddress>285212672</BaseAddress> - <FileAlignment>4096</FileAlignment> - <PlatformTarget>x86</PlatformTarget> - <DebugType>full</DebugType> - <WarningLevel>4</WarningLevel> - <Optimize>false</Optimize> - <UseVSHostingProcess>false</UseVSHostingProcess> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> - <OutputPath>..\Binaries\Release\</OutputPath> - <DefineConstants>TRACE;</DefineConstants> - <BaseAddress>285212672</BaseAddress> - <Optimize>true</Optimize> - <FileAlignment>4096</FileAlignment> - <PlatformTarget>x86</PlatformTarget> - <DebugType>none</DebugType> - <WarningLevel>4</WarningLevel> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <ItemGroup> - <Reference Include="System"> - <Name>System</Name> - </Reference> - <Reference Include="System.Core"> - <Name>System.Core</Name> - </Reference> - <Reference Include="System.Data"> - <Name>System.Data</Name> - </Reference> - <Reference Include="System.Drawing"> - <Name>System.Drawing</Name> - </Reference> - <Reference Include="System.Windows.Forms"> - <Name>System.Windows.Forms</Name> - </Reference> - <Reference Include="System.Xml"> - <Name>System.Xml</Name> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="AgateTestAttribute.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="AudioTests\SoundbufferStopTester.cs" /> - <Compile Include="AudioTests\StreamAudio.cs" /> - <Compile Include="CoreTests\PersistantSettingsTest.cs" /> - <Compile Include="CoreTests\PlatformDetection\PlatformDetection.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="CoreTests\PlatformDetection\PlatformDetection.Designer.cs"> - <DependentUpon>PlatformDetection.cs</DependentUpon> - </Compile> - <Compile Include="CoreTests\PlatformDetection\PlatformDetector.cs" /> - <Compile Include="DisplayTests\Capabilities\Capabilities.cs" /> - <Compile Include="DisplayTests\Capabilities\frmCapabilities.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\Capabilities\frmCapabilities.Designer.cs"> - <DependentUpon>frmCapabilities.cs</DependentUpon> - </Compile> - <Compile Include="DisplayTests\ColorTest.cs" /> - <Compile Include="DisplayTests\LargeImage.cs" /> - <Compile Include="DisplayTests\DisplayWindowEvents.cs" /> - <Compile Include="DisplayTests\MultipleFramebufferTest.cs" /> - <Compile Include="DisplayTests\PixelBufferMask.cs" /> - <Compile Include="DisplayTests\ClipRect.cs" /> - <Compile Include="DisplayTests\Prerendered.cs" /> - <Compile Include="DisplayTests\RenderTargetContinuous.cs" /> - <Compile Include="Fonts\Builtin.cs" /> - <Compile Include="Fonts\FontAlignment.cs" /> - <Compile Include="Fonts\Kerning.cs" /> - <Compile Include="frmLauncher.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="frmLauncher.Designer.cs"> - <DependentUpon>frmLauncher.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="IAgateTest.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="TestLauncher.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="AudioTests\AudioPlayer\AudioPlayer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="AudioTests\AudioPlayer\frmAudioPlayer.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="AudioTests\AudioPlayer\frmAudioPlayer.Designer.cs"> - <DependentUpon>frmAudioPlayer.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="CoreTests\App.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="CoreTests\RefCounters.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="CoreTests\Resources.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="CoreTests\ErrorReport\ErrorReport.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="CoreTests\ErrorReport\frmErrorReport.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="CoreTests\ErrorReport\frmErrorReport.Designer.cs"> - <DependentUpon>frmErrorReport.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="CoreTests\Timers\frmTimers.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="CoreTests\Timers\frmTimers.Designer.cs"> - <DependentUpon>frmTimers.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="CoreTests\Timers\Timers.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\BasicSprite.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\FullScreen.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\Interpolation.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Shaders\CoordinateSystem.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\RotatingSpriteTester.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\ScreenCapture.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\Tiling.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\BasicDrawing\BasicDrawing.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\BasicDrawing\DrawingTester.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\BasicDrawing\DrawingTester.Designer.cs"> - <DependentUpon>DrawingTester.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\MultipleWindows\MultipleRenderTargetExample.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\MultipleWindows\MultipleRenderTargetExample.Designer.cs"> - <DependentUpon>MultipleRenderTargetExample.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\MultipleWindows\MultipleWindowTest.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\ParticleTests\ParticleTests.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\PixelBufferTest\PixelBufferForm.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\PixelBufferTest\PixelBufferForm.Designer.cs"> - <DependentUpon>PixelBufferForm.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\PixelBufferTest\PixelBufferTest.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\RenderStates\frmRenderStateTest.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\RenderStates\frmRenderStateTest.Designer.cs"> - <DependentUpon>frmRenderStateTest.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\RenderStates\RenderStates.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\SpriteTester\frmChooseSprite.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\SpriteTester\frmChooseSprite.Designer.cs"> - <DependentUpon>frmChooseSprite.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\SpriteTester\frmSpriteTester.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\SpriteTester\frmSpriteTester.Designer.cs"> - <DependentUpon>frmSpriteTester.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\SpriteTester\SpriteTester.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\SurfaceTester\frmSurfaceTester.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\SurfaceTester\frmSurfaceTester.Designer.cs"> - <DependentUpon>frmSurfaceTester.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\SurfaceTester\SurfaceTester.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\TestPacker\frmTestPacker.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\TestPacker\frmTestPacker.Designer.cs"> - <DependentUpon>frmTestPacker.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\TestPacker\TestPacker.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\TileTester\frmTileTester.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayTests\TileTester\frmTileTester.Designer.cs"> - <DependentUpon>frmTileTester.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="DisplayTests\TileTester\TileTester.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Fonts\BitmapFonts.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Fonts\FontLineTester.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Fonts\Fonts.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Fonts\TextLayout.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="InputTests\Input\frmInputTester.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="InputTests\Input\frmInputTester.Designer.cs"> - <DependentUpon>frmInputTester.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="InputTests\Input\InputTester.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="InputTests\InputState\InputStateTester.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Properties\AssemblyInfo.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Shaders\Hlsl.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Shaders\Lighting3DTest.cs" /> - <Compile Include="Shaders\LightingTest\LightingTest.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Shaders\LightingTest\LightingTestForm.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Shaders\LightingTest\LightingTestForm.Designer.cs"> - <DependentUpon>LightingTestForm.cs</DependentUpon> - <SubType>Code</SubType> - </Compile> - <Compile Include="UserInterfaceTests\Form1.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="UserInterfaceTests\Form1.Designer.cs"> - <DependentUpon>Form1.cs</DependentUpon> - </Compile> - <Compile Include="UserInterfaceTests\GuiStuff.cs" /> - <Compile Include="UserInterfaceTests\GuiTest.cs" /> - <Compile Include="WinFormsTests\Converters.cs"> - <SubType>Code</SubType> - </Compile> - <EmbeddedResource Include="CoreTests\PlatformDetection\PlatformDetection.resx"> - <DependentUpon>PlatformDetection.cs</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\Capabilities\frmCapabilities.resx"> - <DependentUpon>frmCapabilities.cs</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> - <EmbeddedResource Include="frmLauncher.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmLauncher.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="AudioTests\AudioPlayer\frmAudioPlayer.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmAudioPlayer.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="CoreTests\ErrorReport\frmErrorReport.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmErrorReport.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="CoreTests\Timers\frmTimers.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmTimers.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\BasicDrawing\DrawingTester.resx"> - <SubType>Designer</SubType> - <DependentUpon>DrawingTester.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\MultipleWindows\MultipleRenderTargetExample.resx"> - <SubType>Designer</SubType> - <DependentUpon>MultipleRenderTargetExample.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\PixelBufferTest\PixelBufferForm.resx"> - <SubType>Designer</SubType> - <DependentUpon>PixelBufferForm.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\RenderStates\frmRenderStateTest.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmRenderStateTest.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\SpriteTester\frmChooseSprite.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmChooseSprite.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\SpriteTester\frmSpriteTester.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmSpriteTester.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\SurfaceTester\frmSurfaceTester.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmSurfaceTester.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\TestPacker\frmTestPacker.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmTestPacker.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DisplayTests\TileTester\frmTileTester.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmTileTester.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="InputTests\Input\frmInputTester.resx"> - <SubType>Designer</SubType> - <DependentUpon>frmInputTester.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="Shaders\LightingTest\LightingTestForm.resx"> - <SubType>Designer</SubType> - <DependentUpon>LightingTestForm.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="UserInterfaceTests\Form1.resx"> - <DependentUpon>Form1.cs</DependentUpon> - </EmbeddedResource> - <None Include="app.config" /> - <None Include="Data\9ball.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\attacke.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\ball.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\bg-bricks-heightmap.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\bg-bricks.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\boxsprite.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\gui.zip"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\dogs.tar.gz"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\dogs.zip"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\jellybean.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\lotafont.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\smoke.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\smoke2.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\spike.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\TestResourceFile.xml"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - <SubType>Designer</SubType> - </None> - <None Include="Data\wallpaper.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\fonts\sample_font.png"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\shaders\glsl\BumpMap_fragment.txt"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\shaders\glsl\BumpMap_vertex.txt"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\shaders\glsl\PerPixelLighting_fragment.txt"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\shaders\glsl\PerPixelLighting_vertex.txt"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\shaders\hlsl\Lighting.fx"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\shaders\hlsl\PerPixelLighting.fx"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="Data\CssTest.css"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="packages.config" /> - <None Include="Data\settings_list.txt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - </ItemGroup> - <ItemGroup> - <None Include="Data\Style.css"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Data\largeimage.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <Content Include="Data\fonts\MedievalSharp14.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\fonts\MedievalSharp18.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\fonts\MedievalSharpBold14.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\fonts\MedievalSharpBold18.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\fonts\MedievalSharpBold22.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Images\ui_back_1.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Images\ui_border_1.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Images\ui_border_2.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Images\ui_widget.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\mask_bg-bricks.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\mask_circle.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Resources\fonts.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Resources\Fonts\MedievalSharp14.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Resources\Fonts\MedievalSharp18.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Resources\Fonts\MedievalSharpBold14.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Resources\Fonts\MedievalSharpBold18.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\Resources\Fonts\MedievalSharpBold22.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\snda.wav"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Data\sndb.wav"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - </ItemGroup> - <ItemGroup> - <WCFMetadata Include="Service References\" /> - </ItemGroup> - <ItemGroup> - <Folder Include="CoreTests\Performance\" /> - <Folder Include="ResourceTests\" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj"> - <Project>{4b12561e-d37b-48a1-b6db-218e94906c22}</Project> - <Name>AgateLib.Platform.WindowsForms</Name> - </ProjectReference> - <ProjectReference Include="..\AgateLib\AgateLib.csproj"> - <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> - <Name>AgateLib</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <PropertyGroup> - <PreBuildEvent> - </PreBuildEvent> - <PostBuildEvent> - </PostBuildEvent> - </PropertyGroup> -</Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-28 04:30:47
|
Revision: 1484 http://sourceforge.net/p/agate/code/1484 Author: kanato Date: 2014-08-28 04:30:28 +0000 (Thu, 28 Aug 2014) Log Message: ----------- Reorganize source code and rename project files Modified Paths: -------------- trunk/AgateLib-Windows.sln trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo Added Paths: ----------- trunk/AgateLib.OpenGL/ trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj trunk/AgateLib.Platform.WinForms/ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj trunk/AgateLib.Platform.WindowsMetro/ trunk/AgateLib.Platform.WindowsMetro/AgateLib.Platform.WindowsMetro.csproj trunk/AgateLib.Platform.WindowsPhone/ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj trunk/AgateLib.Tests/ trunk/AgateLib.Tests/AgateLib.Tests.Portable/ trunk/AgateLib.Tests/AgateLib.Tests.Portable/AgateLib.Tests.Portable.csproj trunk/AgateLib.Tests/AgateLib.Tests.Portable/Properties/ trunk/AgateLib.Tests/AgateLib.Tests.Portable/Properties/AssemblyInfo.cs trunk/AgateLib.Tests/Tests.WinForms/ trunk/AgateLib.Tests/UnitTests/ trunk/AgateLib.Tests/UnitTests/AgateLib.Tests.UnitTests.csproj trunk/ObsoleteDrivers/ Removed Paths: ------------- trunk/AgateLib.GL/ trunk/AgateLib.OpenGL/AgateLib.GL.csproj trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WindowsForms.csproj trunk/AgateLib.Platform.Windows/ trunk/AgateLib.Platform.WindowsForms/ trunk/AgateLib.Platform.WindowsMetro/AgateLib.Platform.Windows.csproj trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone8.csproj trunk/AgateLib.Platform.WindowsPhone8/ trunk/AgateLib.Tests/UnitTests/UnitTests.csproj trunk/Drivers/ trunk/IntegrationTests/ trunk/Tests/ trunk/Tests.WindowsPhone/ trunk/Tests.WindowsStore/ trunk/UnitTests/ Modified: trunk/AgateLib-Windows.sln =================================================================== --- trunk/AgateLib-Windows.sln 2014-08-28 03:31:22 UTC (rev 1483) +++ trunk/AgateLib-Windows.sln 2014-08-28 04:30:28 UTC (rev 1484) @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30501.0 +VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{6AFA2E43-361A-4AA6-83D9-6DE946C1F0B6}" ProjectSection(SolutionItems) = preProject @@ -9,12 +9,8 @@ TODO.txt = TODO.txt EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib", "AgateLib\AgateLib.csproj", "{9490B719-829E-43A7-A5FE-8001F8A81759}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{F22ADCCC-7991-4F52-B2D0-697D60121BB3}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".build", ".build", "{761301C3-2DC0-4F66-8B66-B16DF998F6C0}" ProjectSection(SolutionItems) = preProject Build.proj = Build.proj @@ -22,151 +18,229 @@ .build\MSBuild.Community.Tasks.targets = .build\MSBuild.Community.Tasks.targets EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests", "IntegrationTests\IntegrationTests.csproj", "{796D3B53-8828-475C-B5FF-5CA09F423C8A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.AgateSDL", "AgateLib.AgateSDL\AgateLib.AgateSDL.csproj", "{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.GL", "AgateLib.GL\AgateLib.GL.csproj", "{94734E5A-0344-43E8-BB30-E32E3F57F611}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.OpenGL", "AgateLib.OpenGL\AgateLib.OpenGL.csproj", "{94734E5A-0344-43E8-BB30-E32E3F57F611}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsForms", "AgateLib.Platform.WindowsForms\AgateLib.Platform.WindowsForms.csproj", "{4B12561E-D37B-48A1-B6DB-218E94906C22}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.Common", "AgateLib.Platform.Common\AgateLib.Platform.Common.csproj", "{FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.AgateSDL", "AgateLib.AgateSDL\AgateLib.AgateSDL.csproj", "{935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsMetro", "AgateLib.Platform.WindowsMetro\AgateLib.Platform.WindowsMetro.csproj", "{C9B8F763-187D-4F2E-BAEE-827B7247C278}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsPhone", "AgateLib.Platform.WindowsPhone\AgateLib.Platform.WindowsPhone.csproj", "{9BEF78DB-B535-47D3-9C14-453D373807EC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WindowsStoreCommon", "AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj", "{C7F9AE34-B781-4490-A9B2-5728F44F3523}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Platform.WinForms", "AgateLib.Platform.WinForms\AgateLib.Platform.WinForms.csproj", "{4B12561E-D37B-48A1-B6DB-218E94906C22}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Tests.Portable", "AgateLib.Tests\AgateLib.Tests.Portable\AgateLib.Tests.Portable.csproj", "{3AAA6832-55D7-47A9-AF95-9393792ECB2C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.Tests.UnitTests", "AgateLib.Tests\UnitTests\AgateLib.Tests.UnitTests.csproj", "{F22ADCCC-7991-4F52-B2D0-697D60121BB3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Public|Any CPU = Public|Any CPU + Public|ARM = Public|ARM Public|x64 = Public|x64 Public|x86 = Public|x86 Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.ActiveCfg = Debug|x64 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.Build.0 = Debug|x64 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.ActiveCfg = Debug|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.Build.0 = Debug|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Any CPU.ActiveCfg = Release|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x64.ActiveCfg = Release|x64 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x64.Build.0 = Release|x64 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x86.ActiveCfg = Debug|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x86.Build.0 = Debug|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.ActiveCfg = Release|x64 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.Build.0 = Release|x64 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.ActiveCfg = Release|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.Build.0 = Release|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|x64 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.Build.0 = Debug|x64 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Any CPU.ActiveCfg = Release|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x64.ActiveCfg = Release|x64 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x64.Build.0 = Release|x64 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.ActiveCfg = Debug|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.Build.0 = Debug|x86 + {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|ARM.ActiveCfg = Debug|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Any CPU.ActiveCfg = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Any CPU.Build.0 = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|ARM.ActiveCfg = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x64.ActiveCfg = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.ActiveCfg = Release|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|x64 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.Build.0 = Release|x64 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86 - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.Build.0 = Release|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x64.ActiveCfg = Debug|x64 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x64.Build.0 = Debug|x64 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.ActiveCfg = Debug|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.Build.0 = Debug|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Any CPU.ActiveCfg = Release|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Any CPU.Build.0 = Release|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x64.ActiveCfg = Release|x64 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x64.Build.0 = Release|x64 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.ActiveCfg = Release|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.Build.0 = Release|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.Build.0 = Release|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x64.ActiveCfg = Release|x64 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x64.Build.0 = Release|x64 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.ActiveCfg = Release|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.Build.0 = Release|x86 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|x64.ActiveCfg = Debug|x64 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|x64.Build.0 = Debug|x64 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|x86.ActiveCfg = Debug|x86 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Debug|x86.Build.0 = Debug|x86 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|Any CPU.ActiveCfg = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|Any CPU.Build.0 = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|x64.ActiveCfg = Release|x64 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|x64.Build.0 = Release|x64 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|x86.ActiveCfg = Release|x86 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Public|x86.Build.0 = Release|x86 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|Any CPU.Build.0 = Release|Any CPU - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|x64.ActiveCfg = Release|x64 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|x64.Build.0 = Release|x64 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|x86.ActiveCfg = Release|x86 - {796D3B53-8828-475C-B5FF-5CA09F423C8A}.Release|x86.Build.0 = Release|x86 + {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|ARM.ActiveCfg = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.ActiveCfg = Debug|x64 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.Build.0 = Debug|x64 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.ActiveCfg = Debug|x86 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.Build.0 = Debug|x86 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Any CPU.ActiveCfg = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Any CPU.Build.0 = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|ARM.ActiveCfg = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x64.ActiveCfg = Release|x64 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x64.Build.0 = Release|x64 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x86.ActiveCfg = Release|x86 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x86.Build.0 = Release|x86 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.Build.0 = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|ARM.ActiveCfg = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.ActiveCfg = Release|x64 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.Build.0 = Release|x64 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.ActiveCfg = Release|x86 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.Build.0 = Release|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|ARM.ActiveCfg = Debug|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x64.ActiveCfg = Debug|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x64.Build.0 = Debug|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.ActiveCfg = Debug|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.Build.0 = Debug|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|Any CPU.ActiveCfg = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|Any CPU.Build.0 = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|ARM.ActiveCfg = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|x64.ActiveCfg = Release|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|x64.Build.0 = Release|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|x86.ActiveCfg = Release|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|x86.Build.0 = Release|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.ActiveCfg = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.Build.0 = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|ARM.ActiveCfg = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.ActiveCfg = Release|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.Build.0 = Release|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.ActiveCfg = Release|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.Build.0 = Release|x86 + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|ARM.ActiveCfg = Debug|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|x64.ActiveCfg = Debug|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|x86.ActiveCfg = Debug|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|Any CPU.ActiveCfg = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|Any CPU.Build.0 = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|ARM.ActiveCfg = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|x64.ActiveCfg = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Public|x86.ActiveCfg = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Any CPU.Build.0 = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|ARM.ActiveCfg = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|x64.ActiveCfg = Release|Any CPU + {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|x86.ActiveCfg = Release|Any CPU + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|ARM.ActiveCfg = Debug|ARM + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|ARM.Build.0 = Debug|ARM + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x64.ActiveCfg = Debug|x64 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x64.Build.0 = Debug|x64 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x86.ActiveCfg = Debug|x86 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x86.Build.0 = Debug|x86 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Public|Any CPU.ActiveCfg = Release|Any CPU + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Public|Any CPU.Build.0 = Release|Any CPU + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Public|ARM.ActiveCfg = Release|ARM + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Public|ARM.Build.0 = Release|ARM + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Public|x64.ActiveCfg = Release|x64 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Public|x64.Build.0 = Release|x64 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Public|x86.ActiveCfg = Release|x86 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Public|x86.Build.0 = Release|x86 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|Any CPU.Build.0 = Release|Any CPU + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|ARM.ActiveCfg = Release|ARM + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|ARM.Build.0 = Release|ARM + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x64.ActiveCfg = Release|x64 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x64.Build.0 = Release|x64 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x86.ActiveCfg = Release|x86 + {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x86.Build.0 = Release|x86 + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|ARM.ActiveCfg = Debug|ARM + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|ARM.Build.0 = Debug|ARM + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x64.ActiveCfg = Debug|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x86.ActiveCfg = Debug|x86 + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x86.Build.0 = Debug|x86 + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Public|Any CPU.ActiveCfg = Release|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Public|Any CPU.Build.0 = Release|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Public|ARM.ActiveCfg = Release|ARM + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Public|ARM.Build.0 = Release|ARM + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Public|x64.ActiveCfg = Release|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Public|x86.ActiveCfg = Release|x86 + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Public|x86.Build.0 = Release|x86 + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|Any CPU.Build.0 = Release|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|ARM.ActiveCfg = Release|ARM + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|ARM.Build.0 = Release|ARM + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x64.ActiveCfg = Release|Any CPU + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x86.ActiveCfg = Release|x86 + {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x86.Build.0 = Release|x86 + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|ARM.ActiveCfg = Debug|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|x64.ActiveCfg = Debug|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|x86.ActiveCfg = Debug|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Public|Any CPU.ActiveCfg = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Public|Any CPU.Build.0 = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Public|ARM.ActiveCfg = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Public|x64.ActiveCfg = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Public|x86.ActiveCfg = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Any CPU.Build.0 = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|ARM.ActiveCfg = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|x64.ActiveCfg = Release|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|x86.ActiveCfg = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|ARM.ActiveCfg = Debug|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x64.ActiveCfg = Debug|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x64.Build.0 = Debug|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.ActiveCfg = Debug|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.Build.0 = Debug|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Any CPU.ActiveCfg = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Any CPU.Build.0 = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|ARM.ActiveCfg = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x64.ActiveCfg = Release|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x64.Build.0 = Release|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x86.ActiveCfg = Release|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x86.Build.0 = Release|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.Build.0 = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|ARM.ActiveCfg = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.ActiveCfg = Release|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.Build.0 = Release|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.ActiveCfg = Release|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.Build.0 = Release|x86 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.ActiveCfg = Debug|x64 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.Build.0 = Debug|x64 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.ActiveCfg = Debug|x86 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.Build.0 = Debug|x86 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Any CPU.ActiveCfg = Release|Any CPU - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Any CPU.Build.0 = Release|Any CPU - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x64.ActiveCfg = Release|x64 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x64.Build.0 = Release|x64 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x86.ActiveCfg = Release|x86 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x86.Build.0 = Release|x86 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.Build.0 = Release|Any CPU - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.ActiveCfg = Release|x64 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.Build.0 = Release|x64 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.ActiveCfg = Release|x86 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.Build.0 = Release|x86 + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Debug|ARM.ActiveCfg = Debug|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Debug|x64.ActiveCfg = Debug|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Debug|x86.ActiveCfg = Debug|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Public|Any CPU.ActiveCfg = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Public|Any CPU.Build.0 = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Public|ARM.ActiveCfg = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Public|x64.ActiveCfg = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Public|x86.ActiveCfg = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Release|Any CPU.Build.0 = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Release|ARM.ActiveCfg = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Release|x64.ActiveCfg = Release|Any CPU + {3AAA6832-55D7-47A9-AF95-9393792ECB2C}.Release|x86.ActiveCfg = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x64.ActiveCfg = Debug|x64 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x64.Build.0 = Debug|x64 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.ActiveCfg = Debug|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.Build.0 = Debug|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Any CPU.ActiveCfg = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Any CPU.Build.0 = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|ARM.ActiveCfg = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x64.ActiveCfg = Release|x64 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x64.Build.0 = Release|x64 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.ActiveCfg = Release|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.Build.0 = Release|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.Build.0 = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|ARM.ActiveCfg = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x64.ActiveCfg = Release|x64 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x64.Build.0 = Release|x64 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.ActiveCfg = Release|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Deleted: trunk/AgateLib.OpenGL/AgateLib.GL.csproj =================================================================== --- trunk/AgateLib.GL/AgateLib.GL.csproj 2014-08-28 02:34:56 UTC (rev 1482) +++ trunk/AgateLib.OpenGL/AgateLib.GL.csproj 2014-08-28 04:30:28 UTC (rev 1484) @@ -1,160 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{94734E5A-0344-43E8-BB30-E32E3F57F611}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>AgateLib.GL</RootNamespace> - <AssemblyName>AgateLib.GL</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <TargetFrameworkProfile /> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\Binaries\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\Binaries\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <DebugType>full</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <UseVSHostingProcess>false</UseVSHostingProcess> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> - <OutputPath>bin\x86\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <Optimize>true</Optimize> - <DebugType>pdbonly</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x64\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <DebugType>full</DebugType> - <PlatformTarget>x64</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> - <OutputPath>bin\x64\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <Optimize>true</Optimize> - <DebugType>pdbonly</DebugType> - <PlatformTarget>x64</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Core" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="AL_Audio.cs" /> - <Compile Include="ContextFB.cs" /> - <Compile Include="GeoHelper.cs" /> - <Compile Include="GL3\DrawBuffer.cs" /> - <Compile Include="GL3\FrameBuffer.cs" /> - <Compile Include="GL3\GLPrimitiveRenderer.cs" /> - <Compile Include="GL3\GLVertexBuffer.cs" /> - <Compile Include="GL3\Shaders\GL3_Basic2DShader.cs" /> - <Compile Include="GL3\Shaders\GlslFragmentProgram.cs" /> - <Compile Include="GL3\Shaders\GlslShader.cs" /> - <Compile Include="GL3\Shaders\GlslShaderCompiler.cs" /> - <Compile Include="GL3\Shaders\GlslVertexProgram.cs" /> - <Compile Include="GL3\Shaders\IGL3Shader.cs" /> - <Compile Include="GL3\Shaders\ShaderFactory3.cs" /> - <Compile Include="GL3\Shaders\ShaderSources.Designer.cs"> - <DependentUpon>ShaderSources.resx</DependentUpon> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - </Compile> - <Compile Include="GLDrawBuffer.cs" /> - <Compile Include="GL_FrameBuffer.cs" /> - <Compile Include="GL_IndexBuffer.cs" /> - <Compile Include="IGL_Display.cs" /> - <Compile Include="IGL_Surface.cs" /> - <Compile Include="Legacy\FixedFunction\FixedFunctionShaderFactory.cs" /> - <Compile Include="Legacy\FixedFunction\OTK_FF_Basic2DShader.cs" /> - <Compile Include="Legacy\FixedFunction\OTK_FF_Lighting2D.cs" /> - <Compile Include="Legacy\FixedFunction\OTK_FF_Lighting3D.cs" /> - <Compile Include="Legacy\FrameBufferExt.cs" /> - <Compile Include="Legacy\FrameBufferReadPixels.cs" /> - <Compile Include="Legacy\LegacyDrawBuffer.cs" /> - <Compile Include="Legacy\LegacyPrimitiveRenderer.cs" /> - <Compile Include="Legacy\LegacyVertexBuffer.cs" /> - <Compile Include="PrimitiveRenderer.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="ShaderFactory.cs" /> - <Compile Include="TextureCoordinates.cs" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="GL3\Shaders\ShaderSources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>ShaderSources.Designer.cs</LastGenOutput> - <SubType>Designer</SubType> - </EmbeddedResource> - <EmbeddedResource Include="ShaderSources.resx"> - <SubType>Designer</SubType> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - <None Include="Resources\Basic2D_pixel.txt" /> - </ItemGroup> - <ItemGroup> - <None Include="Resources\Basic2D_vert.txt" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\AgateLib\AgateLib.csproj"> - <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> - <Name>AgateLib</Name> - </ProjectReference> - </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> \ No newline at end of file Copied: trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj (from rev 1482, trunk/AgateLib.GL/AgateLib.GL.csproj) =================================================================== --- trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj (rev 0) +++ trunk/AgateLib.OpenGL/AgateLib.OpenGL.csproj 2014-08-28 04:30:28 UTC (rev 1484) @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{94734E5A-0344-43E8-BB30-E32E3F57F611}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AgateLib.GL</RootNamespace> + <AssemblyName>AgateLib.GL</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\Binaries\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\Binaries\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> + <OutputPath>bin\x86\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="AL_Audio.cs" /> + <Compile Include="ContextFB.cs" /> + <Compile Include="GeoHelper.cs" /> + <Compile Include="GL3\DrawBuffer.cs" /> + <Compile Include="GL3\FrameBuffer.cs" /> + <Compile Include="GL3\GLPrimitiveRenderer.cs" /> + <Compile Include="GL3\GLVertexBuffer.cs" /> + <Compile Include="GL3\Shaders\GL3_Basic2DShader.cs" /> + <Compile Include="GL3\Shaders\GlslFragmentProgram.cs" /> + <Compile Include="GL3\Shaders\GlslShader.cs" /> + <Compile Include="GL3\Shaders\GlslShaderCompiler.cs" /> + <Compile Include="GL3\Shaders\GlslVertexProgram.cs" /> + <Compile Include="GL3\Shaders\IGL3Shader.cs" /> + <Compile Include="GL3\Shaders\ShaderFactory3.cs" /> + <Compile Include="GL3\Shaders\ShaderSources.Designer.cs"> + <DependentUpon>ShaderSources.resx</DependentUpon> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + </Compile> + <Compile Include="GLDrawBuffer.cs" /> + <Compile Include="GL_FrameBuffer.cs" /> + <Compile Include="GL_IndexBuffer.cs" /> + <Compile Include="IGL_Display.cs" /> + <Compile Include="IGL_Surface.cs" /> + <Compile Include="Legacy\FixedFunction\FixedFunctionShaderFactory.cs" /> + <Compile Include="Legacy\FixedFunction\OTK_FF_Basic2DShader.cs" /> + <Compile Include="Legacy\FixedFunction\OTK_FF_Lighting2D.cs" /> + <Compile Include="Legacy\FixedFunction\OTK_FF_Lighting3D.cs" /> + <Compile Include="Legacy\FrameBufferExt.cs" /> + <Compile Include="Legacy\FrameBufferReadPixels.cs" /> + <Compile Include="Legacy\LegacyDrawBuffer.cs" /> + <Compile Include="Legacy\LegacyPrimitiveRenderer.cs" /> + <Compile Include="Legacy\LegacyVertexBuffer.cs" /> + <Compile Include="PrimitiveRenderer.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ShaderFactory.cs" /> + <Compile Include="TextureCoordinates.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="GL3\Shaders\ShaderSources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>ShaderSources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="ShaderSources.resx"> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + <None Include="Resources\Basic2D_pixel.txt" /> + </ItemGroup> + <ItemGroup> + <None Include="Resources\Basic2D_vert.txt" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\AgateLib\AgateLib.csproj"> + <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> + <Name>AgateLib</Name> + </ProjectReference> + </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> \ No newline at end of file Copied: trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj (from rev 1482, trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj) =================================================================== --- trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj (rev 0) +++ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj 2014-08-28 04:30:28 UTC (rev 1484) @@ -0,0 +1,211 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{4B12561E-D37B-48A1-B6DB-218E94906C22}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AgateLib.Platform.WindowsForms</RootNamespace> + <AssemblyName>AgateLib.Platform.WindowsForms</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\Binaries\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\Binaries\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> + <OutputPath>bin\x86\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Reference Include="OpenTK"> + <HintPath>..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="ApplicationModels\FormsModelParameters.cs" /> + <Compile Include="ApplicationModels\PassiveModel.cs" /> + <Compile Include="ApplicationModels\PassiveModelParameters.cs" /> + <Compile Include="ApplicationModels\SceneModel.cs" /> + <Compile Include="ApplicationModels\SceneModelParameters.cs" /> + <Compile Include="ApplicationModels\SerialModel.cs" /> + <Compile Include="ApplicationModels\SerialModelParameters.cs" /> + <Compile Include="Data\AgateColumn.cs" /> + <Compile Include="Data\AgateColumnDictionary.cs" /> + <Compile Include="Data\AgateDatabase.cs" /> + <Compile Include="Data\AgateDatabaseException.cs" /> + <Compile Include="Data\AgateDataHelper.cs" /> + <Compile Include="Data\AgateRow.cs" /> + <Compile Include="Data\AgateRowList.cs" /> + <Compile Include="Data\AgateTable.cs" /> + <Compile Include="Data\AgateTableDictionary.cs" /> + <Compile Include="Data\FieldType.cs" /> + <Compile Include="Diagnostics\AgateConsoleImpl.cs" /> + <Compile Include="Diagnostics\AgateConsoleTraceListener.cs" /> + <Compile Include="DisplayImplementation\ContextInfo.cs" /> + <Compile Include="DisplayImplementation\frmFullScreen.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DisplayImplementation\frmFullScreen.Designer.cs"> + <DependentUpon>frmFullScreen.cs</DependentUpon> + </Compile> + <Compile Include="DisplayImplementation\DesktopGLDisplay.cs" /> + <Compile Include="DisplayImplementation\GL_DisplayControl.cs" /> + <Compile Include="DisplayImplementation\GL_GameWindow.cs" /> + <Compile Include="DisplayImplementation\GL_Surface.cs" /> + <Compile Include="DisplayImplementation\IPrimaryWindow.cs" /> + <Compile Include="Factories\DisplayFactory.cs" /> + <Compile Include="Factories\FormsFactory.cs" /> + <Compile Include="Factories\PlatformFactory.cs" /> + <Compile Include="Factories\SdlFactory.cs" /> + <Compile Include="Factories\SysIoFile.cs" /> + <Compile Include="Factories\SysIoPath.cs" /> + <Compile Include="PixelBufferExtensions.cs" /> + <Compile Include="PlatformImplementation\FileProviderList.cs" /> + <Compile Include="PlatformImplementation\FileSystemProvider.cs" /> + <Compile Include="PlatformImplementation\FormsPlatformInfo.cs" /> + <Compile Include="PlatformImplementation\TgzFileProvider.cs" /> + <Compile Include="PlatformImplementation\ZipFileProvider.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Initializer.cs" /> + <Compile Include="Resources\BuiltinResources.cs" /> + <Compile Include="SurfaceExtensions.cs" /> + <Compile Include="WinForms\AgateRenderTarget.cs"> + <SubType>Component</SubType> + </Compile> + <Compile Include="WinForms\AgateRenderTarget.Designer.cs"> + <DependentUpon>AgateRenderTarget.cs</DependentUpon> + </Compile> + <Compile Include="WinForms\BitmapFontUtil.cs" /> + <Compile Include="WinForms\BitmapFontUtilRenderers.cs" /> + <Compile Include="WinForms\DisplayWindowForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="WinForms\DisplayWindowForm.Designer.cs"> + <DependentUpon>DisplayWindowForm.cs</DependentUpon> + </Compile> + <Compile Include="WinForms\FormsInterop.cs" /> + <Compile Include="WinForms\FormUtil.cs" /> + <Compile Include="WinForms\Icons.Designer.cs"> + <DependentUpon>Icons.resx</DependentUpon> + <DesignTime>True</DesignTime> + <AutoGen>True</AutoGen> + </Compile> + <Compile Include="WinForms\TypeConverters.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\AgateLib.AgateSDL\AgateLib.AgateSDL.csproj"> + <Project>{935d67a0-931e-46de-9f6a-2d6dbc99aff3}</Project> + <Name>AgateLib.AgateSDL</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib.OpenGL\AgateLib.OpenGL.csproj"> + <Project>{94734e5a-0344-43e8-bb30-e32e3f57f611}</Project> + <Name>AgateLib.GL</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj"> + <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project> + <Name>AgateLib.Platform.Common</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib\AgateLib.csproj"> + <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> + <Name>AgateLib</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="DisplayImplementation\frmFullScreen.resx"> + <DependentUpon>frmFullScreen.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="WinForms\DisplayWindowForm.resx"> + <DependentUpon>DisplayWindowForm.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="WinForms\Icons.resx"> + <SubType>Designer</SubType> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Icons.Designer.cs</LastGenOutput> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <Content Include="Resources\AgateLib-mono.ico" /> + <Content Include="Resources\AgateLib.ico" /> + <Content Include="Resources\blankcursor.cur" /> + </ItemGroup> + <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> \ No newline at end of file Deleted: trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WindowsForms.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-28 02:34:56 UTC (rev 1482) +++ trunk/AgateLib.Platform.WinForms/AgateLib.Platform.WindowsForms.csproj 2014-08-28 04:30:28 UTC (rev 1484) @@ -1,211 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{4B12561E-D37B-48A1-B6DB-218E94906C22}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>AgateLib.Platform.WindowsForms</RootNamespace> - <AssemblyName>AgateLib.Platform.WindowsForms</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <TargetFrameworkProfile /> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\Binaries\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\Binaries\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <DebugType>full</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <UseVSHostingProcess>false</UseVSHostingProcess> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> - <OutputPath>bin\x86\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <Optimize>true</Optimize> - <DebugType>pdbonly</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x64\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <DebugType>full</DebugType> - <PlatformTarget>x64</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> - <OutputPath>bin\x64\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <Optimize>true</Optimize> - <DebugType>pdbonly</DebugType> - <PlatformTarget>x64</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="OpenTK"> - <HintPath>..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Core" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="ApplicationModels\FormsModelParameters.cs" /> - <Compile Include="ApplicationModels\PassiveModel.cs" /> - <Compile Include="ApplicationModels\PassiveModelParameters.cs" /> - <Compile Include="ApplicationModels\SceneModel.cs" /> - <Compile Include="ApplicationModels\SceneModelParameters.cs" /> - <Compile Include="ApplicationModels\SerialModel.cs" /> - <Compile Include="ApplicationModels\SerialModelParameters.cs" /> - <Compile Include="Data\AgateColumn.cs" /> - <Compile Include="Data\AgateColumnDictionary.cs" /> - <Compile Include="Data\AgateDatabase.cs" /> - <Compile Include="Data\AgateDatabaseException.cs" /> - <Compile Include="Data\AgateDataHelper.cs" /> - <Compile Include="Data\AgateRow.cs" /> - <Compile Include="Data\AgateRowList.cs" /> - <Compile Include="Data\AgateTable.cs" /> - <Compile Include="Data\AgateTableDictionary.cs" /> - <Compile Include="Data\FieldType.cs" /> - <Compile Include="Diagnostics\AgateConsoleImpl.cs" /> - <Compile Include="Diagnostics\AgateConsoleTraceListener.cs" /> - <Compile Include="DisplayImplementation\ContextInfo.cs" /> - <Compile Include="DisplayImplementation\frmFullScreen.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DisplayImplementation\frmFullScreen.Designer.cs"> - <DependentUpon>frmFullScreen.cs</DependentUpon> - </Compile> - <Compile Include="DisplayImplementation\DesktopGLDisplay.cs" /> - <Compile Include="DisplayImplementation\GL_DisplayControl.cs" /> - <Compile Include="DisplayImplementation\GL_GameWindow.cs" /> - <Compile Include="DisplayImplementation\GL_Surface.cs" /> - <Compile Include="DisplayImplementation\IPrimaryWindow.cs" /> - <Compile Include="Factories\DisplayFactory.cs" /> - <Compile Include="Factories\FormsFactory.cs" /> - <Compile Include="Factories\PlatformFactory.cs" /> - <Compile Include="Factories\SdlFactory.cs" /... [truncated message content] |
From: <ka...@us...> - 2014-08-28 03:31:28
|
Revision: 1483 http://sourceforge.net/p/agate/code/1483 Author: kanato Date: 2014-08-28 03:31:22 +0000 (Thu, 28 Aug 2014) Log Message: ----------- Delete old windows phone project. Removed Paths: ------------- trunk/AgateLib.Platform.WindowsPhone/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-28 02:35:19
|
Revision: 1482 http://sourceforge.net/p/agate/code/1482 Author: kanato Date: 2014-08-28 02:34:56 +0000 (Thu, 28 Aug 2014) Log Message: ----------- Fix drawing for default culling mode. Works when deployed to physical windows phone device now. Modified Paths: -------------- trunk/AgateLib/Utility/Ref.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo trunk/AgateLib.sln trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs Modified: trunk/AgateLib/Utility/Ref.cs =================================================================== --- trunk/AgateLib/Utility/Ref.cs 2014-08-27 07:22:57 UTC (rev 1481) +++ trunk/AgateLib/Utility/Ref.cs 2014-08-28 02:34:56 UTC (rev 1482) @@ -169,15 +169,24 @@ v = null; } - public static bool operator==(Ref<T> r, object obj) + public static bool operator ==(Ref<T> r, T obj) { - if (obj == null && r.v == null) - return true; + if (obj == null) + { + if (r.v == null) + return true; + else + return false; + } - else + if (r.v == null) return false; + if (r.v.Value == null) + return false; + + return r.v.Value.Equals(obj); } - public static bool operator !=(Ref<T> r, object obj) + public static bool operator !=(Ref<T> r, T obj) { return !(r == obj); } Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs 2014-08-27 07:22:57 UTC (rev 1481) +++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs 2014-08-28 02:34:56 UTC (rev 1482) @@ -31,7 +31,7 @@ { public class DrawBuffer { - const int vertPageSize = 8; + const int vertPageSize = 1000; int pages = 1; SharpDXContext mContext; @@ -177,8 +177,6 @@ private void DoDraw(object ignored) { - //mDevice.DeviceContext.OutputMerger.SetTargets(this.parentContext.DepthStencilView, this.parentContext.BackBufferView); - mDevice.DeviceContext.UpdateSubresource(mVerts, mVertexBuffer); mDevice.DeviceContext.UpdateSubresource(mIndices, mIndexBuffer); @@ -186,12 +184,10 @@ mDevice.DeviceContext.InputAssembler.InputLayout = mVertexLayout; mDevice.DeviceContext.InputAssembler.SetIndexBuffer(mIndexBuffer, SharpDX.DXGI.Format.R16_UInt, 0); - mDevice.DeviceContext.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleStrip; + mDevice.DeviceContext.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleList; mDevice.DeviceContext.PixelShader.SetShaderResource(0, mTextureView); mDevice.DeviceContext.DrawIndexed(mIndexPointer, 0, 0); - mDevice.DeviceContext.Draw(4, 0); } - } } Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs 2014-08-27 07:22:57 UTC (rev 1481) +++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs 2014-08-28 02:34:56 UTC (rev 1482) @@ -55,10 +55,10 @@ PointF mCenterPoint; PositionTextureColor[] mVerts = new PositionTextureColor[4]; - short[] mIndices = new short[] { 0, 2, 1, 1, 2, 3 }; + short[] mIndices = new short[] { 0, 1, 2, 2, 1, 3 }; PositionTextureColor[] mExtraVerts = new PositionTextureColor[4]; - short[] mExtraIndices = new short[] { 0, 2, 1, 1, 2, 3 }; + short[] mExtraIndices = new short[] { 0, 1, 2, 2, 1, 3 }; #endregion Modified: trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs =================================================================== --- trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs 2014-08-27 07:22:57 UTC (rev 1481) +++ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs 2014-08-28 02:34:56 UTC (rev 1482) @@ -27,7 +27,7 @@ namespace AgateLib.Platform.WindowsStoreCommon.DisplayImplementation.Shaders { - class SDX_Basic2DShader : Basic2DImpl + class SDX_Basic2DShader : Basic2DImpl { Rectangle mCoords; @@ -39,6 +39,7 @@ SharpDX.Direct3D11.Buffer mConstantBuffer; SamplerState mSampler; + BlendState mBlendState; public SDX_Basic2DShader() { @@ -88,11 +89,29 @@ MinimumLod = -float.MaxValue, MaximumLod = float.MaxValue }); + + + var desc = new BlendStateDescription(); + + desc.RenderTarget[0] = new RenderTargetBlendDescription + { + SourceBlend = BlendOption.SourceAlpha, + SourceAlphaBlend = BlendOption.SourceAlpha, + DestinationBlend = BlendOption.InverseSourceAlpha, + DestinationAlphaBlend = BlendOption.InverseSourceAlpha, + AlphaBlendOperation = BlendOperation.Add, + BlendOperation = BlendOperation.Add, + IsBlendEnabled = true, + RenderTargetWriteMask = ColorWriteMaskFlags.All, + }; + + mBlendState = new BlendState(mDevice.Device, desc); + } public override AgateLib.Geometry.Rectangle CoordinateSystem { - get { return mCoords; } + get { return mCoords; } set { mCoords = value; @@ -118,6 +137,9 @@ //mDevice.SetTransform(TransformState.World, SlimDX.Matrix.Identity); //mDevice.SetTransform(TransformState.View, SlimDX.Matrix.Identity); + + mDevice.DeviceContext.OutputMerger.BlendState = mBlendState; + //mDevice.DeviceContext.Rasterizer.State = rs; SetOrthoProjection(); } @@ -138,9 +160,7 @@ mDevice.DeviceContext.PixelShader.Set(mPixelShader); mDevice.DeviceContext.PixelShader.SetSampler(0, mSampler); - //SDX_Display mDisplay = (SDX_Display)AgateLib.DisplayLib.Display.Impl; - - //Set2DDrawState(); + Set2DDrawState(); } public override void BeginPass(int passIndex) Modified: trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo =================================================================== (Binary files differ) Modified: trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo =================================================================== (Binary files differ) Modified: trunk/AgateLib.sln =================================================================== --- trunk/AgateLib.sln 2014-08-27 07:22:57 UTC (rev 1481) +++ trunk/AgateLib.sln 2014-08-28 02:34:56 UTC (rev 1482) @@ -52,12 +52,10 @@ GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|ARM = Debug|ARM - Debug|Mixed Platforms = Debug|Mixed Platforms Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|ARM = Release|ARM - Release|Mixed Platforms = Release|Mixed Platforms Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection @@ -65,8 +63,6 @@ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|ARM.ActiveCfg = Debug|Any CPU - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Mixed Platforms.Build.0 = Debug|x86 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.ActiveCfg = Debug|x64 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.Build.0 = Debug|x64 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.ActiveCfg = Debug|x86 @@ -74,8 +70,6 @@ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|ARM.ActiveCfg = Release|Any CPU - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Mixed Platforms.Build.0 = Release|x86 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.ActiveCfg = Release|x64 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.Build.0 = Release|x64 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.ActiveCfg = Release|x86 @@ -83,23 +77,17 @@ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|ARM.ActiveCfg = Debug|Any CPU - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|ARM.ActiveCfg = Release|Any CPU - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.Build.0 = Release|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|ARM.ActiveCfg = Debug|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Mixed Platforms.Build.0 = Debug|x86 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x64.ActiveCfg = Debug|x64 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x64.Build.0 = Debug|x64 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.ActiveCfg = Debug|x86 @@ -107,8 +95,6 @@ {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.Build.0 = Release|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|ARM.ActiveCfg = Release|Any CPU - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Mixed Platforms.Build.0 = Release|x86 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x64.ActiveCfg = Release|x64 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x64.Build.0 = Release|x64 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.ActiveCfg = Release|x86 @@ -116,8 +102,6 @@ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|ARM.ActiveCfg = Debug|Any CPU - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Mixed Platforms.Build.0 = Debug|x86 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.ActiveCfg = Debug|x64 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x64.Build.0 = Debug|x64 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.ActiveCfg = Debug|x86 @@ -125,8 +109,6 @@ {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.Build.0 = Release|Any CPU {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|ARM.ActiveCfg = Release|Any CPU - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Mixed Platforms.Build.0 = Release|x86 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.ActiveCfg = Release|x64 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x64.Build.0 = Release|x64 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.ActiveCfg = Release|x86 @@ -134,8 +116,6 @@ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.Build.0 = Debug|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|ARM.ActiveCfg = Debug|Any CPU - {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Mixed Platforms.Build.0 = Debug|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x64.ActiveCfg = Debug|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x64.Build.0 = Debug|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.ActiveCfg = Debug|x86 @@ -143,8 +123,6 @@ {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.ActiveCfg = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.Build.0 = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|ARM.ActiveCfg = Release|Any CPU - {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Mixed Platforms.Build.0 = Release|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.ActiveCfg = Release|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x64.Build.0 = Release|x64 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.ActiveCfg = Release|x86 @@ -152,8 +130,6 @@ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.Build.0 = Debug|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|ARM.ActiveCfg = Debug|Any CPU - {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Mixed Platforms.Build.0 = Debug|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x64.ActiveCfg = Debug|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x64.Build.0 = Debug|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.ActiveCfg = Debug|x86 @@ -161,8 +137,6 @@ {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.Build.0 = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|ARM.ActiveCfg = Release|Any CPU - {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Mixed Platforms.Build.0 = Release|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.ActiveCfg = Release|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x64.Build.0 = Release|x64 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.ActiveCfg = Release|x86 @@ -173,9 +147,6 @@ {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|ARM.ActiveCfg = Debug|ARM {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|ARM.Build.0 = Debug|ARM {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|ARM.Deploy.0 = Debug|ARM - {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|Mixed Platforms.Deploy.0 = Debug|x86 {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|x64.ActiveCfg = Debug|Any CPU {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|x86.ActiveCfg = Debug|x86 {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Debug|x86.Build.0 = Debug|x86 @@ -186,9 +157,6 @@ {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|ARM.ActiveCfg = Release|ARM {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|ARM.Build.0 = Release|ARM {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|ARM.Deploy.0 = Release|ARM - {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|Mixed Platforms.Build.0 = Release|x86 - {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|Mixed Platforms.Deploy.0 = Release|x86 {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|x64.ActiveCfg = Release|Any CPU {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|x86.ActiveCfg = Release|x86 {EE97FB40-E1EB-4E55-87CF-EC3835EFD9DB}.Release|x86.Build.0 = Release|x86 @@ -196,39 +164,30 @@ {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Any CPU.Build.0 = Debug|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|x64.ActiveCfg = Debug|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|x86.ActiveCfg = Debug|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Debug|x86.Build.0 = Debug|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Any CPU.ActiveCfg = Release|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Any CPU.Build.0 = Release|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|ARM.ActiveCfg = Release|Any CPU - {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|Mixed Platforms.Build.0 = Release|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|x64.ActiveCfg = Release|Any CPU {FC9E7036-AA75-4A6B-82DB-0F5E98B5FBCB}.Release|x86.ActiveCfg = Release|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Any CPU.Build.0 = Debug|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|ARM.ActiveCfg = Debug|Any CPU - {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|ARM.Build.0 = Debug|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|x64.ActiveCfg = Debug|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|x86.ActiveCfg = Debug|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Debug|x86.Build.0 = Debug|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Any CPU.ActiveCfg = Release|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Any CPU.Build.0 = Release|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|ARM.ActiveCfg = Release|Any CPU - {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|Mixed Platforms.Build.0 = Release|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|x64.ActiveCfg = Release|Any CPU {C7F9AE34-B781-4490-A9B2-5728F44F3523}.Release|x86.ActiveCfg = Release|Any CPU {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Any CPU.Build.0 = Debug|Any CPU {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|ARM.ActiveCfg = Debug|ARM {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|ARM.Build.0 = Debug|ARM - {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|Mixed Platforms.Build.0 = Debug|x86 {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x64.ActiveCfg = Debug|x64 {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x64.Build.0 = Debug|x64 {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Debug|x86.ActiveCfg = Debug|x86 @@ -237,8 +196,6 @@ {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|Any CPU.Build.0 = Release|Any CPU {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|ARM.ActiveCfg = Release|ARM {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|ARM.Build.0 = Release|ARM - {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|Mixed Platforms.Build.0 = Release|x86 {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x64.ActiveCfg = Release|x64 {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x64.Build.0 = Release|x64 {C9B8F763-187D-4F2E-BAEE-827B7247C278}.Release|x86.ActiveCfg = Release|x86 @@ -248,10 +205,6 @@ {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|ARM.ActiveCfg = Debug|ARM {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|ARM.Build.0 = Debug|ARM - {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|ARM.Deploy.0 = Debug|ARM - {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|Mixed Platforms.Deploy.0 = Debug|x86 {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|x64.ActiveCfg = Debug|x64 {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|x64.Build.0 = Debug|x64 {376B6926-005D-4A36-9EB3-272173A377A4}.Debug|x64.Deploy.0 = Debug|x64 @@ -264,9 +217,6 @@ {376B6926-005D-4A36-9EB3-272173A377A4}.Release|ARM.ActiveCfg = Release|ARM {376B6926-005D-4A36-9EB3-272173A377A4}.Release|ARM.Build.0 = Release|ARM {376B6926-005D-4A36-9EB3-272173A377A4}.Release|ARM.Deploy.0 = Release|ARM - {376B6926-005D-4A36-9EB3-272173A377A4}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {376B6926-005D-4A36-9EB3-272173A377A4}.Release|Mixed Platforms.Build.0 = Release|x86 - {376B6926-005D-4A36-9EB3-272173A377A4}.Release|Mixed Platforms.Deploy.0 = Release|x86 {376B6926-005D-4A36-9EB3-272173A377A4}.Release|x64.ActiveCfg = Release|x64 {376B6926-005D-4A36-9EB3-272173A377A4}.Release|x64.Build.0 = Release|x64 {376B6926-005D-4A36-9EB3-272173A377A4}.Release|x64.Deploy.0 = Release|x64 @@ -279,9 +229,6 @@ {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|ARM.ActiveCfg = Debug|ARM {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|ARM.Build.0 = Debug|ARM {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|ARM.Deploy.0 = Debug|ARM - {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|Mixed Platforms.Deploy.0 = Debug|x86 {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|x64.ActiveCfg = Debug|Any CPU {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|x86.ActiveCfg = Debug|x86 {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Debug|x86.Build.0 = Debug|x86 @@ -292,9 +239,6 @@ {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|ARM.ActiveCfg = Release|ARM {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|ARM.Build.0 = Release|ARM {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|ARM.Deploy.0 = Release|ARM - {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|Mixed Platforms.Build.0 = Release|x86 - {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|Mixed Platforms.Deploy.0 = Release|x86 {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|x64.ActiveCfg = Release|Any CPU {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|x86.ActiveCfg = Release|x86 {270AE38D-AB91-4DCC-9C98-E183F990CAB4}.Release|x86.Build.0 = Release|x86 @@ -303,8 +247,6 @@ {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|Any CPU.Build.0 = Debug|Any CPU {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|ARM.ActiveCfg = Debug|ARM {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|ARM.Build.0 = Debug|ARM - {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|Mixed Platforms.Build.0 = Debug|x86 {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x64.ActiveCfg = Debug|Any CPU {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x86.ActiveCfg = Debug|x86 {9BEF78DB-B535-47D3-9C14-453D373807EC}.Debug|x86.Build.0 = Debug|x86 @@ -312,8 +254,6 @@ {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|Any CPU.Build.0 = Release|Any CPU {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|ARM.ActiveCfg = Release|ARM {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|ARM.Build.0 = Release|ARM - {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|Mixed Platforms.Build.0 = Release|x86 {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x64.ActiveCfg = Release|Any CPU {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x86.ActiveCfg = Release|x86 {9BEF78DB-B535-47D3-9C14-453D373807EC}.Release|x86.Build.0 = Release|x86 Modified: trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs =================================================================== --- trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs 2014-08-27 07:22:57 UTC (rev 1481) +++ trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs 2014-08-28 02:34:56 UTC (rev 1482) @@ -34,6 +34,8 @@ int pos = (int)(time * 100); image.Draw(pos % 100, pos % 200); + + image.Draw(200, 200); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-27 07:23:01
|
Revision: 1481 http://sourceforge.net/p/agate/code/1481 Author: kanato Date: 2014-08-27 07:22:57 +0000 (Wed, 27 Aug 2014) Log Message: ----------- Drawing images works in windows phone and windows rt. Modified Paths: -------------- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs trunk/AgateLib/Utility/Ref.cs trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModelParameters.cs trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj trunk/AgateLib.Platform.WindowsPhone/packages.config trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModelParameters.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Lighting2DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/FakeFile.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/FakePath.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/DiagnosticsStopwatch.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WPPlatformInfo.cs trunk/AgateLib.Platform.WindowsStoreCommon/Resources/buildshaders.bat trunk/AgateLib.Platform.WindowsStoreCommon/Resources/fxc.bat trunk/AgateLib.sln trunk/Tests.WindowsPhone/Properties/WMAppManifest.xml trunk/Tests.WindowsPhone/Resources/AppResources.Designer.cs trunk/Tests.WindowsPhone/Tests.WindowsPhone.csproj Added Paths: ----------- trunk/AgateLib.Platform.Windows/ trunk/AgateLib.Platform.Windows/AgateLib.Platform.Windows.csproj trunk/AgateLib.Platform.Windows/ApplicationModels/ trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.Windows/Factories/ trunk/AgateLib.Platform.Windows/Factories/WinPlatformFactory.cs trunk/AgateLib.Platform.Windows/Factories/WindowsFactory.cs trunk/AgateLib.Platform.Windows/Properties/ trunk/AgateLib.Platform.Windows/Properties/AssemblyInfo.cs trunk/AgateLib.Platform.Windows/WindowsInitializer.cs trunk/AgateLib.Platform.Windows/packages.config trunk/AgateLib.Platform.WindowsPhone/Factories/ trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs trunk/AgateLib.Platform.WindowsPhone/Interop.cs trunk/AgateLib.Platform.WindowsPhone/SwapChainBackgroundPanelAdapter.cs trunk/AgateLib.Platform.WindowsPhone8/ trunk/AgateLib.Platform.WindowsPhone8/AgateLib.Platform.WindowsPhone8.csproj trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/ trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsPhone8/Factories/ trunk/AgateLib.Platform.WindowsPhone8/Factories/WPPlatformFactory.cs trunk/AgateLib.Platform.WindowsPhone8/Factories/WindowsPhoneFactory.cs trunk/AgateLib.Platform.WindowsPhone8/Properties/ trunk/AgateLib.Platform.WindowsPhone8/Properties/AssemblyInfo.cs trunk/AgateLib.Platform.WindowsPhone8/WindowsPhoneInitializer.cs trunk/AgateLib.Platform.WindowsPhone8/packages.config trunk/AgateLib.Platform.WindowsStoreCommon/ trunk/AgateLib.Platform.WindowsStoreCommon/AgateLib.Platform.WindowsStoreCommon.csproj trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/ trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/D3DDevice.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferSurface.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Display.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_DisplayWindow.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_FrameBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_IndexBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_VertexBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Lighting3DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/ShaderFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/ShaderSourceProvider.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/ trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/IRenderTargetAdapter.cs trunk/AgateLib.Platform.WindowsStoreCommon/Interop.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/ trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WPAssetFileProvider.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/WindowsStorePlatformFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/Properties/ trunk/AgateLib.Platform.WindowsStoreCommon/Properties/AssemblyInfo.cs trunk/AgateLib.Platform.WindowsStoreCommon/Resources/ trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/ShaderSource/Basic2Dpixel.hlsl trunk/AgateLib.Platform.WindowsStoreCommon/Resources/ShaderSource/Basic2Dvert.hlsl trunk/AgateLib.Platform.WindowsStoreCommon/SwapChainBackgroundPanelAdapter.cs trunk/AgateLib.Platform.WindowsStoreCommon/packages.config trunk/Tests.WindowsPhone/Assets/BadgeLogo.png trunk/Tests.WindowsPhone/Assets/Logo.png trunk/Tests.WindowsPhone/Assets/SplashScreen.png trunk/Tests.WindowsPhone/Assets/SquareTile150x150.png trunk/Tests.WindowsPhone/Assets/SquareTile71x71.png trunk/Tests.WindowsPhone/Assets/StoreLogo.png trunk/Tests.WindowsPhone/Assets/WideLogo.png trunk/Tests.WindowsPhone/Package.appxmanifest trunk/Tests.WindowsStore/ trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/ trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/App.xaml trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/App.xaml.cs trunk/Tests.WindowsStore/Tests.WindowsStore.Shared/TestScene.cs trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/ trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Assets/ trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Assets/Logo.scale-100.png trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Assets/SmallLogo.scale-100.png trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Assets/SplashScreen.scale-100.png trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Assets/StoreLogo.scale-100.png trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Assets/agatelogo.png trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/MainPage.xaml trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/MainPage.xaml.cs trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Package.appxmanifest trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Properties/ trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Properties/AssemblyInfo.cs trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Tests.WindowsStore.Windows.csproj trunk/Tests.WindowsStore/Tests.WindowsStore.Windows/Tests.WindowsStore.Windows_TemporaryKey.pfx trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/ trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Assets/ trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Assets/Logo.scale-240.png trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Assets/SmallLogo.scale-240.png trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Assets/SplashScreen.scale-240.png trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Assets/Square71x71Logo.scale-240.png trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Assets/StoreLogo.scale-240.png trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Assets/WideLogo.scale-240.png trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Assets/agatelogo.png trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/MainPage.xaml trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/MainPage.xaml.cs trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Package.appxmanifest trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Properties/ trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Properties/AssemblyInfo.cs trunk/Tests.WindowsStore/Tests.WindowsStore.WindowsPhone/Tests.WindowsStore.WindowsPhone.csproj Removed Paths: ------------- trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/ trunk/AgateLib.Platform.WindowsPhone/Factories/ trunk/AgateLib.Platform.WindowsPhone/Interop.cs trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/ trunk/AgateLib.Platform.WindowsPhone/Resources/ trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/D3DDevice.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/DrawBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferSurface.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/FrameBufferWindow.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Display.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_DisplayWindow.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_FrameBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_IndexBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_Surface.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/SDX_VertexBuffer.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDL_Lighting3DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/SDX_Basic2DShader.cs trunk/AgateLib.Platform.WindowsStoreCommon/DisplayImplementation/Shaders/ShaderFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/DisplayFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/WPPlatformFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/Factories/WindowsPhoneFactory.cs trunk/AgateLib.Platform.WindowsStoreCommon/PlatformImplementation/AssetFileProvider.cs trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dpixel.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/Basic2Dvert.fxo trunk/AgateLib.Platform.WindowsStoreCommon/Resources/ShaderSource/Basic2Dpixel.hlsl trunk/AgateLib.Platform.WindowsStoreCommon/Resources/ShaderSource/Basic2Dvert.hlsl Modified: trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs =================================================================== --- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-27 01:19:58 UTC (rev 1480) +++ trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -17,11 +17,12 @@ { try { + sceneToStartWith = scene; + Initialize(); AutoCreateDisplayWindow(); PrerunInitialization(); - sceneToStartWith = scene; BeginModel(); } finally Modified: trunk/AgateLib/Utility/Ref.cs =================================================================== --- trunk/AgateLib/Utility/Ref.cs 2014-08-27 01:19:58 UTC (rev 1480) +++ trunk/AgateLib/Utility/Ref.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -168,5 +168,18 @@ v.Dispose(); v = null; } + + public static bool operator==(Ref<T> r, object obj) + { + if (obj == null && r.v == null) + return true; + + else + return false; + } + public static bool operator !=(Ref<T> r, object obj) + { + return !(r == obj); + } } } Modified: trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj =================================================================== --- trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-27 01:19:58 UTC (rev 1480) +++ trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-27 07:22:57 UTC (rev 1481) @@ -13,7 +13,7 @@ <DefaultLanguage>en-US</DefaultLanguage> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <TargetFrameworkProfile>Profile49</TargetFrameworkProfile> + <TargetFrameworkProfile>Profile259</TargetFrameworkProfile> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> Index: trunk/AgateLib.Platform.Windows =================================================================== --- trunk/AgateLib.Platform.Windows 2014-08-27 01:19:58 UTC (rev 1480) +++ trunk/AgateLib.Platform.Windows 2014-08-27 07:22:57 UTC (rev 1481) Property changes on: trunk/AgateLib.Platform.Windows ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,10 ## +[Bb]in +obj +[Dd]ebug +[Rr]elease +*.user +*.aps +*.eto +ClientBin +GeneratedArtifacts +_Pvt_Extensions Added: trunk/AgateLib.Platform.Windows/AgateLib.Platform.Windows.csproj =================================================================== --- trunk/AgateLib.Platform.Windows/AgateLib.Platform.Windows.csproj (rev 0) +++ trunk/AgateLib.Platform.Windows/AgateLib.Platform.Windows.csproj 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.30703</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{C9B8F763-187D-4F2E-BAEE-827B7247C278}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AgateLib.Platform.Windows</RootNamespace> + <AssemblyName>AgateLib.Platform.Windows</AssemblyName> + <DefaultLanguage>en-US</DefaultLanguage> + <TargetPlatformVersion>8.1</TargetPlatformVersion> + <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <NuGetPackageImportStamp>5fb9b2f3</NuGetPackageImportStamp> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</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;NETFX_CORE;WINDOWS_APP</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\ARM\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants> + <NoWarn>;2008</NoWarn> + <DebugType>full</DebugType> + <PlatformTarget>ARM</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'"> + <OutputPath>bin\ARM\Release\</OutputPath> + <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants> + <Optimize>true</Optimize> + <NoWarn>;2008</NoWarn> + <DebugType>pdbonly</DebugType> + <PlatformTarget>ARM</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants> + <NoWarn>;2008</NoWarn> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants> + <Optimize>true</Optimize> + <NoWarn>;2008</NoWarn> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants> + <NoWarn>;2008</NoWarn> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> + <OutputPath>bin\x86\Release\</OutputPath> + <DefineConstants>TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants> + <Optimize>true</Optimize> + <NoWarn>;2008</NoWarn> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <ItemGroup> + <!-- A reference to the entire .Net Framework and Windows SDK are automatically included --> + <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj"> + <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project> + <Name>AgateLib.Platform.Common</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj"> + <Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project> + <Name>AgateLib.Platform.WindowsStoreCommon</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib\AgateLib.csproj"> + <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> + <Name>AgateLib</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Compile Include="ApplicationModels\SceneModel.cs" /> + <Compile Include="ApplicationModels\SceneModelParameters.cs" /> + <Compile Include="Factories\WindowsFactory.cs" /> + <Compile Include="Factories\WinPlatformFactory.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="WindowsInitializer.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <Reference Include="SharpDX"> + <HintPath>$(SharpDXPackageBinDir)\SharpDX.dll</HintPath> + </Reference> + <Reference Include="SharpDX.Direct3D11"> + <HintPath>$(SharpDXPackageBinDir)\SharpDX.Direct3D11.dll</HintPath> + </Reference> + <Reference Include="SharpDX.DXGI"> + <HintPath>$(SharpDXPackageBinDir)\SharpDX.DXGI.dll</HintPath> + </Reference> + <Reference Include="SharpDX.SimpleInitializer"> + <HintPath>..\packages\SharpDX.SimpleInitializer.1.0.0\lib\portable-netcore451+wpa81\SharpDX.SimpleInitializer.dll</HintPath> + </Reference> + </ItemGroup> + <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' "> + <VisualStudioVersion>12.0</VisualStudioVersion> + </PropertyGroup> + <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" /> + <Import Project="..\packages\SharpDX.2.6.2\build\SharpDX.targets" Condition="Exists('..\packages\SharpDX.2.6.2\build\SharpDX.targets')" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\packages\SharpDX.2.6.2\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.2.6.2\build\SharpDX.targets'))" /> + </Target> + <!-- 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> \ No newline at end of file Deleted: trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModel.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -1,55 +0,0 @@ -using AgateLib.ApplicationModels; -using AgateLib.DisplayLib; -using SharpDX.SimpleInitializer; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.Platform.WindowsPhone.ApplicationModels -{ - public class SceneModel : SceneAppModelBase - { - SharpDXContext context; - - public SceneModel(SceneModelParameters parameters) - : base(parameters) - { } - - public new SceneModelParameters Parameters { get { return (SceneModelParameters)base.Parameters; } } - - protected override void BeginModel() - { - } - - protected override void InitializeImpl() - { - context = new SharpDXContext(); - context.Render += context_Render; - context.BindToControl(Parameters.RenderTarget); - - WindowsPhoneInitializer.Initialize(context, Parameters.RenderTarget); - } - - void context_Render(object sender, EventArgs e) - { - foreach (var sc in SceneStack.UpdateScenes) - sc.Update(Display.DeltaTime); - - Display.BeginFrame(); - - foreach (var sc in SceneStack.DrawScenes) - sc.Draw(); - - Display.EndFrame(); - - Core.KeepAlive(); - } - - public override void KeepAlive() - { - base.KeepAlive(); - } - } -} Copied: trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModel.cs (from rev 1478, trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs) =================================================================== --- trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModel.cs (rev 0) +++ trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModel.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,68 @@ +using AgateLib.ApplicationModels; +using AgateLib.DisplayLib; +using AgateLib.Platform.WindowsStoreCommon; +using SharpDX.SimpleInitializer; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Platform.Windows.ApplicationModels +{ + public class SceneModel : SceneAppModelBase + { + SharpDXContext context; + + public SceneModel(SceneModelParameters parameters) + : base(parameters) + { } + + public new SceneModelParameters Parameters { get { return (SceneModelParameters)base.Parameters; } } + + protected override void BeginModel() + { + } + + protected override void InitializeImpl() + { + context = new SharpDXContext(); + context.Render += context_Render; + context.DeviceReset += context_DeviceReset; + + var adapter = (SwapChainBackgroundPanelAdapter)Parameters.RenderTarget; + + WindowsInitializer.Initialize(context, Parameters.RenderTarget, Parameters.AssetLocations); + + context.BindToControl(adapter.RenderTarget); + } + + void context_DeviceReset(object sender, DeviceResetEventArgs e) + { + if (sceneToStartWith != null) + { + SceneStack.Add(sceneToStartWith); + sceneToStartWith = null; + } + } + + void context_Render(object sender, EventArgs e) + { + foreach (var sc in SceneStack.UpdateScenes) + sc.Update(Display.DeltaTime); + + Display.BeginFrame(); + + foreach (var sc in SceneStack.DrawScenes) + sc.Draw(); + + Display.EndFrame(); + Core.KeepAlive(); + } + + public override void KeepAlive() + { + base.KeepAlive(); + } + } +} Modified: trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModelParameters.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModelParameters.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.Windows/ApplicationModels/SceneModelParameters.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -1,20 +1,20 @@ using AgateLib.ApplicationModels; +using AgateLib.Platform.WindowsStoreCommon; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Controls; -namespace AgateLib.Platform.WindowsPhone.ApplicationModels +namespace AgateLib.Platform.Windows.ApplicationModels { public class SceneModelParameters : ModelParameters { - public SceneModelParameters(DrawingSurfaceBackgroundGrid renderTarget) + public SceneModelParameters(IRenderTargetAdapter renderTarget) { this.RenderTarget = renderTarget; } - public DrawingSurfaceBackgroundGrid RenderTarget { get; set; } + public IRenderTargetAdapter RenderTarget { get; set; } } } Copied: trunk/AgateLib.Platform.Windows/Factories/WinPlatformFactory.cs (from rev 1478, trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs) =================================================================== --- trunk/AgateLib.Platform.Windows/Factories/WinPlatformFactory.cs (rev 0) +++ trunk/AgateLib.Platform.Windows/Factories/WinPlatformFactory.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,17 @@ +using AgateLib.Drivers; +using AgateLib.Platform.WindowsStoreCommon.PlatformImplementation; +using AgateLib.Platform.WindowsStoreCommon.Factories; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Platform.Windows.Factories +{ + class WinPlatformFactory : WindowsStorePlatformFactory + { + public WinPlatformFactory() + : base(false) + { } + } +} Copied: trunk/AgateLib.Platform.Windows/Factories/WindowsFactory.cs (from rev 1479, trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs) =================================================================== --- trunk/AgateLib.Platform.Windows/Factories/WindowsFactory.cs (rev 0) +++ trunk/AgateLib.Platform.Windows/Factories/WindowsFactory.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,36 @@ +using AgateLib.DisplayLib; +using AgateLib.Drivers; +using AgateLib.Drivers.NullDrivers; +using AgateLib.Platform.WindowsStoreCommon; +using AgateLib.Platform.WindowsStoreCommon.Factories; +using SharpDX.SimpleInitializer; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Platform.Windows.Factories +{ + class WindowsFactory : IAgateFactory + { + DisplayFactory mDisplayFactory; + + public WindowsFactory(SharpDXContext context, IRenderTargetAdapter renderTarget) + { + mDisplayFactory = new DisplayFactory(context, renderTarget); + PlatformFactory = new WinPlatformFactory(); + + AudioFactory = new NullSoundFactory(); + InputFactory = new NullInputFactory(); + } + + public IDisplayFactory DisplayFactory + { + get { return mDisplayFactory; } + } + public IAudioFactory AudioFactory { get; private set; } + public IInputFactory InputFactory { get; private set; } + public IPlatformFactory PlatformFactory { get; private set; } + public FontSurface DefaultFont { get; set; } + } +} Added: trunk/AgateLib.Platform.Windows/Properties/AssemblyInfo.cs =================================================================== --- trunk/AgateLib.Platform.Windows/Properties/AssemblyInfo.cs (rev 0) +++ trunk/AgateLib.Platform.Windows/Properties/AssemblyInfo.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,29 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("AgateLib.Platform.Windows")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AgateLib.Platform.Windows")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] \ No newline at end of file Copied: trunk/AgateLib.Platform.Windows/WindowsInitializer.cs (from rev 1479, trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs) =================================================================== --- trunk/AgateLib.Platform.Windows/WindowsInitializer.cs (rev 0) +++ trunk/AgateLib.Platform.Windows/WindowsInitializer.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,20 @@ +using AgateLib.ApplicationModels; +using AgateLib.Platform.WindowsStoreCommon.Factories; +using AgateLib.Platform.WindowsStoreCommon; +using SharpDX.SimpleInitializer; +using System; +using AgateLib.Platform.Windows.Factories; + +namespace AgateLib.Platform.Windows +{ + static class WindowsInitializer + { + static WindowsFactory factory; + + internal static void Initialize(SharpDXContext context, IRenderTargetAdapter renderTarget, AssetLocations assets) + { + factory = new WindowsFactory(context, renderTarget); + Core.Initialize(factory, assets); + } + } +} Added: trunk/AgateLib.Platform.Windows/packages.config =================================================================== --- trunk/AgateLib.Platform.Windows/packages.config (rev 0) +++ trunk/AgateLib.Platform.Windows/packages.config 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="SharpDX" version="2.6.2" targetFramework="win81" /> + <package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="win81" /> + <package id="SharpDX.DXGI" version="2.6.2" targetFramework="win81" /> + <package id="SharpDX.SimpleInitializer" version="1.0.0" targetFramework="win81" /> +</packages> \ No newline at end of file Modified: trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-27 01:19:58 UTC (rev 1480) +++ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-27 07:22:57 UTC (rev 1481) @@ -12,13 +12,16 @@ <RootNamespace>AgateLib.Platform.WindowsPhone</RootNamespace> <AssemblyName>AgateLib.Platform.WindowsPhone</AssemblyName> <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier> - <TargetFrameworkVersion>v8.0</TargetFrameworkVersion> - <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion> + <TargetFrameworkVersion>v8.1</TargetFrameworkVersion> + <SilverlightVersion> + </SilverlightVersion> <SilverlightApplication>false</SilverlightApplication> <ValidateXaml>true</ValidateXaml> - <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion> + <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion> <ThrowErrorsInValidation>true</ThrowErrorsInValidation> - <NuGetPackageImportStamp>15cec27f</NuGetPackageImportStamp> + <NuGetPackageImportStamp>041e0f8f</NuGetPackageImportStamp> + <TargetFrameworkProfile /> + <DefaultLanguage>en-US</DefaultLanguage> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -52,6 +55,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <UseVSHostingProcess>false</UseVSHostingProcess> + <PlatformTarget /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <DebugType>pdbonly</DebugType> @@ -62,6 +66,7 @@ <NoConfig>true</NoConfig> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <PlatformTarget /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' "> <DebugSymbols>true</DebugSymbols> @@ -73,6 +78,7 @@ <NoConfig>true</NoConfig> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <PlatformTarget /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' "> <DebugType>pdbonly</DebugType> @@ -83,46 +89,19 @@ <NoConfig>true</NoConfig> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <PlatformTarget /> </PropertyGroup> <ItemGroup> <Compile Include="ApplicationModels\SceneModel.cs" /> <Compile Include="ApplicationModels\SceneModelParameters.cs" /> - <Compile Include="DisplayImplementation\D3DDevice.cs" /> - <Compile Include="DisplayImplementation\DrawBuffer.cs" /> - <Compile Include="DisplayImplementation\FrameBufferSurface.cs" /> - <Compile Include="DisplayImplementation\FrameBufferWindow.cs" /> - <Compile Include="DisplayImplementation\SDX_Display.cs" /> - <Compile Include="DisplayImplementation\SDX_DisplayWindow.cs" /> - <Compile Include="DisplayImplementation\SDX_FrameBuffer.cs" /> - <Compile Include="DisplayImplementation\SDX_IndexBuffer.cs" /> - <Compile Include="DisplayImplementation\SDX_Surface.cs" /> - <Compile Include="DisplayImplementation\SDX_VertexBuffer.cs" /> - <Compile Include="DisplayImplementation\Shaders\SDX_Lighting3DShader.cs" /> - <Compile Include="DisplayImplementation\Shaders\SDX_Lighting2DShader.cs" /> - <Compile Include="DisplayImplementation\Shaders\ShaderResources.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>ShaderResources.resx</DependentUpon> - </Compile> - <Compile Include="Factories\DisplayFactory.cs" /> - <Compile Include="Factories\FakeFile.cs" /> - <Compile Include="Factories\FakePath.cs" /> + <Compile Include="Factories\WindowsPhoneFactory.cs" /> <Compile Include="Factories\WPPlatformFactory.cs" /> - <Compile Include="Factories\WindowsPhoneFactory.cs" /> <Compile Include="Interop.cs" /> - <Compile Include="PlatformImplementation\WPAssetFileProvider.cs" /> - <Compile Include="PlatformImplementation\WPPlatformInfo.cs" /> - <Compile Include="PlatformImplementation\DiagnosticsStopwatch.cs" /> - <Compile Include="DisplayImplementation\Shaders\SDX_Basic2DShader.cs" /> - <Compile Include="DisplayImplementation\Shaders\ShaderFactory.cs" /> + <Compile Include="SwapChainBackgroundPanelAdapter.cs" /> <Compile Include="WindowsPhoneInitializer.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <None Include="Resources\Basic2Dpixel.fxo" /> - <None Include="Resources\Basic2Dvert.fxo" /> - <None Include="Resources\buildshaders.bat" /> - <None Include="Resources\fxc.bat" /> <None Include="packages.config" /> </ItemGroup> <ItemGroup> @@ -139,33 +118,21 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\Testing\SharpDX.SimpleInitializer\trunk\Binaries\WP\x86\SharpDX.SimpleInitializer.dll</HintPath> </Reference> - <Reference Include="SharpDX.Toolkit"> - <HintPath>$(SharpDXPackageBinDir)\SharpDX.Toolkit.dll</HintPath> - </Reference> - <Reference Include="SharpDX.Toolkit.Graphics"> - <HintPath>$(SharpDXPackageBinDir)\SharpDX.Toolkit.Graphics.dll</HintPath> - </Reference> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="DisplayImplementation\Shaders\ShaderResources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>ShaderResources.Designer.cs</LastGenOutput> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj"> <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project> <Name>AgateLib.Platform.Common</Name> </ProjectReference> + <ProjectReference Include="..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj"> + <Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project> + <Name>AgateLib.Platform.WindowsStoreCommon</Name> + </ProjectReference> <ProjectReference Include="..\AgateLib\AgateLib.csproj"> <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> <Name>AgateLib</Name> </ProjectReference> </ItemGroup> - <ItemGroup> - <Content Include="Resources\ShaderSource\Basic2Dpixel.hlsl" /> - <Content Include="Resources\ShaderSource\Basic2Dvert.hlsl" /> - </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" /> <ProjectExtensions /> @@ -175,11 +142,10 @@ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\packages\SharpDX.2.6.2\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.2.6.2\build\SharpDX.targets'))" /> - <Error Condition="!Exists('..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets'))" /> </Target> - <Import Project="..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets" Condition="Exists('..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets')" /> <PropertyGroup> - <PreBuildEvent>$(ProjectDir)Resources\buildshaders.bat $(ProjectDir)</PreBuildEvent> + <PreBuildEvent> + </PreBuildEvent> </PropertyGroup> <!-- 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. Copied: trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs (from rev 1478, trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs) =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,52 @@ +using AgateLib.Drivers; +using AgateLib.Platform.WindowsPhone.PlatformImplementation; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Platform.WindowsPhone.Factories +{ + class WPPlatformFactory : IPlatformFactory + { + public WPPlatformFactory() + { + Info = new WPPlatformInfo(); + AssetFileProvider = new WPAssetFileProvider(); + + } + public PlatformInfo Info { get; private set;} + public IReadFileProvider AssetFileProvider { get; private set; } + + public IStopwatch CreateStopwatch() + { + return new DiagnosticsStopwatch(); + } + + public IO.IFile CreateFile() + { + return new FakeFile(); + } + + public Diagnostics.AgateConsole CreateConsole() + { + return null; + } + + public IO.IPath CreatePath() + { + return new FakePath(); + } + + public IEnumerable<System.Reflection.Assembly> GetSerializationSearchAssemblies(Type objectType) + { + throw new NotImplementedException(); + } + + + public IPlatformSerialization CreateDefaultSerializationConstructor() + { + throw new NotImplementedException(); + } + } +} Copied: trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs (from rev 1479, trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs) =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,34 @@ +using AgateLib.DisplayLib; +using AgateLib.Drivers; +using AgateLib.Drivers.NullDrivers; +using SharpDX.SimpleInitializer; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Platform.WindowsPhone.Factories +{ + class WindowsPhoneFactory : IAgateFactory + { + DisplayFactory mDisplayFactory; + + public WindowsPhoneFactory(SharpDXContext context, System.Windows.Controls.DrawingSurfaceBackgroundGrid renderTarget) + { + mDisplayFactory = new DisplayFactory(context, renderTarget); + PlatformFactory = new WPPlatformFactory(); + + AudioFactory = new NullSoundFactory(); + InputFactory = new NullInputFactory(); + } + + public IDisplayFactory DisplayFactory + { + get { return mDisplayFactory; } + } + public IAudioFactory AudioFactory { get; private set; } + public IInputFactory InputFactory { get; private set; } + public IPlatformFactory PlatformFactory { get; private set; } + public FontSurface DefaultFont { get; set; } + } +} Deleted: trunk/AgateLib.Platform.WindowsPhone/Interop.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Interop.cs 2014-08-27 01:19:58 UTC (rev 1480) +++ trunk/AgateLib.Platform.WindowsPhone/Interop.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -1,31 +0,0 @@ -using SharpDX; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.Platform.WindowsPhone -{ - public static class Interop - { - public static AgateLib.Geometry.Size ToAgateSize(this System.Windows.Size size) - { - return new Geometry.Size( - (int)size.Width, - (int)size.Height); - } - - public static AgateLib.Geometry.Point ToAgatePoint(this System.Windows.Point point) - { - return new AgateLib.Geometry.Point((int)point.X, (int)point.Y); - } - - public static SharpDX.Color4 ToColor4(this AgateLib.Geometry.Color color) - { - var retval = new Color4(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f); - - return retval; - } - } -} Copied: trunk/AgateLib.Platform.WindowsPhone/Interop.cs (from rev 1478, trunk/AgateLib.Platform.WindowsPhone/Interop.cs) =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Interop.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone/Interop.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,24 @@ +using SharpDX; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Platform.WindowsPhone +{ + public static class Interop + { + public static AgateLib.Geometry.Size ToAgateSize(this System.Windows.Size size) + { + return new Geometry.Size( + (int)size.Width, + (int)size.Height); + } + + public static AgateLib.Geometry.Point ToAgatePoint(this System.Windows.Point point) + { + return new AgateLib.Geometry.Point((int)point.X, (int)point.Y); + } + } +} Added: trunk/AgateLib.Platform.WindowsPhone/SwapChainBackgroundPanelAdapter.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/SwapChainBackgroundPanelAdapter.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone/SwapChainBackgroundPanelAdapter.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Windows.UI.Xaml.Controls; + +namespace AgateLib.Platform.WindowsStoreCommon +{ + public class SwapChainBackgroundPanelAdapter : IRenderTargetAdapter + { + SwapChainBackgroundPanel mRenderTarget; + + public SwapChainBackgroundPanelAdapter(SwapChainBackgroundPanel renderTarget) + { + mRenderTarget = renderTarget; + } + + } +} Modified: trunk/AgateLib.Platform.WindowsPhone/packages.config =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-08-27 01:19:58 UTC (rev 1480) +++ trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-08-27 07:22:57 UTC (rev 1481) @@ -4,6 +4,4 @@ <package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="wp80" /> <package id="SharpDX.DXGI" version="2.6.2" targetFramework="wp80" /> <package id="SharpDX.SimpleInitializer" version="1.0.0" targetFramework="wp80" /> - <package id="SharpDX.Toolkit" version="2.6.2" targetFramework="wp80" /> - <package id="SharpDX.Toolkit.Graphics" version="2.6.2" targetFramework="wp80" /> </packages> \ No newline at end of file Index: trunk/AgateLib.Platform.WindowsPhone8 =================================================================== --- trunk/AgateLib.Platform.WindowsPhone8 2014-08-27 01:19:58 UTC (rev 1480) +++ trunk/AgateLib.Platform.WindowsPhone8 2014-08-27 07:22:57 UTC (rev 1481) Property changes on: trunk/AgateLib.Platform.WindowsPhone8 ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,10 ## +[Bb]in +obj +[Dd]ebug +[Rr]elease +*.user +*.aps +*.eto +ClientBin +GeneratedArtifacts +_Pvt_Extensions Added: trunk/AgateLib.Platform.WindowsPhone8/AgateLib.Platform.WindowsPhone8.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsPhone8/AgateLib.Platform.WindowsPhone8.csproj (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone8/AgateLib.Platform.WindowsPhone8.csproj 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.30703</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{9BEF78DB-B535-47D3-9C14-453D373807EC}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AgateLib.Platform.WindowsPhone8</RootNamespace> + <AssemblyName>AgateLib.Platform.WindowsPhone8</AssemblyName> + <DefaultLanguage>en-US</DefaultLanguage> + <TargetPlatformVersion>8.1</TargetPlatformVersion> + <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <NuGetPackageImportStamp>792fbae6</NuGetPackageImportStamp> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</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;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\ARM\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants> + <NoWarn>;2008</NoWarn> + <DebugType>full</DebugType> + <PlatformTarget>ARM</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'"> + <OutputPath>bin\ARM\Release\</OutputPath> + <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants> + <Optimize>true</Optimize> + <NoWarn>;2008</NoWarn> + <DebugType>pdbonly</DebugType> + <PlatformTarget>ARM</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants> + <NoWarn>;2008</NoWarn> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> + <OutputPath>bin\x86\Release\</OutputPath> + <DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants> + <Optimize>true</Optimize> + <NoWarn>;2008</NoWarn> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <ItemGroup> + <!-- A reference to the entire .Net Framework and Windows SDK are automatically included --> + <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj"> + <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project> + <Name>AgateLib.Platform.Common</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib.Platform.WindowsStoreCommon\AgateLib.Platform.WindowsStoreCommon.csproj"> + <Project>{c7f9ae34-b781-4490-a9b2-5728f44f3523}</Project> + <Name>AgateLib.Platform.WindowsStoreCommon</Name> + </ProjectReference> + <ProjectReference Include="..\AgateLib\AgateLib.csproj"> + <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> + <Name>AgateLib</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Compile Include="ApplicationModels\SceneModel.cs" /> + <Compile Include="ApplicationModels\SceneModelParameters.cs" /> + <Compile Include="Factories\WindowsPhoneFactory.cs" /> + <Compile Include="Factories\WPPlatformFactory.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="WindowsPhoneInitializer.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <Reference Include="SharpDX"> + <HintPath>$(SharpDXPackageBinDir)\SharpDX.dll</HintPath> + </Reference> + <Reference Include="SharpDX.Direct3D11"> + <HintPath>$(SharpDXPackageBinDir)\SharpDX.Direct3D11.dll</HintPath> + </Reference> + <Reference Include="SharpDX.DXGI"> + <HintPath>$(SharpDXPackageBinDir)\SharpDX.DXGI.dll</HintPath> + </Reference> + <Reference Include="SharpDX.SimpleInitializer"> + <HintPath>..\packages\SharpDX.SimpleInitializer.1.0.0\lib\portable-netcore451+wpa81\SharpDX.SimpleInitializer.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup /> + <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' "> + <VisualStudioVersion>12.0</VisualStudioVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == '' "> + <TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier> + </PropertyGroup> + <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" /> + <Import Project="..\packages\SharpDX.2.6.2\build\SharpDX.targets" Condition="Exists('..\packages\SharpDX.2.6.2\build\SharpDX.targets')" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\packages\SharpDX.2.6.2\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.2.6.2\build\SharpDX.targets'))" /> + </Target> + <!-- 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> \ No newline at end of file Deleted: trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModel.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -1,55 +0,0 @@ -using AgateLib.ApplicationModels; -using AgateLib.DisplayLib; -using SharpDX.SimpleInitializer; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.Platform.WindowsPhone.ApplicationModels -{ - public class SceneModel : SceneAppModelBase - { - SharpDXContext context; - - public SceneModel(SceneModelParameters parameters) - : base(parameters) - { } - - public new SceneModelParameters Parameters { get { return (SceneModelParameters)base.Parameters; } } - - protected override void BeginModel() - { - } - - protected override void InitializeImpl() - { - context = new SharpDXContext(); - context.Render += context_Render; - context.BindToControl(Parameters.RenderTarget); - - WindowsPhoneInitializer.Initialize(context, Parameters.RenderTarget); - } - - void context_Render(object sender, EventArgs e) - { - foreach (var sc in SceneStack.UpdateScenes) - sc.Update(Display.DeltaTime); - - Display.BeginFrame(); - - foreach (var sc in SceneStack.DrawScenes) - sc.Draw(); - - Display.EndFrame(); - - Core.KeepAlive(); - } - - public override void KeepAlive() - { - base.KeepAlive(); - } - } -} Copied: trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModel.cs (from rev 1478, trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs) =================================================================== --- trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModel.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModel.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -0,0 +1,68 @@ +using AgateLib.ApplicationModels; +using AgateLib.DisplayLib; +using AgateLib.Platform.WindowsStoreCommon; +using SharpDX.SimpleInitializer; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.Platform.WindowsPhone8.ApplicationModels +{ + public class SceneModel : SceneAppModelBase + { + SharpDXContext context; + + public SceneModel(SceneModelParameters parameters) + : base(parameters) + { } + + public new SceneModelParameters Parameters { get { return (SceneModelParameters)base.Parameters; } } + + protected override void BeginModel() + { + } + + protected override void InitializeImpl() + { + context = new SharpDXContext(); + context.Render += context_Render; + context.DeviceReset += context_DeviceReset; + + var adapter = (SwapChainBackgroundPanelAdapter)Parameters.RenderTarget; + + WindowsPhoneInitializer.Initialize(context, Parameters.RenderTarget, Parameters.AssetLocations); + + context.BindToControl(adapter.RenderTarget); + } + + void context_DeviceReset(object sender, DeviceResetEventArgs e) + { + if (sceneToStartWith != null) + { + SceneStack.Add(sceneToStartWith); + sceneToStartWith = null; + } + } + + void context_Render(object sender, EventArgs e) + { + foreach (var sc in SceneStack.UpdateScenes) + sc.Update(Display.DeltaTime); + + Display.BeginFrame(); + + foreach (var sc in SceneStack.DrawScenes) + sc.Draw(); + + Display.EndFrame(); + Core.KeepAlive(); + } + + public override void KeepAlive() + { + base.KeepAlive(); + } + } +} Modified: trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModelParameters.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModelParameters.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone8/ApplicationModels/SceneModelParameters.cs 2014-08-27 07:22:57 UTC (rev 1481) @@ -1,20 +1,20 @@ using AgateLib.ApplicationModels; +using AgateLib.Platform.WindowsStoreCommon; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Controls; -namespace AgateLib.Platform.WindowsPhone.ApplicationModels +namespace AgateLib.Platform.WindowsPhone8.ApplicationModels { public class SceneModelParameters : ModelParameters { - public SceneModelParameters(DrawingSurfaceBackgroundGrid renderTarget) + public SceneModelParameters(IRenderTargetAdapter renderTarget) { this.RenderTarget = renderTarget; } - public DrawingSurfaceBackgroundGrid RenderTarget { get; set; } + public IRenderTargetAdapter RenderTarget { get; set; } } } Copied: trunk/AgateLib.Platform.WindowsPhone8/Factories/WPPlatformFactory.cs (from rev 1478, tru... [truncated message content] |
From: <ka...@us...> - 2014-08-27 01:20:07
|
Revision: 1480 http://sourceforge.net/p/agate/code/1480 Author: kanato Date: 2014-08-27 01:19:58 +0000 (Wed, 27 Aug 2014) Log Message: ----------- Initial attempt at implementing surface drawing on WP. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs trunk/AgateLib/DisplayLib/IndexBuffer.cs trunk/AgateLib/DisplayLib/VertexBuffer.cs trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj trunk/AgateLib.GL/AgateLib.GL.csproj trunk/AgateLib.GL/GL3/GLVertexBuffer.cs trunk/AgateLib.GL/GL_IndexBuffer.cs trunk/AgateLib.GL/Legacy/LegacyVertexBuffer.cs trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_IndexBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs trunk/AgateLib.Platform.WindowsPhone/Resources/Basic2Dpixel.fxo trunk/AgateLib.Platform.WindowsPhone/Resources/Basic2Dvert.fxo trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dpixel.hlsl trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dvert.hlsl trunk/Tests.WindowsPhone/TestScene.cs trunk/Tests.WindowsPhone/Tests.WindowsPhone.csproj trunk/UnitTests/UnitTests.csproj Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib/AgateLib.csproj 2014-08-27 01:19:58 UTC (rev 1480) @@ -25,6 +25,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <RunCodeAnalysis>false</RunCodeAnalysis> + <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> Modified: trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -27,9 +27,14 @@ /// <summary> /// Base class for implementing a hardware stored index buffer. /// </summary> - public abstract class IndexBufferImpl + public abstract class IndexBufferImpl : IDisposable { /// <summary> + /// Disposes of the buffer. + /// </summary> + public abstract void Dispose(); + + /// <summary> /// Writes indices to the index buffer. /// </summary> /// <param name="indices"></param> Modified: trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -28,7 +28,7 @@ /// <summary> /// Class for implementing a vertex buffer stored in hardware memory. /// </summary> - public abstract class VertexBufferImpl + public abstract class VertexBufferImpl : IDisposable { /// <summary> /// Constructs a vertex buffer implementation. @@ -39,6 +39,11 @@ } /// <summary> + /// Disposes of the buffer. + /// </summary> + public abstract void Dispose(); + + /// <summary> /// Writes vertices to the vertex buffer. /// </summary> /// <typeparam name="T">The type of vertices in the buffer. This type must be a struct, and may not @@ -80,5 +85,6 @@ /// Gets the vertex layout which is used to interpret the data in the vertex buffer. /// </summary> public abstract VertexLayout VertexLayout { get; } + } } Modified: trunk/AgateLib/DisplayLib/IndexBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/IndexBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib/DisplayLib/IndexBuffer.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -29,7 +29,7 @@ /// used to reduce the amount of vertex data that needs to be stored/sent to the /// graphics adapter. /// </summary> - public class IndexBuffer + public class IndexBuffer : IDisposable { IndexBufferImpl impl; @@ -44,6 +44,14 @@ } /// <summary> + /// Disposes of the buffer. + /// </summary> + public void Dispose() + { + impl.Dispose(); + } + + /// <summary> /// Writes indices to the index buffer. /// </summary> /// <param name="indices">The indices to write.</param> Modified: trunk/AgateLib/DisplayLib/VertexBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/VertexBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib/DisplayLib/VertexBuffer.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -29,7 +29,7 @@ /// <summary> /// Class which represents a vertex buffer in memory. /// </summary> - public sealed class VertexBuffer + public sealed class VertexBuffer : IDisposable { VertexBufferImpl impl; @@ -54,6 +54,14 @@ } /// <summary> + /// Disposes of the buffer. + /// </summary> + public void Dispose() + { + impl.Dispose(); + } + + /// <summary> /// Writes data to the vertex buffer. /// </summary> /// <typeparam name="T">Type of the vertex data. This must be a struct type, and it Modified: trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj =================================================================== --- trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.AgateSDL/AgateLib.AgateSDL.csproj 2014-08-27 01:19:58 UTC (rev 1480) @@ -60,6 +60,7 @@ <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <OutputPath>bin\x86\Release\</OutputPath> Modified: trunk/AgateLib.GL/AgateLib.GL.csproj =================================================================== --- trunk/AgateLib.GL/AgateLib.GL.csproj 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.GL/AgateLib.GL.csproj 2014-08-27 01:19:58 UTC (rev 1480) @@ -41,6 +41,7 @@ <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <OutputPath>bin\x86\Release\</OutputPath> Modified: trunk/AgateLib.GL/GL3/GLVertexBuffer.cs =================================================================== --- trunk/AgateLib.GL/GL3/GLVertexBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.GL/GL3/GLVertexBuffer.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -66,8 +66,13 @@ } - public override void Write<T>(T[] vertices) + public override void Dispose() { + GL.DeleteBuffer(mVertexBufferID); + } + + public override void Write<T>(T[] vertices) + { GL.BindBuffer(BufferTarget.ArrayBuffer, mVertexBufferID); int size = vertices.Length * Marshal.SizeOf(typeof(T)); @@ -106,7 +111,7 @@ } public override void DrawIndexed(IndexBuffer indexbuffer, int start, int count) { - GL_IndexBuffer gl_indexbuffer = (GL_IndexBuffer) indexbuffer.Impl; + GL_IndexBuffer gl_indexbuffer = (GL_IndexBuffer)indexbuffer.Impl; GL.BindBuffer(BufferTarget.ElementArrayBuffer, gl_indexbuffer.BufferID); GL.IndexPointer(IndexPointerType.Short, 0, start); @@ -161,8 +166,8 @@ if (HasNormals) { GL.EnableClientState(EnableCap.NormalArray); - GL.NormalPointer(NormalPointerType.Float, mLayout.VertexSize, - (IntPtr) mLayout.ElementByteIndex(VertexElement.Normal)); + GL.NormalPointer(NormalPointerType.Float, mLayout.VertexSize, + (IntPtr)mLayout.ElementByteIndex(VertexElement.Normal)); } else { @@ -195,7 +200,7 @@ (IntPtr)mLayout.ElementByteIndex(VertexElement.Texture)); } - + //GlslShader shader = Display.Shader as GlslShader; if (Textures.ActiveTextures > 1) Modified: trunk/AgateLib.GL/GL_IndexBuffer.cs =================================================================== --- trunk/AgateLib.GL/GL_IndexBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.GL/GL_IndexBuffer.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -46,6 +46,11 @@ System.Diagnostics.Debug.Print("Created {0} index buffer.", type); } + public override void Dispose() + { + GL.DeleteBuffer(mBufferID); + } + private void CreateBuffer() { GL.GenBuffers(1, out mBufferID); Modified: trunk/AgateLib.GL/Legacy/LegacyVertexBuffer.cs =================================================================== --- trunk/AgateLib.GL/Legacy/LegacyVertexBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.GL/Legacy/LegacyVertexBuffer.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -62,6 +62,11 @@ } + public override void Dispose() + { + GL.DeleteBuffer(mVertexBufferID); + } + public override void Write<T>(T[] vertices) { GL.BindBuffer(BufferTarget.ArrayBuffer, mVertexBufferID); Modified: trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj =================================================================== --- trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj 2014-08-27 01:19:58 UTC (rev 1480) @@ -24,6 +24,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> Modified: trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-27 01:19:58 UTC (rev 1480) @@ -41,6 +41,7 @@ <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <OutputPath>bin\x86\Release\</OutputPath> Modified: trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-27 01:19:58 UTC (rev 1480) @@ -51,6 +51,7 @@ <NoConfig>true</NoConfig> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <DebugType>pdbonly</DebugType> Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -60,7 +60,7 @@ mWorld2D = Matrix.Identity; - mDrawBuffer = new DrawBuffer(this); + mDrawBuffer = new DrawBuffer(this, context); } Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -23,7 +23,8 @@ using AgateLib.DisplayLib; using AgateLib.Geometry.VertexTypes; using Texture2D = SharpDX.Direct3D11.Texture2D; -using SharpDX.Toolkit.Graphics; +using SharpDX.Direct3D11; +using SharpDX.SimpleInitializer; namespace AgateLib.Platform.WindowsPhone.DisplayImplementation { @@ -36,8 +37,8 @@ const int vertPageSize = 1000; int pages = 1; + SharpDXContext mContext; D3DDevice mDevice; - BasicEffect mEffect; PositionTextureColor[] mVerts; short[] mIndices; @@ -46,29 +47,92 @@ int mIndexPointer = 0; Texture2D mTexture; + ShaderResourceView mTextureView; bool mAlphaBlend; - public DrawBuffer(D3DDevice device) + SharpDX.Direct3D11.Buffer mVertexBuffer; + SharpDX.Direct3D11.Buffer mIndexBuffer; + SharpDX.Direct3D11.InputLayout mVertexLayout; + VertexBufferBinding mVertexBinding; + + public DrawBuffer(D3DDevice device, SharpDXContext context) { + mContext = context; mDevice = device; - mEffect = mDevice.Effect; + mContext.DeviceReset += Context_DeviceReset; + AllocateVerts(); + + } + void Context_DeviceReset(object sender, SharpDX.SimpleInitializer.DeviceResetEventArgs e) + { + AllocateHardwareResources(); + } + + public void AllocateHardwareResources() + { + if (mDevice.Device == null) + return; + + if (mVertexLayout != null) + { + mVertexLayout.Dispose(); + mVertexBuffer.Dispose(); + mIndexBuffer.Dispose(); + } + + mVertexLayout = new SharpDX.Direct3D11.InputLayout( + mDevice.Device, (byte[])Shaders.ShaderResources.ResourceManager.GetObject("Basic2Dvert"), + new[] { + new SharpDX.Direct3D11.InputElement("POSITION", 0, SharpDX.DXGI.Format.R32G32B32A32_Float, 0, 0), + new SharpDX.Direct3D11.InputElement("TEXCOORD", 0, SharpDX.DXGI.Format.R32G32_Float, 16, 0), + new SharpDX.Direct3D11.InputElement("COLOR", 0, SharpDX.DXGI.Format.R8G8B8A8_UInt, 0) + }); + + var layout = PositionTextureColor.VertexLayout; + + mVertexBuffer = new SharpDX.Direct3D11.Buffer( + mDevice.Device, + new BufferDescription(mVerts.Length * layout.VertexSize, + ResourceUsage.Dynamic, + BindFlags.VertexBuffer, + CpuAccessFlags.Write, + ResourceOptionFlags.None, + layout.VertexSize)); + + mIndexBuffer = new SharpDX.Direct3D11.Buffer( + mDevice.Device, + new BufferDescription(mIndices.Length * 2, + ResourceUsage.Dynamic, + BindFlags.IndexBuffer, + CpuAccessFlags.Write, + ResourceOptionFlags.None, + 2)); + + mVertexBinding = new VertexBufferBinding(mVertexBuffer, layout.VertexSize, 0); + } + private void AllocateVerts() { mVerts = new PositionTextureColor[vertPageSize * pages]; mIndices = new short[vertPageSize / 2 * 3 * pages]; + + AllocateHardwareResources(); } - public void CacheDrawIndexedTriangles(PositionTextureColor[] verts, short[] indices, - Texture2D texture, bool alphaBlend) + + public void CacheDrawIndexedTriangles( + PositionTextureColor[] verts, short[] indices, + Texture2D texture, ShaderResourceView textureView, bool alphaBlend) { if (mTexture != texture || mAlphaBlend != alphaBlend) { Flush(); mTexture = texture; + mTextureView = textureView; mAlphaBlend = alphaBlend; } @@ -117,8 +181,18 @@ private void DoDraw(object ignored) { - throw new NotImplementedException(); + //mDevice.DeviceContext.OutputMerger.SetTargets(this.parentContext.DepthStencilView, this.parentContext.BackBufferView); + mDevice.DeviceContext.UpdateSubresource(mVerts, mVertexBuffer); + mDevice.DeviceContext.UpdateSubresource(mIndices, mIndexBuffer); + + mDevice.DeviceContext.InputAssembler.SetVertexBuffers(0, mVertexBinding); + mDevice.DeviceContext.InputAssembler.SetIndexBuffer(mIndexBuffer, SharpDX.DXGI.Format.R16_UInt, 0); + mDevice.DeviceContext.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleList; + + mDevice.DeviceContext.PixelShader.SetShaderResource(0, mTextureView); + mDevice.DeviceContext.DrawIndexed(mIndexPointer, 0, 0); + try { //mDevice.Device.DrawIndexedUserPrimitives Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -94,6 +94,11 @@ //mDisplay.D3D_Device.Device.SetRenderTarget(0, mBackBuffer); //mDisplay.D3D_Device.Device.DepthStencilSurface = mBackDepthStencil; //mDisplay.D3D_Device.Device.BeginScene(); + + mContext.D3DContext.OutputMerger.SetTargets( + mContext.DepthStencilView, + mContext.BackBufferView); + } public override void EndRender() Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -89,7 +89,6 @@ this.sdxContext = context; this.mRenderControl = renderTarget; - mDevice = new D3DDevice(context); context.DeviceReset += context_DeviceReset; } @@ -100,6 +99,8 @@ public override void Initialize() { + mDevice = new D3DDevice(sdxContext); + Report("SharpDX driver instantiated for display."); } Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_IndexBuffer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_IndexBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_IndexBuffer.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -43,6 +43,11 @@ CreateIndexBuffer(); } + public override void Dispose() + { + mBuffer.Dispose(); + } + public SharpDX.Direct3D11.Buffer DeviceIndexBuffer { get { return mBuffer; } Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -47,6 +47,7 @@ SharpDX.Toolkit.Graphics.GraphicsDevice mGraphicsDevice { get { return mDevice.GraphicsDevice; } } Ref<Texture2D> mTexture; + SharpDX.Direct3D11.ShaderResourceView mTextureView; string mFileName; @@ -59,7 +60,6 @@ PositionTextureColor[] mExtraVerts = new PositionTextureColor[4]; short[] mExtraIndices = new short[] { 0, 2, 1, 1, 2, 3 }; - private SharpDX.Direct3D11.ShaderResourceView mTextureView; #endregion @@ -67,6 +67,10 @@ { get { return mTexture.Value; } } + public SharpDX.Direct3D11.ShaderResourceView TextureView + { + get { return mTextureView; } + } #region --- TextureCoordinates structure --- @@ -272,6 +276,11 @@ } private void Draw(SurfaceState state, SurfaceDrawInstance inst) { + if (SurfaceSize.IsEmpty) + { + InitializeValues(); + } + float destX = inst.DestLocation.X; float destY = inst.DestLocation.Y; Rectangle srcRect = inst.GetSourceRect(SurfaceSize); @@ -307,9 +316,16 @@ rotationCenter.X, rotationCenter.Y, state.DisplayAlignment, mRotationCos, mRotationSin); - mDevice.DrawBuffer.CacheDrawIndexedTriangles(mVerts, mIndices, mTexture.Value, alphaBlend); + mDevice.DrawBuffer.CacheDrawIndexedTriangles(mVerts, mIndices, + mTexture.Value, mTextureView, alphaBlend); } + private void InitializeValues() + { + mTextureSize = new Size( mTexture.Value.Description.Width, mTexture.Value.Description.Height); + mSrcRect = new Rectangle(Point.Empty, mTextureSize); + } + private void SetVertsTextureCoordinates(PositionTextureColor[] verts, int startIndex, Rectangle srcRect) { Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -35,7 +35,6 @@ SharpDX.Direct3D11.Buffer mBuffer; int mCount; VertexLayout mLayout; - DataStream mStream; public SDX_VertexBuffer(SDX_Display display, VertexLayout layout, int vertexCount) { @@ -58,6 +57,11 @@ //mStream = display.D3D_Device.DeviceContext. mBuffer.Map } + public override void Dispose() + { + mBuffer.Dispose(); + } + public override VertexLayout VertexLayout { get { return mLayout; } Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -38,6 +38,8 @@ PixelShader mPixelShader; SharpDX.Direct3D11.Buffer mConstantBuffer; + SamplerState mSampler; + public SDX_Basic2DShader() { mDisplay = (SDX_Display)DisplayLib.Display.Impl; @@ -63,6 +65,29 @@ mVertexShader = new VertexShader(mDevice.Device, vs); mPixelShader = new PixelShader(mDevice.Device, ps); + + mConstantBuffer = new SharpDX.Direct3D11.Buffer( + mDevice.Device, + SharpDX.Utilities.SizeOf<SharpDX.Matrix>(), + ResourceUsage.Default, + BindFlags.ConstantBuffer, + CpuAccessFlags.None, + ResourceOptionFlags.None, + 0); + + mSampler = new SamplerState(mDevice.Device, new SamplerStateDescription() + { + Filter = Filter.MinMagMipLinear, + AddressU = TextureAddressMode.Wrap, + AddressV = TextureAddressMode.Wrap, + AddressW = TextureAddressMode.Wrap, + BorderColor = SharpDX.Color.Black, + ComparisonFunction = Comparison.Never, + MaximumAnisotropy = 16, + MipLodBias = 0, + MinimumLod = -float.MaxValue, + MaximumLod = float.MaxValue + }); } public override AgateLib.Geometry.Rectangle CoordinateSystem @@ -102,6 +127,7 @@ SharpDX.Matrix orthoProj = SharpDX.Matrix.OrthoOffCenterRH( mCoords.Left, mCoords.Right, mCoords.Bottom, mCoords.Top, -1, 1); + mDevice.DeviceContext.UpdateSubresource(ref orthoProj, mConstantBuffer, 0); //// TODO: figure out why this method sometimes gets called when mDevice is null? //if (mDevice != null) //{ @@ -118,6 +144,12 @@ public override void Begin() { + mDevice.DeviceContext.VertexShader.SetConstantBuffer(0, mConstantBuffer); + mDevice.DeviceContext.VertexShader.Set(mVertexShader); + + mDevice.DeviceContext.PixelShader.Set(mPixelShader); + mDevice.DeviceContext.PixelShader.SetSampler(0, mSampler); + //SDX_Display mDisplay = (SDX_Display)AgateLib.DisplayLib.Display.Impl; //Set2DDrawState(); Modified: trunk/AgateLib.Platform.WindowsPhone/Resources/Basic2Dpixel.fxo =================================================================== (Binary files differ) Modified: trunk/AgateLib.Platform.WindowsPhone/Resources/Basic2Dvert.fxo =================================================================== (Binary files differ) Modified: trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dpixel.hlsl =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dpixel.hlsl 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dpixel.hlsl 2014-08-27 01:19:58 UTC (rev 1480) @@ -20,7 +20,6 @@ { float4 position : SV_POSITION; float2 tex : TEXCOORD0; - float3 normal : NORMAL; float4 color : COLOR; }; @@ -30,6 +29,8 @@ //////////////////////////////////////////////////////////////////////////////// float4 PixelShaderMain(PixelInputType input) : SV_TARGET { + return float4(0, 0, 0, 1); + float4 textureColor; float3 lightDir; float lightIntensity; @@ -42,7 +43,7 @@ lightDir = -lightDirection; // Calculate the amount of light on this pixel. - lightIntensity = saturate(dot(input.normal, lightDir)); + lightIntensity = saturate(lightDir.z); // Determine the final amount of diffuse color based on the diffuse color combined with the light intensity. color = saturate(diffuseColor * lightIntensity); Modified: trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dvert.hlsl =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dvert.hlsl 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dvert.hlsl 2014-08-27 01:19:58 UTC (rev 1480) @@ -12,7 +12,6 @@ { float4 position : POSITION; float2 tex : TEXCOORD0; - float3 normal : NORMAL; float4 color : COLOR0; }; @@ -20,7 +19,6 @@ { float4 position : SV_POSITION; float2 tex : TEXCOORD0; - float3 normal : NORMAL; float4 color : COLOR; }; @@ -41,12 +39,6 @@ // Store the texture coordinates for the pixel shader. output.tex = input.tex; - // No separate world transformation for 2D - output.normal = input.normal; - - // Normalize the normal vector. - output.normal = normalize(output.normal); - output.color = input.color; return output; Modified: trunk/Tests.WindowsPhone/TestScene.cs =================================================================== --- trunk/Tests.WindowsPhone/TestScene.cs 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/Tests.WindowsPhone/TestScene.cs 2014-08-27 01:19:58 UTC (rev 1480) @@ -30,6 +30,10 @@ public override void Draw() { Display.Clear(clr); + + int pos = (int)(time * 100); + + image.Draw(pos % 100, pos % 200); } } } Modified: trunk/Tests.WindowsPhone/Tests.WindowsPhone.csproj =================================================================== --- trunk/Tests.WindowsPhone/Tests.WindowsPhone.csproj 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/Tests.WindowsPhone/Tests.WindowsPhone.csproj 2014-08-27 01:19:58 UTC (rev 1480) @@ -57,6 +57,7 @@ <NoConfig>true</NoConfig> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <DebugType>pdbonly</DebugType> Modified: trunk/UnitTests/UnitTests.csproj =================================================================== --- trunk/UnitTests/UnitTests.csproj 2014-08-24 19:04:33 UTC (rev 1479) +++ trunk/UnitTests/UnitTests.csproj 2014-08-27 01:19:58 UTC (rev 1480) @@ -61,6 +61,7 @@ <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <OutputPath>bin\x86\Release\</OutputPath> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-24 19:04:45
|
Revision: 1479 http://sourceforge.net/p/agate/code/1479 Author: kanato Date: 2014-08-24 19:04:33 +0000 (Sun, 24 Aug 2014) Log Message: ----------- Loading of basic 2d shader works properly. Modified Paths: -------------- trunk/AgateLib/AgateGame.cs trunk/AgateLib/AgateLib.csproj trunk/AgateLib/ApplicationModels/AgateAppModel.cs trunk/AgateLib/ApplicationModels/ModelParameters.cs trunk/AgateLib/Diagnostics/AgateConsole.cs trunk/AgateLib/DisplayLib/CreateWindowParams.cs trunk/AgateLib/DisplayLib/Display.cs trunk/AgateLib/DisplayLib/DisplayWindow.cs trunk/AgateLib/DisplayLib/FrameBuffer.cs trunk/AgateLib/DisplayLib/IFrameBuffer.cs trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs trunk/AgateLib.GL/ContextFB.cs trunk/AgateLib.GL/GL3/FrameBuffer.cs trunk/AgateLib.GL/GL_FrameBuffer.cs trunk/AgateLib.GL/Legacy/FrameBufferExt.cs trunk/AgateLib.GL/Legacy/FrameBufferReadPixels.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferSurface.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_DisplayWindow.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_FrameBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderFactory.cs trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs trunk/Tests/AudioTests/SoundbufferStopTester.cs trunk/Tests/DisplayTests/PixelBufferTest/PixelBufferTest.cs trunk/Tests/DisplayTests/SpriteTester/frmSpriteTester.cs trunk/Tests/DisplayTests/SurfaceTester/frmSurfaceTester.cs trunk/Tests/InputTests/Input/frmInputTester.cs trunk/UnitTests/ApplicationModels/CoordinateSystemTest.cs trunk/UnitTests/Display/DisplayWindowTest.cs trunk/UnitTests/Fakes/FakeFrameBuffer.cs Added Paths: ----------- trunk/AgateLib/Geometry/CoordinateSystems/ trunk/AgateLib/Geometry/CoordinateSystems/NativeCoordinates.cs trunk/AgateLib/Geometry/ICoordinateSystemCreator.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Lighting3DShader.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderResources.Designer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderResources.resx trunk/AgateLib.Platform.WindowsPhone/Resources/ trunk/AgateLib.Platform.WindowsPhone/Resources/Basic2Dpixel.fxo trunk/AgateLib.Platform.WindowsPhone/Resources/Basic2Dvert.fxo trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/ trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dpixel.hlsl trunk/AgateLib.Platform.WindowsPhone/Resources/ShaderSource/Basic2Dvert.hlsl trunk/AgateLib.Platform.WindowsPhone/Resources/buildshaders.bat trunk/AgateLib.Platform.WindowsPhone/Resources/fxc.bat Removed Paths: ------------- trunk/AgateLib/ApplicationModels/CoordinateSystems/ trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs trunk/AgateLib/Geometry/CoordinateSystems/NaturalCoordinates.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDL_Lighting3DShader.cs Modified: trunk/AgateLib/AgateGame.cs =================================================================== --- trunk/AgateLib/AgateGame.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/AgateGame.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -153,7 +153,7 @@ if (FullScreen) { windp = CreateWindowParams.FullScreen(ApplicationTitle, - WindowSize.Width, WindowSize.Height, 32); + WindowSize.Width, WindowSize.Height, 32, null); windp.IconFile = InitParams.IconFile; } @@ -161,7 +161,7 @@ { windp = CreateWindowParams.Windowed(ApplicationTitle, WindowSize.Width, WindowSize.Height, - InitParams.AllowResize, InitParams.IconFile); + InitParams.AllowResize, InitParams.IconFile, null); } mWindow = new DisplayWindow(windp); Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/AgateLib.csproj 2014-08-24 19:04:33 UTC (rev 1479) @@ -48,7 +48,7 @@ <Compile Include="Algorithms\PathFinding\AStarNode.cs" /> <Compile Include="Algorithms\PathFinding\AStarState.cs" /> <Compile Include="Algorithms\Inverting.cs" /> - <Compile Include="ApplicationModels\CoordinateSystems\NaturalCoordinates.cs" /> + <Compile Include="Geometry\CoordinateSystems\NativeCoordinates.cs" /> <Compile Include="ApplicationModels\EntryPointAppModelBase.cs" /> <Compile Include="ApplicationModels\Scene.cs" /> <Compile Include="ApplicationModels\SceneAppModelBase.cs" /> @@ -65,8 +65,8 @@ </Compile> <Compile Include="ApplicationModels\AgateAppModel.cs" /> <Compile Include="ApplicationModels\AssetLocations.cs" /> - <Compile Include="ApplicationModels\CoordinateSystems\FixedAspectRatioCoordinates.cs" /> - <Compile Include="ApplicationModels\ICoordinateSystemCreator.cs" /> + <Compile Include="Geometry\CoordinateSystems\FixedAspectRatioCoordinates.cs" /> + <Compile Include="Geometry\ICoordinateSystemCreator.cs" /> <Compile Include="ApplicationModels\ModelParameters.cs" /> <Compile Include="Resources\DC\AgateResource.cs" /> <Compile Include="Resources\DC\FontResource.cs" /> Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs =================================================================== --- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -224,18 +224,17 @@ { window = DisplayWindow.CreateFullScreen( Parameters.ApplicationName, - GetFullScreenSize()); + GetFullScreenSize(), + Parameters.CoordinateSystem); } else { window = DisplayWindow.CreateWindowed( Parameters.ApplicationName, - GetWindowedScreenSize()); + GetWindowedScreenSize(), + Parameters.CoordinateSystem); } - window.FrameBuffer.CoordinateSystem = - Parameters.CoordinateSystem.DetermineCoordinateSystem(window.Size); - Display.RenderState.WaitForVerticalBlank = Parameters.VerticalSync; window.Closing += window_Closing; Deleted: trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs =================================================================== --- trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -1,39 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using AgateLib.Geometry; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AgateLib.ApplicationModels -{ - /// <summary> - /// Interface for classes which create a coordinate system for a given DisplayWindow size. - /// </summary> - public interface ICoordinateSystemCreator - { - /// <summary> - /// Returns the coordinate system given the size of the display window. - /// </summary> - /// <param name="displayWindowSize"></param> - /// <returns></returns> - Rectangle DetermineCoordinateSystem(Size displayWindowSize); - } -} Modified: trunk/AgateLib/ApplicationModels/ModelParameters.cs =================================================================== --- trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -16,8 +16,8 @@ // // Contributor(s): Erik Ylvisaker // -using AgateLib.ApplicationModels.CoordinateSystems; using AgateLib.Geometry; +using AgateLib.Geometry.CoordinateSystems; using AgateLib.Platform; using System; using System.Collections.Generic; @@ -39,7 +39,7 @@ public ModelParameters() { AssetLocations = new AssetLocations(); - CoordinateSystem = new NaturalCoordinates(); + CoordinateSystem = new NativeCoordinates(); AutoCreateDisplayWindow = true; CreateFullScreenWindow = true; Modified: trunk/AgateLib/Diagnostics/AgateConsole.cs =================================================================== --- trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -261,7 +261,7 @@ IsVisible = !IsVisible; args.Handled = true; - sInstance.mHeight = Display.RenderTarget.CoordinateSystem.Height * 5 / 12; + sInstance.mHeight = Display.CoordinateSystem.Height * 5 / 12; } else if (IsVisible) { Modified: trunk/AgateLib/DisplayLib/CreateWindowParams.cs =================================================================== --- trunk/AgateLib/DisplayLib/CreateWindowParams.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/DisplayLib/CreateWindowParams.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -22,6 +22,8 @@ using AgateLib.Geometry; using AgateLib.Utility; +using AgateLib.ApplicationModels; +using AgateLib.Geometry.CoordinateSystems; namespace AgateLib.DisplayLib { @@ -213,6 +215,12 @@ set { mRenderTarget = value; } } + /// <summary> + /// The object which will be used to set the coordinate system for the window + /// at the beginning of each frame. + /// </summary> + public ICoordinateSystemCreator Coordinates { get; set; } + #endregion #region --- Static creation methods --- @@ -221,13 +229,15 @@ /// Creates a CreateWindowParams object which describes rendering into a WinForms control. /// </summary> /// <param name="control"></param> + /// <param name="coordinates">Coordinate system creator object. May be null</param> /// <returns></returns> - public static CreateWindowParams FromControl(object control) + public static CreateWindowParams FromControl(object control, ICoordinateSystemCreator coordinates) { CreateWindowParams retval = new CreateWindowParams(); retval.RenderToControl = true; retval.RenderTarget = control; + retval.Coordinates = coordinates ?? new NativeCoordinates(); return retval; } @@ -239,8 +249,9 @@ /// <param name="width"></param> /// <param name="height"></param> /// <param name="bpp"></param> + /// <param name="coordinates">Coordinate system creator object. May be null</param> /// <returns></returns> - public static CreateWindowParams FullScreen(string title, int width, int height, int bpp) + public static CreateWindowParams FullScreen(string title, int width, int height, int bpp, ICoordinateSystemCreator coordinates) { CreateWindowParams retval = new CreateWindowParams(); @@ -249,6 +260,7 @@ retval.Width = width; retval.Height = height; retval.mBpp = bpp; + retval.Coordinates = coordinates ?? new NativeCoordinates(); return retval; } @@ -260,8 +272,9 @@ /// <param name="height"></param> /// <param name="iconFile"></param> /// <param name="allowResize"></param> + /// <param name="coordinates">Coordinate system creator object. May be null</param> /// <returns></returns> - public static CreateWindowParams Windowed(string title, int width, int height, bool allowResize, string iconFile) + public static CreateWindowParams Windowed(string title, int width, int height, bool allowResize, string iconFile, ICoordinateSystemCreator coordinates) { CreateWindowParams retval = new CreateWindowParams(); @@ -271,6 +284,7 @@ retval.IconFile = iconFile; retval.IsResizable = allowResize; retval.HasMaximize = allowResize; + retval.Coordinates = coordinates ?? new NativeCoordinates(); return retval; } @@ -282,8 +296,9 @@ /// <param name="title"></param> /// <param name="width"></param> /// <param name="height"></param> + /// <param name="coordinates">Coordinate system creator object. May be null</param> /// <returns></returns> - public static CreateWindowParams NoFrame(string title, int width, int height) + public static CreateWindowParams NoFrame(string title, int width, int height, ICoordinateSystemCreator coordinates) { CreateWindowParams retval = new CreateWindowParams(); @@ -292,10 +307,12 @@ retval.Height = height; retval.IsResizable = false; retval.HasFrame = false; + retval.Coordinates = coordinates ?? new NativeCoordinates(); return retval; } #endregion + } } Modified: trunk/AgateLib/DisplayLib/Display.cs =================================================================== --- trunk/AgateLib/DisplayLib/Display.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/DisplayLib/Display.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -189,11 +189,11 @@ } /// <summary> - /// Gets the coordinate system for the current render target. Equivalent to Display.RenderTarget.CoordinateSystem. + /// Gets the coordinate system for the current render target. /// </summary> public static Rectangle CoordinateSystem { - get { return RenderTarget.CoordinateSystem; } + get { return RenderTarget.CoordinateSystem.DetermineCoordinateSystem(RenderTarget.Size); } } /// <summary> @@ -288,7 +288,7 @@ sImpl.BeginFrame(); AgateBuiltInShaders.Basic2DShader.CoordinateSystem = - RenderTarget.CoordinateSystem; + RenderTarget.CoordinateSystem.DetermineCoordinateSystem(RenderTarget.Size); AgateBuiltInShaders.Basic2DShader.Activate(); sCurrentClipRect = new Rectangle(Point.Empty, RenderTarget.Size); Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs =================================================================== --- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -21,6 +21,7 @@ using System.Text; using AgateLib.Geometry; using AgateLib.DisplayLib.ImplementationBase; +using AgateLib.ApplicationModels; namespace AgateLib.DisplayLib { @@ -38,6 +39,7 @@ { DisplayWindowImpl mImpl; FrameBuffer mFrameBuffer; + ICoordinateSystemCreator mCoordinates; /// <summary> /// Constructs a DisplayWindow from a resource. @@ -56,14 +58,14 @@ if (disp.FullScreen) { CreateWindowParams par = CreateWindowParams.FullScreen( - disp.Title, disp.Size.Width, disp.Size.Height, disp.Bpp); + disp.Title, disp.Size.Width, disp.Size.Height, disp.Bpp, null); mImpl = Core.Factory.DisplayFactory.CreateDisplayWindow(this, par); } else { CreateWindowParams par = CreateWindowParams.Windowed( - disp.Title, disp.Size.Width, disp.Size.Height, disp.AllowResize, null); + disp.Title, disp.Size.Width, disp.Size.Height, disp.AllowResize, null, null); mImpl = Core.Factory.DisplayFactory.CreateDisplayWindow(this, par); } @@ -103,9 +105,9 @@ /// new DisplayWindow(CreateWindowParams.FromControl(control)).</remarks> /// <param name="control">Windows.Forms control which should be used as the /// render target.</param> - public static DisplayWindow CreateFromControl(object control) + public static DisplayWindow CreateFromControl(object control, ICoordinateSystemCreator coordinates = null) { - return new DisplayWindow(CreateWindowParams.FromControl(control)); + return new DisplayWindow(CreateWindowParams.FromControl(control, coordinates)); } /// <summary> /// Creates a DisplayWindow object which renders to the entire screen, setting @@ -115,9 +117,9 @@ /// <param name="width"></param> /// <param name="height"></param> /// <returns></returns> - public static DisplayWindow CreateFullScreen(string title, Size size) + public static DisplayWindow CreateFullScreen(string title, Size size, ICoordinateSystemCreator coordinates = null) { - return new DisplayWindow(CreateWindowParams.FullScreen(title, size.Width, size.Height, 32)); + return new DisplayWindow(CreateWindowParams.FullScreen(title, size.Width, size.Height, 32, coordinates)); } /// <summary> /// Creates a DisplayWindow object which renders to the entire screen, setting @@ -127,9 +129,9 @@ /// <param name="width"></param> /// <param name="height"></param> /// <returns></returns> - public static DisplayWindow CreateFullScreen(string title, int width, int height) + public static DisplayWindow CreateFullScreen(string title, int width, int height, ICoordinateSystemCreator coordinates = null) { - return new DisplayWindow(CreateWindowParams.FullScreen(title, width, height, 32)); + return new DisplayWindow(CreateWindowParams.FullScreen(title, width, height, 32, null)); } /// <summary> /// Creates a DisplayWindow object which generates a desktop window to render into. @@ -138,47 +140,22 @@ /// <param name="title"></param> /// <param name="size"></param> /// <returns></returns> - public static DisplayWindow CreateWindowed(string title, Size size) + public static DisplayWindow CreateWindowed(string title, Size size, ICoordinateSystemCreator coordinates = null) { - return DisplayWindow.CreateWindowed(title, size.Width, size.Height); + return DisplayWindow.CreateWindowed(title, size.Width, size.Height, false, null, coordinates); } /// <summary> /// Creates a DisplayWindow object which generates a desktop window to render into. - /// This overload creates a window which has the default icon and is not resizeable. /// </summary> /// <param name="title"></param> /// <param name="width"></param> /// <param name="height"></param> - /// <returns></returns> - public static DisplayWindow CreateWindowed(string title, int width, int height) - { - return DisplayWindow.CreateWindowed(title, width, height, false, null); - } - /// <summary> - /// Creates a DisplayWindow object which generates a desktop window to render into. - /// This overload creates a window which has the default icon and is not resizeable. - /// </summary> - /// <param name="title"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="allowResize"></param> - /// <returns></returns> - public static DisplayWindow CreateWindowed(string title, int width, int height, bool allowResize) - { - return DisplayWindow.CreateWindowed(title, width, height, allowResize, null); - } - /// <summary> - /// Creates a DisplayWindow object which generates a desktop window to render into. - /// </summary> - /// <param name="title"></param> - /// <param name="width"></param> - /// <param name="height"></param> /// <param name="iconFile"></param> /// <param name="allowResize"></param> /// <returns></returns> - public static DisplayWindow CreateWindowed(string title, int width, int height, bool allowResize, string iconFile) + public static DisplayWindow CreateWindowed(string title, int width, int height, bool allowResize = false, string iconFile = null, ICoordinateSystemCreator coordinates = null) { - return new DisplayWindow(CreateWindowParams.Windowed(title, width, height, allowResize, iconFile)); + return new DisplayWindow(CreateWindowParams.Windowed(title, width, height, allowResize, iconFile, null)); } /// <summary> /// Creates a DisplayWindow object which is a desktop window with no frame or @@ -188,9 +165,9 @@ /// <param name="width"></param> /// <param name="height"></param> /// <returns></returns> - public static DisplayWindow CreateNoFrame(string title, int width, int height) + public static DisplayWindow CreateNoFrame(string title, int width, int height, ICoordinateSystemCreator coordinates = null) { - return new DisplayWindow(CreateWindowParams.NoFrame(title, width, height)); + return new DisplayWindow(CreateWindowParams.NoFrame(title, width, height, null)); } #endregion @@ -352,7 +329,6 @@ add { mImpl.Closing += value; } remove { mImpl.Closing -= value; } } - } public delegate void CancelEventHandler(object sender, ref bool cancel); Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -21,7 +21,9 @@ using System.Linq; using System.Text; using AgateLib.Geometry; +using AgateLib.Geometry.CoordinateSystems; using AgateLib.DisplayLib.ImplementationBase; +using AgateLib.ApplicationModels; namespace AgateLib.DisplayLib { @@ -45,7 +47,7 @@ public FrameBuffer(Size size) { impl = Core.Factory.DisplayFactory.CreateFrameBuffer(size); - CoordinateSystem = new Rectangle(Point.Empty, size); + CoordinateSystem = new NativeCoordinates(); } /// <summary> /// Constructs a frame buffer to be used as a render target. FrameBuffers constructed @@ -64,7 +66,6 @@ internal FrameBuffer(FrameBufferImpl impl) { this.impl = impl; - CoordinateSystem = new Rectangle(Point.Empty, impl.Size); } /// <summary> /// Disposes of unmanaged resources. @@ -158,7 +159,7 @@ /// framebuffer as a render target, this coordinate system is automatically /// loaded. /// </summary> - public Rectangle CoordinateSystem + public ICoordinateSystemCreator CoordinateSystem { get { return Impl.CoordinateSystem; } set { Impl.CoordinateSystem = value; } Modified: trunk/AgateLib/DisplayLib/IFrameBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/IFrameBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/DisplayLib/IFrameBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -1,4 +1,5 @@ -using AgateLib.Geometry; +using AgateLib.ApplicationModels; +using AgateLib.Geometry; using System; namespace AgateLib.DisplayLib { @@ -25,6 +26,6 @@ /// <summary> /// Gets or sets the coordinate system for the render target. /// </summary> - Rectangle CoordinateSystem { get; set; } + ICoordinateSystemCreator CoordinateSystem { get; set; } } } Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -85,8 +85,10 @@ /// <summary> /// Gets or sets the mouse position within the render area. /// </summary> + [Obsolete("This is probably obsolete.")] public abstract Point MousePosition { get; set; } + [Obsolete("This is probably obsolete.")] protected void SetInternalMousePosition(AgateLib.Geometry.Point pt) { AgateLib.InputLib.Legacy.Mouse.SetStoredPosition(pt); @@ -147,15 +149,17 @@ /// <returns></returns> public Point PixelToLogicalCoords(Point point) { + var coords = FrameBuffer.CoordinateSystem.DetermineCoordinateSystem(FrameBuffer.Size); + double x = point.X / (double)Width; double y = point.Y / (double)Height; - + Point retval = new Point( - (int)(x * FrameBuffer.CoordinateSystem.Width), - (int)(y * FrameBuffer.CoordinateSystem.Height)); + (int)(x * coords.Width), + (int)(y * coords.Height)); - retval.X += FrameBuffer.CoordinateSystem.X; - retval.Y += FrameBuffer.CoordinateSystem.Y; + retval.X += coords.X; + retval.Y += coords.Y; return retval; } @@ -166,11 +170,13 @@ /// <returns></returns> public Point LogicalToPixelCoords(Point point) { - point.X -= FrameBuffer.CoordinateSystem.X; - point.Y -= FrameBuffer.CoordinateSystem.Y; + var coords = FrameBuffer.CoordinateSystem.DetermineCoordinateSystem(FrameBuffer.Size); - double x = point.X / (double)FrameBuffer.CoordinateSystem.Width; - double y = point.Y / (double)FrameBuffer.CoordinateSystem.Height; + point.X -= coords.X; + point.Y -= coords.Y; + + double x = point.X / (double)coords.Width; + double y = point.Y / (double)coords.Height; return new Point( (int)(x * Width), Modified: trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -21,6 +21,7 @@ using System.Linq; using System.Text; using AgateLib.Geometry; +using AgateLib.ApplicationModels; namespace AgateLib.DisplayLib.ImplementationBase { @@ -29,6 +30,11 @@ /// </summary> public abstract class FrameBufferImpl : IDisposable { + public FrameBufferImpl(ICoordinateSystemCreator coords) + { + this.CoordinateSystem = coords; + } + /// <summary> /// Disposes of the unmanaged resources. /// </summary> @@ -91,6 +97,6 @@ /// <summary> /// Gets or sets the coordinate system that is used to map 2d coordinates to pixels in the render target. /// </summary> - public virtual Rectangle CoordinateSystem { get; set; } + public virtual ICoordinateSystemCreator CoordinateSystem { get; set; } } } Modified: trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs =================================================================== --- trunk/AgateLib/ApplicationModels/CoordinateSystems/FixedAspectRatioCoordinates.cs 2014-08-23 20:11:39 UTC (rev 1475) +++ trunk/AgateLib/Geometry/CoordinateSystems/FixedAspectRatioCoordinates.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -22,7 +22,7 @@ using System.Linq; using System.Text; -namespace AgateLib.ApplicationModels.CoordinateSystems +namespace AgateLib.Geometry.CoordinateSystems { /// <summary> /// Constructs a coordinate system that gives a render area constrained to a Copied: trunk/AgateLib/Geometry/CoordinateSystems/NativeCoordinates.cs (from rev 1475, trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs) =================================================================== --- trunk/AgateLib/Geometry/CoordinateSystems/NativeCoordinates.cs (rev 0) +++ trunk/AgateLib/Geometry/CoordinateSystems/NativeCoordinates.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -0,0 +1,48 @@ +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Geometry.CoordinateSystems +{ + /// <summary> + /// Constructs a coordinate system which matches the pixels coordinates of the display window, + /// up to an optional maximum height and width. + /// </summary> + public class NativeCoordinates : ICoordinateSystemCreator + { + public Rectangle DetermineCoordinateSystem(Size displayWindowSize) + { + Rectangle retval = new Rectangle(Point.Empty, displayWindowSize); + + if (MaxSize != null) + { + retval.Width = Math.Min(retval.Width, MaxSize.Value.Width); + retval.Height = Math.Min(retval.Height, MaxSize.Value.Height); + } + + return retval; + } + + public Size? MaxSize { get; set; } + } +} Deleted: trunk/AgateLib/Geometry/CoordinateSystems/NaturalCoordinates.cs =================================================================== --- trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs 2014-08-23 20:11:39 UTC (rev 1475) +++ trunk/AgateLib/Geometry/CoordinateSystems/NaturalCoordinates.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -1,48 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using AgateLib.Geometry; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AgateLib.ApplicationModels.CoordinateSystems -{ - /// <summary> - /// Constructs a coordinate system which matches the pixels coordinates of the display window, - /// up to an optional maximum height and width. - /// </summary> - public class NaturalCoordinates : ICoordinateSystemCreator - { - public Rectangle DetermineCoordinateSystem(Size displayWindowSize) - { - Rectangle retval = new Rectangle(Point.Empty, displayWindowSize); - - if (MaxSize != null) - { - retval.Width = Math.Min(retval.Width, MaxSize.Value.Width); - retval.Height = Math.Min(retval.Height, MaxSize.Value.Height); - } - - return retval; - } - - public Size? MaxSize { get; set; } - } -} Copied: trunk/AgateLib/Geometry/ICoordinateSystemCreator.cs (from rev 1475, trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs) =================================================================== --- trunk/AgateLib/Geometry/ICoordinateSystemCreator.cs (rev 0) +++ trunk/AgateLib/Geometry/ICoordinateSystemCreator.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -0,0 +1,39 @@ +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Geometry +{ + /// <summary> + /// Interface for classes which create a coordinate system for a given DisplayWindow size. + /// </summary> + public interface ICoordinateSystemCreator + { + /// <summary> + /// Returns the coordinate system given the size of the display window. + /// </summary> + /// <param name="displayWindowSize"></param> + /// <returns></returns> + Rectangle DetermineCoordinateSystem(Size displayWindowSize); + } +} Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -38,7 +38,7 @@ } public void UpdateLayout(Gui gui) { - UpdateLayout(gui, Display.RenderTarget.CoordinateSystem.Size); + UpdateLayout(gui, Display.CoordinateSystem.Size); } public void UpdateLayout(Gui gui, Size renderTargetSize) { Modified: trunk/AgateLib.GL/ContextFB.cs =================================================================== --- trunk/AgateLib.GL/ContextFB.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.GL/ContextFB.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -40,7 +40,9 @@ public ContextFB(AgateLib.DisplayLib.DisplayWindow attachedWindow, GraphicsMode graphicsMode, IWindowInfo window, Size size, - bool depthBuffer, bool stencilBuffer) + bool depthBuffer, bool stencilBuffer, + ICoordinateSystemCreator coords) + : base(coords) { mGraphicsMode = graphicsMode; mAttachedWindow = attachedWindow; @@ -63,7 +65,7 @@ var context = new GraphicsContext(mGraphicsMode, mWindowInfo); mContexts.Add(Thread.CurrentThread, context); - + context.LoadAll(); context.MakeCurrent(mWindowInfo); Modified: trunk/AgateLib.GL/GL3/FrameBuffer.cs =================================================================== --- trunk/AgateLib.GL/GL3/FrameBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.GL/GL3/FrameBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -25,6 +25,7 @@ using AgateLib.Geometry; using OpenTK.Graphics.OpenGL; using OTKPixelFormat = OpenTK.Graphics.OpenGL.PixelFormat; +using AgateLib.Geometry.CoordinateSystems; namespace AgateLib.OpenGL.GL3 { @@ -38,7 +39,7 @@ int mDepthBuffer; IGL_Surface mTexture; - public FrameBuffer(IGL_Surface surface) + public FrameBuffer(IGL_Surface surface) : base(new NativeCoordinates()) { mTexture = surface; mSize = surface.SurfaceSize; Modified: trunk/AgateLib.GL/GL_FrameBuffer.cs =================================================================== --- trunk/AgateLib.GL/GL_FrameBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.GL/GL_FrameBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -32,7 +32,7 @@ protected bool mHasDepth; protected bool mHasStencil; - protected GL_FrameBuffer() + protected GL_FrameBuffer(ICoordinateSystemCreator coords) : base(coords) { } Modified: trunk/AgateLib.GL/Legacy/FrameBufferExt.cs =================================================================== --- trunk/AgateLib.GL/Legacy/FrameBufferExt.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.GL/Legacy/FrameBufferExt.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -26,6 +26,7 @@ using AgateLib.Geometry; using OpenTK.Graphics.OpenGL; using OTKPixelFormat = OpenTK.Graphics.OpenGL.PixelFormat; +using AgateLib.Geometry.CoordinateSystems; namespace AgateLib.OpenGL.Legacy { @@ -42,6 +43,7 @@ public FrameBufferExt(IGL_Surface target) + : base(new NativeCoordinates()) { mTexture = target; mSize = target.SurfaceSize; Modified: trunk/AgateLib.GL/Legacy/FrameBufferReadPixels.cs =================================================================== --- trunk/AgateLib.GL/Legacy/FrameBufferReadPixels.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.GL/Legacy/FrameBufferReadPixels.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -25,6 +25,7 @@ using AgateLib.DisplayLib.ImplementationBase; using AgateLib.Geometry; using OpenTK.Graphics.OpenGL; +using AgateLib.Geometry.CoordinateSystems; namespace AgateLib.OpenGL.Legacy { @@ -34,7 +35,7 @@ IGL_Surface surface; SurfaceState s = new SurfaceState(); - public FrameBufferReadPixels(IGL_Surface surf) + public FrameBufferReadPixels(IGL_Surface surf) : base(new NativeCoordinates()) { surface = surf; this.size = surf.SurfaceSize; Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -68,6 +68,7 @@ bool mHasFrame = true; ContextFB mFrameBuffer; + ICoordinateSystemCreator mCoords; public override FrameBufferImpl FrameBuffer { @@ -77,6 +78,7 @@ { mOwner = owner; mChoosePosition = windowParams.WindowPosition; + mCoords = windowParams.Coordinates; if (windowParams.RenderToControl) { @@ -98,7 +100,7 @@ mDisplay = Display.Impl as DesktopGLDisplay; - CreateFrameBuffer(); + CreateFrameBuffer(mCoords); AttachEvents(); } @@ -146,7 +148,7 @@ mWindowInfo = CreateWindowInfo(CreateGraphicsMode()); AttachEvents(); - CreateFrameBuffer(); + CreateFrameBuffer(mCoords); OpenTK.DisplayResolution resolution = OpenTK.DisplayDevice.Default.SelectResolution( mChooseWidth, mChooseHeight, 32, 0); @@ -194,7 +196,7 @@ frm.Icon = mIcon; frm.Show(); - CreateFrameBuffer(); + CreateFrameBuffer(mCoords); AttachEvents(); @@ -230,11 +232,11 @@ return newMode; } - private void CreateFrameBuffer() + private void CreateFrameBuffer(ICoordinateSystemCreator coords) { var old = mFrameBuffer; - mFrameBuffer = new ContextFB(mOwner, CreateGraphicsMode(), mWindowInfo, this.Size, true, false); + mFrameBuffer = new ContextFB(mOwner, CreateGraphicsMode(), mWindowInfo, this.Size, true, false, coords); if (old != null) old.Dispose(); Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -203,7 +203,7 @@ else CreateWindowedDisplay(); - CreateFrameBuffer(); + CreateFrameBuffer(windowParams.Coordinates); mDisplay = Display.Impl as DesktopGLDisplay; @@ -212,11 +212,12 @@ mDrawBuffer = mDisplay.CreateDrawBuffer(); } - private void CreateFrameBuffer() + private void CreateFrameBuffer(ICoordinateSystemCreator coords) { mFrameBuffer = new ContextFB(mOwner, mWindow.Context.GraphicsMode, mWindow.WindowInfo, - new Size(mWindow.ClientSize.Width, mWindow.ClientSize.Height), true, false); + new Size(mWindow.ClientSize.Width, mWindow.ClientSize.Height), true, false, + coords); if (mOwner.Impl != null) { Modified: trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-24 19:04:33 UTC (rev 1479) @@ -96,8 +96,13 @@ <Compile Include="DisplayImplementation\SDX_IndexBuffer.cs" /> <Compile Include="DisplayImplementation\SDX_Surface.cs" /> <Compile Include="DisplayImplementation\SDX_VertexBuffer.cs" /> - <Compile Include="DisplayImplementation\Shaders\SDL_Lighting3DShader.cs" /> + <Compile Include="DisplayImplementation\Shaders\SDX_Lighting3DShader.cs" /> <Compile Include="DisplayImplementation\Shaders\SDX_Lighting2DShader.cs" /> + <Compile Include="DisplayImplementation\Shaders\ShaderResources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>ShaderResources.resx</DependentUpon> + </Compile> <Compile Include="Factories\DisplayFactory.cs" /> <Compile Include="Factories\FakeFile.cs" /> <Compile Include="Factories\FakePath.cs" /> @@ -113,6 +118,10 @@ <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> + <None Include="Resources\Basic2Dpixel.fxo" /> + <None Include="Resources\Basic2Dvert.fxo" /> + <None Include="Resources\buildshaders.bat" /> + <None Include="Resources\fxc.bat" /> <None Include="packages.config" /> </ItemGroup> <ItemGroup> @@ -125,8 +134,9 @@ <Reference Include="SharpDX.DXGI"> <HintPath>$(SharpDXPackageBinDir)\SharpDX.DXGI.dll</HintPath> </Reference> - <Reference Include="SharpDX.SimpleInitializer"> - <HintPath>..\packages\SharpDX.SimpleInitializer.1.0.0\lib\wp8\SharpDX.SimpleInitializer.dll</HintPath> + <Reference Include="SharpDX.SimpleInitializer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\..\Testing\SharpDX.SimpleInitializer\trunk\Binaries\WP\x86\SharpDX.SimpleInitializer.dll</HintPath> </Reference> <Reference Include="SharpDX.Toolkit"> <HintPath>$(SharpDXPackageBinDir)\SharpDX.Toolkit.dll</HintPath> @@ -135,8 +145,13 @@ <HintPath>$(SharpDXPackageBinDir)\SharpDX.Toolkit.Graphics.dll</HintPath> </Reference> </ItemGroup> - <ItemGroup /> <ItemGroup> + <EmbeddedResource Include="DisplayImplementation\Shaders\ShaderResources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>ShaderResources.Designer.cs</LastGenOutput> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> <ProjectReference Include="..\AgateLib.Platform.Common\AgateLib.Platform.Common.csproj"> <Project>{fc9e7036-aa75-4a6b-82db-0f5e98b5fbcb}</Project> <Name>AgateLib.Platform.Common</Name> @@ -146,6 +161,10 @@ <Name>AgateLib</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <Content Include="Resources\ShaderSource\Basic2Dpixel.hlsl" /> + <Content Include="Resources\ShaderSource\Basic2Dvert.hlsl" /> + </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" /> <ProjectExtensions /> @@ -158,6 +177,9 @@ <Error Condition="!Exists('..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets'))" /> </Target> <Import Project="..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets" Condition="Exists('..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets')" /> + <PropertyGroup> + <PreBuildEvent>$(ProjectDir)Resources\buildshaders.bat $(ProjectDir)</PreBuildEvent> + </PropertyGroup> <!-- 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"> Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferSurface.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferSurface.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferSurface.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -24,6 +24,7 @@ using AgateLib.DisplayLib.ImplementationBase; using AgateLib.Geometry; using SharpDX.Direct3D11; +using AgateLib.Geometry.CoordinateSystems; namespace AgateLib.Platform.WindowsPhone.DisplayImplementation { @@ -38,7 +39,7 @@ bool mHasDepth; bool mHasStencil; - public FrameBufferSurface(Size size) + public FrameBufferSurface(Size size) : base(new NativeCoordinates()) { throw new NotImplementedException(); //mDisplay = Display.Impl as SDX_Display; Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -39,7 +39,8 @@ public FrameBufferWindow(Size size, SwapChain swap, DisplayWindow attachedWindow, - SharpDXContext context) + SharpDXContext context, + ICoordinateSystemCreator coords) : base(coords) { if (context == null) throw new ArgumentNullException(); Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -81,6 +81,23 @@ #region --- Creation / Destruction --- + public SDX_Display(SharpDX.SimpleInitializer.SharpDXContext context, DrawingSurfaceBackgroundGrid renderTarget) + { + if (context == null) throw new ArgumentNullException(); + if (renderTarget == null) throw new ArgumentNullException(); + + this.sdxContext = context; + this.mRenderControl = renderTarget; + + mDevice = new D3DDevice(context); + context.DeviceReset += context_DeviceReset; + } + + void context_DeviceReset(object sender, SharpDX.SimpleInitializer.DeviceResetEventArgs e) + { + OnDeviceReset(); + } + public override void Initialize() { Report("SharpDX driver instantiated for display."); @@ -140,6 +157,7 @@ if (DeviceReset != null) DeviceReset(this, EventArgs.Empty); } + private void OnDeviceLost() { Log.WriteLine("{0} Device Lost", DateTime.Now); @@ -711,18 +729,6 @@ internal event EventHandler VSyncChanged; - public SDX_Display(SharpDX.SimpleInitializer.SharpDXContext context, - DrawingSurfaceBackgroundGrid renderTarget) - { - if (context == null) throw new ArgumentNullException(); - if (renderTarget == null) throw new ArgumentNullException(); - - this.sdxContext = context; - this.mRenderControl = renderTarget; - - mDevice = new D3DDevice(context); - } - private void OnVSyncChanged() { if (VSyncChanged != null) Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_DisplayWindow.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_DisplayWindow.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_DisplayWindow.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -28,6 +28,7 @@ using System.Windows.Controls; using System.Windows.Input; using AgateLib.InputLib.Legacy; +using System.Diagnostics; namespace AgateLib.Platform.WindowsPhone.DisplayImplementation { @@ -54,7 +55,8 @@ mFrameBuffer = new FrameBufferWindow( renderTarget.RenderSize.ToAgateSize(), null, owner, - mDisplay.D3D_Device.Context); + mDisplay.D3D_Device.Context, + windowParams.Coordinates); //CreateBackBuffer(mIsFullscreen); } @@ -108,15 +110,15 @@ Mouse.OnMouseDoubleClick(MouseButton.Primary); } - void mRenderTarget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) + void mRenderTarget_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { - Input.QueueInputEvent(AgateInputEventArgs.MouseUp( + Debug.WriteLine("Mouse down at: {0}", e.GetPosition(mRenderTarget)); + Input.QueueInputEvent(AgateInputEventArgs.MouseDown( this, e.GetPosition(mRenderTarget).ToAgatePoint(), MouseButton.Primary)); } - - void mRenderTarget_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + void mRenderTarget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { - Input.QueueInputEvent(AgateInputEventArgs.MouseDown( + Input.QueueInputEvent(AgateInputEventArgs.MouseUp( this, e.GetPosition(mRenderTarget).ToAgatePoint(), MouseButton.Primary)); } void mRenderTarget_MouseMove(object sender, MouseEventArgs e) Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_FrameBuffer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_FrameBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_FrameBuffer.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -32,6 +32,10 @@ bool mHasDepth; bool mHasStencil; + public SDX_FrameBuffer(ICoordinateSystemCreator coords) : base(coords) + { + } + protected void SetHasDepthStencil(Format fmt) { mHasDepth = false; Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -112,10 +112,11 @@ LoadFromFile(); - //mDevice.Device.DeviceReset += new EventHandler(mDevice_DeviceReset); + mDevice.Context.DeviceReset += Context_DeviceReset; InitVerts(); } + public SDX_Surface(Stream stream) { mDisplay = Display.Impl as SDX_Display; @@ -132,30 +133,23 @@ } public SDX_Surface(Size size) { - throw new NotImplementedException(); + var texture = new Texture2D(mDevice.Device, new SharpDX.Direct3D11.Texture2DDescription() + { + Format = SharpDX.DXGI.Format.B8G8R8A8_UNorm, + Width = size.Width, + Height = size.Height, + ArraySize = 1, + MipLevels = 1, + BindFlags = SharpDX.Direct3D11.BindFlags.ShaderResource | SharpDX.Direct3D11.BindFlags.RenderTarget, + Usage = SharpDX.Direct3D11.ResourceUsage.Default, + CpuAccessFlags = SharpDX.Direct3D11.CpuAccessFlags.None, + OptionFlags = SharpDX.Direct3D11.ResourceOptionFlags.None, + SampleDescription = new SharpDX.DXGI.SampleDescription(1, 0) + }); - //mSrcRect = new Rectangle(new Point(0, 0), size); + mTexture = new Ref<Texture2D>(texture); + mTextureView = new SharpDX.Direct3D11.ShaderResourceView(mDevice.Device, texture); - //mDisplay = Display.Impl as SDX_Display; - //mDevice = mDisplay.D3D_Device; - - //mTexture = new Ref<Texture2D>(new Texture2D(mDevice.Device, size.Width, size.Height, 1, Usage.None, - // Format.A8R8G8B8, Pool.Managed)); - - //RenderToSurface render = new RenderToSurface(mDevice.Device, size.Width, size.Height, - // Format.A8R8G8B8, Format.D16); - - //Viewport v = new Viewport(0, 0, size.Width, size.Height); - - //render.BeginScene(mTexture.Value.GetSurfaceLevel(0), v); - //mDevice.Clear(ClearFlags.Target, Color.FromArgb(0, 0, 0, 0).ToArgb(), 1.0f, 0); - //render.EndScene(Filter.None); - - //render.Dispose(); - //render = null; - - //mTextureSize = mSrcRect.Size; - InitVerts(); } public SDX_Surface(Ref<Texture2D> texture, Rectangle sourceRect) @@ -167,9 +161,9 @@ mTexture = new Ref<Texture2D>(texture); - throw new NotImplementedException(); - //mTextureSize = new Size(mTexture.Value.GetSurfaceLevel(0).Description.Width, - // mTexture.Value.GetSurfaceLevel(0).Description.Height); + mTextureSize = new Size( + texture.Value.Description.Width, + texture.Value.Description.Height); InitVerts(); } @@ -216,7 +210,7 @@ } /// <summary> - /// Only call thsi function on the main UI thread. + /// Only call this function on the main UI thread. /// </summary> /// <param name="sourceStream"></param> private void ReadFromStream(Stream sourceStream) @@ -260,7 +254,7 @@ #endregion #region --- Events and event handlers --- - public void mDevice_DeviceReset(object sender, EventArgs e) + void Context_DeviceReset(object sender, SharpDX.SimpleInitializer.DeviceResetEventArgs e) { LoadFromFile(); } Deleted: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDL_Lighting3DShader.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDL_Lighting3DShader.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDL_Lighting3DShader.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -1,61 +0,0 @@ -using AgateLib.DisplayLib.Shaders.Implementation; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AgateLib.Platform.WindowsPhone.DisplayImplementation.Shaders -{ - class SDL_Lighting3DShader : AgateShaderImpl - { - public override void SetTexture(DisplayLib.Shaders.EffectTexture tex, string variableName) - { - throw new NotImplementedException(); - } - - public override void SetVariable(string name, params float[] v) - { - throw new NotImplementedException(); - } - - public override void SetVariable(string name, params int[] v) - { - throw new NotImplementedException(); - } - - public override void SetVariable(string name, Geometry.Matrix4x4 matrix) - { - throw new NotImplementedException(); - } - - public override void SetVariable(string name, Geometry.Color color) - { - throw new NotImplementedException(); - } - - public override int Passes - { - get { throw new NotImplementedException(); } - } - - public override void Begin() - { - throw new NotImplementedException(); - } - - public override void BeginPass(int passIndex) - { - throw new NotImplementedException(); - } - - public override void EndPass() - { - throw new NotImplementedException(); - } - - public override void End() - { - throw new NotImplementedException(); - } - } -} Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -23,6 +23,7 @@ using AgateLib.DisplayLib.Shaders; using AgateLib.DisplayLib.Shaders.Implementation; using AgateLib.Geometry; +using SharpDX.Direct3D11; namespace AgateLib.Platform.WindowsPhone.DisplayImplementation.Shaders { @@ -30,11 +31,40 @@ { Rectangle mCoords; + SDX_Display mDisplay; + D3DDevice mDevice; + + VertexShader mVertexShader; + PixelShader mPixelShader; + SharpDX.Direct3D11.Buffer mConstantBuffer; + public SDX_Basic2DShader() { - + mDisplay = (SDX_Display)DisplayLib.Display.Impl; + mDisplay.DeviceReset += mDisplay_DeviceReset; + + mDevice = mDisplay.D3D_Device; + + InitializeShaders(); } + void mDisplay_DeviceReset(object sender, EventArgs e) + { + InitializeShaders(); + } + + private void InitializeShaders() + { + if (mDevice.Device == null) + return; + + var vs = (byte[])ShaderResources.ResourceManager.GetObject("Basic2Dvert"); + var ps = (byte[])ShaderResources.ResourceManager.GetObject("Basic2Dpixel"); + + mVertexShader = new VertexShader(mDevice.Device, vs); + mPixelShader = new PixelShader(mDevice.Device, ps); + } + public override AgateLib.Geometry.Rectangle CoordinateSystem { get { return mCoords; } @@ -69,8 +99,8 @@ private void SetOrthoProjection() { - //SlimDX.Matrix orthoProj = SlimDX.Matrix.OrthoOffCenterRH( - // mCoords.Left, mCoords.Right, mCoords.Bottom, mCoords.Top, -1, 1); + SharpDX.Matrix orthoProj = SharpDX.Matrix.OrthoOffCenterRH( + mCoords.Left, mCoords.Right, mCoords.Bottom, mCoords.Top, -1, 1); //// TODO: figure out why this method sometimes gets called when mDevice is null? //if (mDevice != null) @@ -112,9 +142,10 @@ public override void SetTexture(EffectTexture tex, string variableName) { - throw new NotImplementedException(); + //mDevice.DeviceContext.PixelShader.SetShaderResource(); } + public override void SetVariable(string name, AgateLib.Geometry.Color color) { throw new NotImplementedException(); Copied: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Lighting3DShader.cs (from rev 1477, trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDL_Lighting3DShader.cs) =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Lighting3DShader.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Lighting3DShader.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -0,0 +1,61 @@ +using AgateLib.DisplayLib.Shaders.Implementation; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Platform.WindowsPhone.DisplayImplementation.Shaders +{ + class SDX_Lighting3DShader : AgateShaderImpl + { + public override void SetTexture(DisplayLib.Shaders.EffectTexture tex, string variableName) + { + throw new NotImplementedException(); + } + + public override void SetVariable(string name, params float[] v) + { + throw new NotImplementedException(); + } + + public override void SetVariable(string name, params int[] v) + { + throw new NotImplementedException(); + } + + public override void SetVariable(string name, Geometry.Matrix4x4 matrix) + { + throw new NotImplementedException(); + } + + public override void SetVariable(string name, Geometry.Color color) + { + throw new NotImplementedException(); + } + + public override int Passes + { + get { throw new NotImplementedException(); } + } + + public override void Begin() + { + throw new NotImplementedException(); + } + + public override void BeginPass(int passIndex) + { + throw new NotImplementedException(); + } + + public override void EndPass() + { + throw new NotImplementedException(); + } + + public override void End() + { + throw new NotImplementedException(); + } + } +} Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderFactory.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderFactory.cs 2014-08-24 07:13:05 UTC (rev 1478) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderFactory.cs 2014-08-24 19:04:33 UTC (rev 1479) @@ -38,7 +38,7 @@ return new SDX_Lighting2DShader(); case BuiltInShader.Lighting3D: - return new SDL_Lighting3DShader(); + return new SDX_Lighting3DShader(); default: throw new NotImplementedException(); Added: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderResources.Designer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderR... [truncated message content] |
From: <ka...@us...> - 2014-08-24 07:13:10
|
Revision: 1478 http://sourceforge.net/p/agate/code/1478 Author: kanato Date: 2014-08-24 07:13:05 +0000 (Sun, 24 Aug 2014) Log Message: ----------- Direct3D 11 surface loading works now. Modified Paths: -------------- trunk/AgateLib/ApplicationModels/Scene.cs trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs trunk/AgateLib/ApplicationModels/SceneStack.cs trunk/AgateLib/Core.cs trunk/AgateLib/Drivers/IPlatformFactory.cs trunk/AgateLib/IO/FileProvider.cs trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs trunk/AgateLib.Platform.WindowsForms/Initializer.cs trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs trunk/AgateLib.Platform.WindowsPhone/Interop.cs trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs trunk/AgateLib.Platform.WindowsPhone/packages.config trunk/Tests.WindowsPhone/TestScene.cs trunk/UnitTests/Fakes/FakePlatformFactory.cs trunk/UnitTests/Resources/SerializationTest.cs trunk/UnitTests/UserInterface/Css/LayoutTest.cs Added Paths: ----------- trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPAssetFileProvider.cs Removed Paths: ------------- trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs Modified: trunk/AgateLib/ApplicationModels/Scene.cs =================================================================== --- trunk/AgateLib/ApplicationModels/Scene.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib/ApplicationModels/Scene.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -11,6 +11,11 @@ public bool UpdateBelow { get; set; } public bool DrawBelow { get; set; } + protected internal virtual void OnSceneStart() + { } + protected internal virtual void OnSceneEnd() + { } + public abstract void Update(double delta_t); public abstract void Draw(); } Modified: trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs =================================================================== --- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -11,17 +11,17 @@ : base(parameters) { } + protected Scene sceneToStartWith; + public void Run(Scene scene) { - if (SceneStack.Contains(scene) == false) - SceneStack.Add(scene); - try { Initialize(); AutoCreateDisplayWindow(); PrerunInitialization(); + sceneToStartWith = scene; BeginModel(); } finally Modified: trunk/AgateLib/ApplicationModels/SceneStack.cs =================================================================== --- trunk/AgateLib/ApplicationModels/SceneStack.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib/ApplicationModels/SceneStack.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -12,10 +12,20 @@ public static void Add(Scene scene) { + if (mScenes.Contains(scene)) + throw new InvalidOperationException(); + mScenes.Add(scene); + + scene.OnSceneStart(); } public static void Remove(Scene scene) { + if (mScenes.Contains(scene) == false) + throw new InvalidOperationException(); + + scene.OnSceneEnd(); + mScenes.Remove(scene); } Modified: trunk/AgateLib/Core.cs =================================================================== --- trunk/AgateLib/Core.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib/Core.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -318,7 +318,7 @@ /// Initializes Core class. Also causes the Registrar to probe drivers. /// Can be called multiple times without adverse effects. /// </summary> - public static void Initialize(IAgateFactory factory) + public static void Initialize(IAgateFactory factory, AssetLocations assets) { if (sInititalized) return; @@ -329,7 +329,7 @@ FileSystem.File = factory.PlatformFactory.CreateFile(); FileSystem.Path = factory.PlatformFactory.CreatePath(); - FileProvider.Initialize(factory.PlatformFactory); + FileProvider.Initialize(factory.PlatformFactory.AssetFileProvider, assets); Display.Initialize(factory.DisplayFactory.DisplayImpl); Audio.Initialize(factory.AudioFactory.CreateAudioImpl()); Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -38,7 +38,7 @@ IEnumerable<System.Reflection.Assembly> GetSerializationSearchAssemblies(Type objectType); - IReadFileProvider CreateAssetFileProvider(); + IReadFileProvider AssetFileProvider { get; } IPlatformSerialization CreateDefaultSerializationConstructor(); } Modified: trunk/AgateLib/IO/FileProvider.cs =================================================================== --- trunk/AgateLib/IO/FileProvider.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib/IO/FileProvider.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -27,11 +27,6 @@ { public static class FileProvider { - internal static void Initialize(IPlatformFactory platformFactory) - { - Assets = platformFactory.CreateAssetFileProvider(); - } - public static void Initialize(IReadFileProvider assetProvider, AssetLocations assetLocations) { Assets = assetProvider; Modified: trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -19,9 +19,11 @@ public PlatformFactory() { Info = new FormsPlatformInfo(); + AssetFileProvider = new FileSystemProvider("."); } public PlatformInfo Info { get; private set; } + public IReadFileProvider AssetFileProvider { get; private set; } public IStopwatch CreateStopwatch() { @@ -46,12 +48,6 @@ return new SysIoPath(); } - public IReadFileProvider CreateAssetFileProvider() - { - //return new FileSystemProvider(AssemblyLoadDirectory); - return new FileSystemProvider("."); - } - static public string AssemblyLoadDirectory { get Modified: trunk/AgateLib.Platform.WindowsForms/Initializer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/Initializer.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsForms/Initializer.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -6,12 +6,12 @@ { static class Initializer { - public static void Initialize(FormsModelParameters Parameters) + public static void Initialize(FormsModelParameters parameters) { - Core.Initialize(new FormsFactory()); + Core.Initialize(new FormsFactory(), parameters.AssetLocations); - var assetProvider = new FileSystemProvider(System.IO.Path.GetFullPath(Parameters.AssetPath)); - AgateLib.IO.FileProvider.Initialize(assetProvider, Parameters.AssetLocations); + var assetProvider = new FileSystemProvider(System.IO.Path.GetFullPath(parameters.AssetPath)); + AgateLib.IO.FileProvider.Initialize(assetProvider, parameters.AssetLocations); System.IO.Directory.SetCurrentDirectory(assetProvider.SearchPath); } Modified: trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj 2014-08-24 07:13:05 UTC (rev 1478) @@ -18,7 +18,7 @@ <ValidateXaml>true</ValidateXaml> <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion> <ThrowErrorsInValidation>true</ThrowErrorsInValidation> - <NuGetPackageImportStamp>ddef659b</NuGetPackageImportStamp> + <NuGetPackageImportStamp>15cec27f</NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -104,7 +104,7 @@ <Compile Include="Factories\WPPlatformFactory.cs" /> <Compile Include="Factories\WindowsPhoneFactory.cs" /> <Compile Include="Interop.cs" /> - <Compile Include="PlatformImplementation\AssetFileProvider.cs" /> + <Compile Include="PlatformImplementation\WPAssetFileProvider.cs" /> <Compile Include="PlatformImplementation\WPPlatformInfo.cs" /> <Compile Include="PlatformImplementation\DiagnosticsStopwatch.cs" /> <Compile Include="DisplayImplementation\Shaders\SDX_Basic2DShader.cs" /> @@ -128,6 +128,12 @@ <Reference Include="SharpDX.SimpleInitializer"> <HintPath>..\packages\SharpDX.SimpleInitializer.1.0.0\lib\wp8\SharpDX.SimpleInitializer.dll</HintPath> </Reference> + <Reference Include="SharpDX.Toolkit"> + <HintPath>$(SharpDXPackageBinDir)\SharpDX.Toolkit.dll</HintPath> + </Reference> + <Reference Include="SharpDX.Toolkit.Graphics"> + <HintPath>$(SharpDXPackageBinDir)\SharpDX.Toolkit.Graphics.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup /> <ItemGroup> @@ -149,7 +155,9 @@ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\packages\SharpDX.2.6.2\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.2.6.2\build\SharpDX.targets'))" /> + <Error Condition="!Exists('..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets'))" /> </Target> + <Import Project="..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.targets" Condition="Exists('..\packages\SharpDX.Toolkit.2.6.2\build\SharpDX.Toolkit.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"> Modified: trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -27,11 +27,21 @@ { context = new SharpDXContext(); context.Render += context_Render; + context.DeviceReset += context_DeviceReset; context.BindToControl(Parameters.RenderTarget); - WindowsPhoneInitializer.Initialize(context, Parameters.RenderTarget); + WindowsPhoneInitializer.Initialize(context, Parameters.RenderTarget, Parameters.AssetLocations); } + void context_DeviceReset(object sender, DeviceResetEventArgs e) + { + if (sceneToStartWith != null) + { + SceneStack.Add(sceneToStartWith); + sceneToStartWith = null; + } + } + void context_Render(object sender, EventArgs e) { foreach (var sc in SceneStack.UpdateScenes) @@ -43,7 +53,6 @@ sc.Draw(); Display.EndFrame(); - Core.KeepAlive(); } Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -35,7 +35,8 @@ private SharpDXContext context; private Device mDevice { get { return context.D3DDevice; } } - private DeviceContext mContext { get { return context.D3DContext; } } + private DeviceContext mDeviceContext { get { return context.D3DContext; } } + SharpDX.Toolkit.Graphics.GraphicsDevice mGraphicsDevice; private Texture2D[] mLastTexture = new Texture2D[8]; private SDX_FrameBuffer mRenderTarget; @@ -44,6 +45,7 @@ private bool mAlphaBlend; private Matrix mWorld2D; + //VertexBuffer mSurfaceVB; //const int NumVertices = 1000; //int mSurfaceVBPointer = 0; @@ -57,7 +59,7 @@ this.context = context; mWorld2D = Matrix.Identity; - + mDrawBuffer = new DrawBuffer(this); } @@ -99,7 +101,7 @@ } public DeviceContext DeviceContext { - get { return mContext; } + get { return mDeviceContext; } } public SharpDXContext Context { @@ -222,11 +224,11 @@ public void Clear(AgateLib.Geometry.Color color, float zdepth, int stencil) { - mContext.ClearDepthStencilView(mRenderTarget.DepthStencilView, + mDeviceContext.ClearDepthStencilView(mRenderTarget.DepthStencilView, DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, zdepth, (byte)stencil); - mContext.ClearRenderTargetView(mRenderTarget.RenderTargetView, new Color4(color.ToArgb())); + mDeviceContext.ClearRenderTargetView(mRenderTarget.RenderTargetView, color.ToColor4()); } //public void WriteToSurfaceVBAndRender @@ -323,5 +325,21 @@ mMaxLightsUsed = lights.Count; } * */ + + public SharpDX.Toolkit.Graphics.GraphicsDevice GraphicsDevice + { + get + { + if (mGraphicsDevice == null) + { + mGraphicsDevice = SharpDX.Toolkit.Graphics.GraphicsDevice.New + (context.D3DDevice); + } + + return mGraphicsDevice; + } + } + + public SharpDX.Toolkit.Graphics.BasicEffect Effect { get; set; } } } \ No newline at end of file Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -22,7 +22,8 @@ using System.Text; using AgateLib.DisplayLib; using AgateLib.Geometry.VertexTypes; -using SharpDX.Direct3D11; +using Texture2D = SharpDX.Direct3D11.Texture2D; +using SharpDX.Toolkit.Graphics; namespace AgateLib.Platform.WindowsPhone.DisplayImplementation { @@ -36,6 +37,7 @@ int pages = 1; D3DDevice mDevice; + BasicEffect mEffect; PositionTextureColor[] mVerts; short[] mIndices; @@ -49,6 +51,7 @@ public DrawBuffer(D3DDevice device) { mDevice = device; + mEffect = mDevice.Effect; AllocateVerts(); } @@ -96,7 +99,6 @@ if (mVertPointer == 0) return; - mDevice.SetDeviceStateTexture(mTexture); mDevice.AlphaBlend = mAlphaBlend; //mDevice.AlphaArgument1 = TextureArgument.Texture; //mDevice.AlphaArgument2 = TextureArgument.Diffuse; Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -31,7 +31,10 @@ using ImageFileFormat = AgateLib.DisplayLib.ImageFileFormat; using Surface = AgateLib.DisplayLib.Surface; using Vector2 = AgateLib.Geometry.Vector2; -using SharpDX.Direct3D11; +using System.Windows.Resources; +using System.Windows.Media.Imaging; +using SharpDX.IO; +using Texture2D = SharpDX.Direct3D11.Texture2D; namespace AgateLib.Platform.WindowsPhone.DisplayImplementation { @@ -41,6 +44,7 @@ SDX_Display mDisplay; D3DDevice mDevice; + SharpDX.Toolkit.Graphics.GraphicsDevice mGraphicsDevice { get { return mDevice.GraphicsDevice; } } Ref<Texture2D> mTexture; @@ -55,6 +59,7 @@ PositionTextureColor[] mExtraVerts = new PositionTextureColor[4]; short[] mExtraIndices = new short[] { 0, 2, 1, 1, 2, 3 }; + private SharpDX.Direct3D11.ShaderResourceView mTextureView; #endregion @@ -187,97 +192,69 @@ } public void LoadFromStream(Stream st) { - throw new NotImplementedException(); - //Drawing.Bitmap bitmap = new Drawing.Bitmap(st); + System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => + { + ReadFromStream(st); + }); + } - //mSrcRect = new Rectangle(Point.Empty, Interop.Convert(bitmap.Size)); - - //// this is the speed issue fix in the debugger found on the net (thezbuffer.com has it documented) - //System.IO.MemoryStream stream = new System.IO.MemoryStream(); - //bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp); - - //bitmap.Dispose(); - - //stream.Position = 0; - - ////mTexture = Texture(mDevice, bitmap, Usage.None, Pool.Managed); - - //Format format; - - - //switch (mDisplay.DisplayMode.Format) - //{ - // case Format.X8R8G8B8: - // format = Format.A8R8G8B8; - // break; - - // case Format.X8B8G8R8: - // format = Format.A8B8G8R8; - // break; - - // default: - // System.Diagnostics.Debug.Assert(false); - // throw new Exception("What format do I use?"); - - //} - - //mTexture = new Ref<Texture>(Texture.FromStream(mDevice.Device, - // stream, 0, 0, 1, Usage.None, - // format, Pool.Managed, Filter.None, Filter.None, 0x00000000)); - - //mTextureSize = new Size(mTexture.Value.GetSurfaceLevel(0).Description.Width, - // mTexture.Value.GetSurfaceLevel(0).Description.Height); - - //stream.Dispose(); - } public void LoadFromFile() { - throw new NotImplementedException(); - if (string.IsNullOrEmpty(mFileName)) return; - //string path = mFileName; - //Drawing.Bitmap bitmap = new Drawing.Bitmap(path); + //mTexture = new Ref<Texture2D>(Texture2D.Load( + // mGraphicsDevice, mFileName)); - //mSrcRect = new Rectangle(Point.Empty, Interop.Convert(bitmap.Size)); - /* - // this is the speed issue fix in the debugger found on the net (thezbuffer.com has it documented) - System.IO.MemoryStream stream = new System.IO.MemoryStream(); - bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp); + System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => + { + using (MemoryStream sourceStream = new MemoryStream(NativeFile.ReadAllBytes(mFileName))) + { + ReadFromStream(sourceStream); + } + }); + } - stream.Position = 0; - - mTexture = Texture.FromStream(mDevice, stream, Usage.None, Pool.Managed); - * */ - //mTexture = new Texture(mDevice, bitmap, Usage.None, Pool.Managed); - //Format format; + /// <summary> + /// Only call thsi function on the main UI thread. + /// </summary> + /// <param name="sourceStream"></param> + private void ReadFromStream(Stream sourceStream) + { + var image = new BitmapImage(); + image.CreateOptions = BitmapCreateOptions.None; + image.SetSource(sourceStream); - throw new NotImplementedException(); + var bitmap = new WriteableBitmap(image); - //switch (mDevice.Device.DisplayMode.Format) - //{ - // case Format.X8R8G8B8: - // format = Format.A8R8G8B8; - // break; + using (var dataStream = new SharpDX.DataStream(bitmap.Pixels.Length * 4, true, true)) + { + dataStream.WriteRange<int>(bitmap.Pixels); - // case Format.X8B8G8R8: - // format = Format.A8B8G8R8; - // break; + dataStream.Seek(0, SeekOrigin.Begin); - // default: - // System.Diagnostics.Debug.Assert(false); - // throw new Exception("What format do I use?"); + var dataRectangle = new SharpDX.DataRectangle(dataStream.DataPointer, (int)(bitmap.PixelWidth * 4)); - //} + var texture = new Texture2D(mDevice.Device, new SharpDX.Direct3D11.Texture2DDescription() + { + Format = SharpDX.DXGI.Format.B8G8R8A8_UNorm, + Width = (int)bitmap.PixelWidth, + Height = (int)bitmap.PixelHeight, + ArraySize = 1, + MipLevels = 1, + BindFlags = SharpDX.Direct3D11.BindFlags.ShaderResource, + Usage = SharpDX.Direct3D11.ResourceUsage.Default, + CpuAccessFlags = SharpDX.Direct3D11.CpuAccessFlags.None, + OptionFlags = SharpDX.Direct3D11.ResourceOptionFlags.None, + SampleDescription = new SharpDX.DXGI.SampleDescription(1, 0) + }, dataRectangle); - //mTexture = new Ref<Texture>(TextureLoader.FromFile(mDevice.Device, path, 0, 0, 1, Usage.None, - // format, Pool.Managed, Filter.None, Filter.None, 0x00000000)); + mTexture = new Ref<Texture2D>(texture); + mTextureView = new SharpDX.Direct3D11.ShaderResourceView(mDevice.Device, texture); + } - //mTextureSize = new Size(mTexture.Value.GetSurfaceLevel(0).Description.Width, - // mTexture.Value.GetSurfaceLevel(0).Description.Height); - - //bitmap.Dispose(); + bitmap = null; + image = null; } #endregion @@ -616,7 +593,7 @@ throw new NotImplementedException(); //SharpDX.DXGI.Surface surf = mTexture.Value.GetSurfaceLevel(0); - + //if (surf.Description.Pool == Pool.Default) //{ // throw new AgateLib.AgateException( Modified: trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -178,17 +178,19 @@ private void SetTextures() { - for (int i = 0; i < Textures.Count; i++) - { - if (Textures[i] == null) - mDisplay.D3D_Device.SetDeviceStateTexture(null, i); - else - { - SDX_Surface surf = (SDX_Surface)Textures[i].Impl; + throw new NotImplementedException(); + //for (int i = 0; i < Textures.Count; i++) + //{ + // if (Textures[i] == null) + // mDisplay.D3D_Device.SetDeviceStateTexture(null, i); + // else + // { + // SDX_Surface surf = (SDX_Surface)Textures[i].Impl; - mDisplay.D3D_Device.SetDeviceStateTexture(surf.D3dTexture, i); - } - } + // mDisplay.D3D_Device.GraphicsDevice.effec + // mDisplay.D3D_Device.SetDeviceStateTexture(surf.D3dTexture, i); + // } + //} } public override int VertexCount Modified: trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -14,7 +14,6 @@ { class DisplayFactory : IDisplayFactory { - private SharpDX.SimpleInitializer.SharpDXContext context; private System.Windows.Controls.DrawingSurfaceBackgroundGrid renderTarget; public DisplayFactory(SharpDX.SimpleInitializer.SharpDXContext context, System.Windows.Controls.DrawingSurfaceBackgroundGrid renderTarget) Modified: trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -12,9 +12,12 @@ public WPPlatformFactory() { Info = new WPPlatformInfo(); + AssetFileProvider = new WPAssetFileProvider(); + } public PlatformInfo Info { get; private set;} - + public IReadFileProvider AssetFileProvider { get; private set; } + public IStopwatch CreateStopwatch() { return new DiagnosticsStopwatch(); @@ -40,10 +43,6 @@ throw new NotImplementedException(); } - public IReadFileProvider CreateAssetFileProvider() - { - return new AssetFileProvider(); - } public IPlatformSerialization CreateDefaultSerializationConstructor() { Modified: trunk/AgateLib.Platform.WindowsPhone/Interop.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/Interop.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/Interop.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -1,4 +1,5 @@ -using System; +using SharpDX; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -19,5 +20,12 @@ { return new AgateLib.Geometry.Point((int)point.X, (int)point.Y); } + + public static SharpDX.Color4 ToColor4(this AgateLib.Geometry.Color color) + { + var retval = new Color4(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f); + + return retval; + } } } Deleted: trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.Platform.WindowsPhone.PlatformImplementation -{ - class AssetFileProvider : IReadFileProvider - { - public System.IO.Stream OpenRead(string filename) - { - throw new NotImplementedException(); - } - - public bool FileExists(string filename) - { - throw new NotImplementedException(); - } - - public IEnumerable<string> GetAllFiles() - { - throw new NotImplementedException(); - } - - public IEnumerable<string> GetAllFiles(string searchPattern) - { - throw new NotImplementedException(); - } - - public string ReadAllText(string filename) - { - throw new NotImplementedException(); - } - - public bool IsRealFile(string filename) - { - throw new NotImplementedException(); - } - - public string ResolveFile(string filename) - { - throw new NotImplementedException(); - } - } -} Copied: trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPAssetFileProvider.cs (from rev 1477, trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs) =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPAssetFileProvider.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPAssetFileProvider.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Windows.ApplicationModel; + +namespace AgateLib.Platform.WindowsPhone.PlatformImplementation +{ + class WPAssetFileProvider : IReadFileProvider + { + public System.IO.Stream OpenRead(string filename) + { + throw new NotImplementedException(); + } + + public bool FileExists(string filename) + { + throw new NotImplementedException(); + } + + public IEnumerable<string> GetAllFiles() + { + throw new NotImplementedException(); + } + + public IEnumerable<string> GetAllFiles(string searchPattern) + { + throw new NotImplementedException(); + } + + public string ReadAllText(string filename) + { + throw new NotImplementedException(); + } + + public bool IsRealFile(string filename) + { + throw new NotImplementedException(); + } + + public string ResolveFile(string filename) + { + return Package.Current.InstalledLocation.Path + "/Assets/" + filename; + } + } +} Modified: trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -1,4 +1,5 @@ -using AgateLib.Platform.WindowsPhone.Factories; +using AgateLib.ApplicationModels; +using AgateLib.Platform.WindowsPhone.Factories; using SharpDX.SimpleInitializer; using System; using System.Net; @@ -15,9 +16,9 @@ { static class WindowsPhoneInitializer { - internal static void Initialize(SharpDXContext context, DrawingSurfaceBackgroundGrid renderTarget) + internal static void Initialize(SharpDXContext context, DrawingSurfaceBackgroundGrid renderTarget, AssetLocations assets) { - Core.Initialize(new WindowsPhoneFactory(context, renderTarget)); + Core.Initialize(new WindowsPhoneFactory(context, renderTarget), assets); } } } Modified: trunk/AgateLib.Platform.WindowsPhone/packages.config =================================================================== --- trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/AgateLib.Platform.WindowsPhone/packages.config 2014-08-24 07:13:05 UTC (rev 1478) @@ -4,4 +4,6 @@ <package id="SharpDX.Direct3D11" version="2.6.2" targetFramework="wp80" /> <package id="SharpDX.DXGI" version="2.6.2" targetFramework="wp80" /> <package id="SharpDX.SimpleInitializer" version="1.0.0" targetFramework="wp80" /> + <package id="SharpDX.Toolkit" version="2.6.2" targetFramework="wp80" /> + <package id="SharpDX.Toolkit.Graphics" version="2.6.2" targetFramework="wp80" /> </packages> \ No newline at end of file Modified: trunk/Tests.WindowsPhone/TestScene.cs =================================================================== --- trunk/Tests.WindowsPhone/TestScene.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/Tests.WindowsPhone/TestScene.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -11,14 +11,25 @@ { class TestScene : Scene { + Color clr; + double time; + Surface image; + + protected override void OnSceneStart() + { + image = new Surface("ApplicationIcon.png"); + } + public override void Update(double delta_t) { - + time += delta_t / 1000.0; + + clr = Color.FromHsv(time * 50, 1, 1); } public override void Draw() { - Display.Clear(Color.Purple); + Display.Clear(clr); } } } Modified: trunk/UnitTests/Fakes/FakePlatformFactory.cs =================================================================== --- trunk/UnitTests/Fakes/FakePlatformFactory.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/UnitTests/Fakes/FakePlatformFactory.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -16,6 +16,7 @@ Info = new FakePlatformInfo(); } public Platform.PlatformInfo Info { get; private set; } + public IReadFileProvider AssetFileProvider { get; private set;} public Platform.IStopwatch CreateStopwatch() { @@ -43,10 +44,6 @@ yield break; } - public IReadFileProvider CreateAssetFileProvider() - { - return null; - } public IPlatformSerialization CreateDefaultSerializationConstructor() { Modified: trunk/UnitTests/Resources/SerializationTest.cs =================================================================== --- trunk/UnitTests/Resources/SerializationTest.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/UnitTests/Resources/SerializationTest.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -1,4 +1,5 @@ -using AgateLib.DisplayLib; +using AgateLib.ApplicationModels; +using AgateLib.DisplayLib; using AgateLib.DisplayLib.BitmapFont; using AgateLib.Geometry; using AgateLib.Resources.DC; @@ -21,7 +22,7 @@ public void SerializeFontResource() { AgateResourceCollection rc = new AgateResourceCollection(); - AgateLib.Core.Initialize(new FakeAgateFactory()); + AgateLib.Core.Initialize(new FakeAgateFactory(), new AssetLocations()); rc.Resources.Add("mainfont", new FontResource("times new roman", Modified: trunk/UnitTests/UserInterface/Css/LayoutTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-24 02:45:10 UTC (rev 1477) +++ trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-24 07:13:05 UTC (rev 1478) @@ -1,4 +1,5 @@ -using AgateLib.DisplayLib; +using AgateLib.ApplicationModels; +using AgateLib.DisplayLib; using AgateLib.DisplayLib.ImplementationBase; using AgateLib.Geometry; using AgateLib.Platform.WindowsForms.ApplicationModels; @@ -49,7 +50,7 @@ gui = new Gui(new FakeRenderer(), engine); - Core.Initialize(new FakeAgateFactory()); + Core.Initialize(new FakeAgateFactory(), new AssetLocations()); } private void RedoLayout() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-24 02:45:25
|
Revision: 1477 http://sourceforge.net/p/agate/code/1477 Author: kanato Date: 2014-08-24 02:45:10 +0000 (Sun, 24 Aug 2014) Log Message: ----------- Initial workings of Windows Phone implementation. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs trunk/AgateLib/Core.cs trunk/AgateLib/DisplayLib/DisplayWindow.cs trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs trunk/AgateLib/Drivers/IPlatformFactory.cs trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs trunk/AgateLib/Serialization/Xle/XleSerializer.cs trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs trunk/AgateLib.Platform.WindowsForms/Factories/PlatformFactory.cs trunk/AgateLib.sln trunk/Tests/DisplayTests/RotatingSpriteTester.cs trunk/UnitTests/Fakes/FakeDisplayWindow.cs trunk/UnitTests/Fakes/FakePlatformFactory.cs trunk/UnitTests/Serialization/Xle/XSTests.cs trunk/UnitTests/UnitTests.csproj Added Paths: ----------- trunk/AgateLib/Drivers/IPlatformSerialization.cs trunk/AgateLib.Platform.Common/ trunk/AgateLib.Platform.Common/AgateLib.Platform.Common.csproj trunk/AgateLib.Platform.Common/PlatformImplementation/ trunk/AgateLib.Platform.Common/PlatformImplementation/ActivatorConstructor.cs trunk/AgateLib.Platform.Common/PlatformImplementation/DiagnosticsStopwatch.cs trunk/AgateLib.Platform.Common/Properties/ trunk/AgateLib.Platform.Common/Properties/AssemblyInfo.cs trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModelParameters.cs trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleImpl.cs trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleTraceListener.cs trunk/AgateLib.Platform.WindowsPhone/ trunk/AgateLib.Platform.WindowsPhone/AgateLib.Platform.WindowsPhone.csproj trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/ trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsPhone/ApplicationModels/SceneModelParameters.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/D3DDevice.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/DrawBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferSurface.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/FrameBufferWindow.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Display.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_DisplayWindow.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_FrameBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_IndexBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_Surface.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/SDX_VertexBuffer.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDL_Lighting3DShader.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Basic2DShader.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/SDX_Lighting2DShader.cs trunk/AgateLib.Platform.WindowsPhone/DisplayImplementation/Shaders/ShaderFactory.cs trunk/AgateLib.Platform.WindowsPhone/Factories/ trunk/AgateLib.Platform.WindowsPhone/Factories/DisplayFactory.cs trunk/AgateLib.Platform.WindowsPhone/Factories/FakeFile.cs trunk/AgateLib.Platform.WindowsPhone/Factories/FakePath.cs trunk/AgateLib.Platform.WindowsPhone/Factories/WPPlatformFactory.cs trunk/AgateLib.Platform.WindowsPhone/Factories/WindowsPhoneFactory.cs trunk/AgateLib.Platform.WindowsPhone/Interop.cs trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/ trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/AssetFileProvider.cs trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/DiagnosticsStopwatch.cs trunk/AgateLib.Platform.WindowsPhone/PlatformImplementation/WPPlatformInfo.cs trunk/AgateLib.Platform.WindowsPhone/Properties/ trunk/AgateLib.Platform.WindowsPhone/Properties/AssemblyInfo.cs trunk/AgateLib.Platform.WindowsPhone/WindowsPhoneInitializer.cs trunk/AgateLib.Platform.WindowsPhone/packages.config trunk/Tests.WindowsPhone/ trunk/Tests.WindowsPhone/App.xaml trunk/Tests.WindowsPhone/App.xaml.cs trunk/Tests.WindowsPhone/Assets/ trunk/Tests.WindowsPhone/Assets/AlignmentGrid.png trunk/Tests.WindowsPhone/Assets/ApplicationIcon.png trunk/Tests.WindowsPhone/Assets/Tiles/ trunk/Tests.WindowsPhone/Assets/Tiles/FlipCycleTileLarge.png trunk/Tests.WindowsPhone/Assets/Tiles/FlipCycleTileMedium.png trunk/Tests.WindowsPhone/Assets/Tiles/FlipCycleTileSmall.png trunk/Tests.WindowsPhone/Assets/Tiles/IconicTileMediumLarge.png trunk/Tests.WindowsPhone/Assets/Tiles/IconicTileSmall.png trunk/Tests.WindowsPhone/LocalizedStrings.cs trunk/Tests.WindowsPhone/MainPage.xaml trunk/Tests.WindowsPhone/MainPage.xaml.cs trunk/Tests.WindowsPhone/Properties/ trunk/Tests.WindowsPhone/Properties/AppManifest.xml trunk/Tests.WindowsPhone/Properties/AssemblyInfo.cs trunk/Tests.WindowsPhone/Properties/WMAppManifest.xml trunk/Tests.WindowsPhone/Resources/ trunk/Tests.WindowsPhone/Resources/AppResources.Designer.cs trunk/Tests.WindowsPhone/Resources/AppResources.resx trunk/Tests.WindowsPhone/TestScene.cs trunk/Tests.WindowsPhone/Tests.WindowsPhone.csproj Removed Paths: ------------- trunk/AgateLib/Drivers/AgateDriverInfo.cs trunk/AgateLib/Drivers/AgateDriverReporter.cs trunk/AgateLib/Drivers/AgateSandBoxLoader.cs trunk/AgateLib/Drivers/IDesktopDriver.cs trunk/AgateLib/Drivers/IObjectConstructor.cs trunk/AgateLib/Drivers/IUserSetSystems.cs trunk/AgateLib/Drivers/Registrar.cs trunk/AgateLib/Drivers/TypeID.cs trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleImpl.cs trunk/AgateLib.Platform.WindowsForms/Diagnostics/AgateConsoleTraceListener.cs trunk/AgateLib.Platform.WindowsForms/Factories/ActivatorConstructor.cs trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/DiagnosticsStopwatch.cs Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/AgateLib.csproj 2014-08-24 02:45:10 UTC (rev 1477) @@ -34,42 +34,6 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <DebugType>full</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> - <OutputPath>bin\x86\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <Optimize>true</Optimize> - <DebugType>pdbonly</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x64\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <DebugType>full</DebugType> - <PlatformTarget>x64</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> - <OutputPath>bin\x64\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <Optimize>true</Optimize> - <DebugType>pdbonly</DebugType> - <PlatformTarget>x64</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> <ItemGroup> <!-- A reference to the entire .NET Framework is automatically included --> </ItemGroup> @@ -157,7 +121,7 @@ <Compile Include="Drivers\IAudioFactory.cs" /> <Compile Include="Drivers\IDisplayFactory.cs" /> <Compile Include="Drivers\IInputFactory.cs" /> - <Compile Include="Drivers\IObjectConstructor.cs" /> + <Compile Include="Drivers\IPlatformSerialization.cs" /> <Compile Include="Drivers\IPlatformFactory.cs" /> <Compile Include="ApplicationModels\ExitGameException.cs" /> <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> Modified: trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs =================================================================== --- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -10,5 +10,28 @@ public SceneAppModelBase(ModelParameters parameters) : base(parameters) { } + + public void Run(Scene scene) + { + if (SceneStack.Contains(scene) == false) + SceneStack.Add(scene); + + try + { + Initialize(); + AutoCreateDisplayWindow(); + PrerunInitialization(); + + BeginModel(); + } + finally + { + //DisposeAutoCreatedWindow(); + + //Dispose(); + } + } + + protected abstract void BeginModel(); } } Modified: trunk/AgateLib/Core.cs =================================================================== --- trunk/AgateLib/Core.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Core.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -324,7 +324,7 @@ return; mFactory = factory; - mPlatform = factory.PlatformFactory.CreatePlatformInfo(); + mPlatform = factory.PlatformFactory.Info; mTime = factory.PlatformFactory.CreateStopwatch(); FileSystem.File = factory.PlatformFactory.CreateFile(); Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs =================================================================== --- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -284,6 +284,7 @@ /// Gets or sets the position of the cursor, in the /// client coordinates of the window. /// </summary> + [Obsolete("Don't use this", true)] public Point MousePosition { get { return mImpl.MousePosition; } @@ -316,51 +317,8 @@ { get { return mImpl.IsFullScreen; } } - /// <summary> - /// Sets the display to windowed. Does nothing if the display is already - /// windowed. The DisplayWindow retains the same height and width as the - /// previous full screen resolution. - /// </summary> - [Obsolete("Instead of calling SetWindowed, you should create another DisplayWindow by calling DisplayWindow.CreateWindowed() and Dispose of the full screen DisplayWindow object.")] - public void SetWindowed() - { - mImpl.SetWindowed(); - } /// <summary> - /// Sets the display to a full screen Display. This overload uses the - /// desktop resolution for the full-screen Display. - /// </summary> - /// <remarks> - /// This call is not guaranteed to work; some drivers (eg. GDI) don't support - /// fullscreen displays. If this fails it returns without any error - /// thrown. Check to see if it worked by examining IsFullScreen property. - /// </remarks> - [Obsolete("Instead of calling SetFullScreen, you should create another DisplayWindow by calling DisplayWindow.CreateFullScreen()")] - public void SetFullScreen() - { - mImpl.SetFullScreen(); - } - /// <summary> - /// Sets the display to a full screen Display. The resolution chosen is - /// driver/video card/monitor dependent, but it should be fairly close to - /// values specified. - /// </summary> - /// <remarks> - /// This call is not guaranteed to work; some drivers (eg. GDI) don't support - /// fullscreen displays. If this fails it returns without any error - /// thrown. Check to see if it worked by examining IsFullScreen property. - /// </remarks> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="bpp"></param> - [Obsolete("Instead of calling SetFullScreen, you should create another DisplayWindow by calling DisplayWindow.CreateFullScreen()")] - public void SetFullScreen(int width, int height, int bpp) - { - mImpl.SetFullScreen(width, height, bpp); - } - - /// <summary> /// Creates an orthogonal projection matrix that maps drawing units onto pixels. /// </summary> public Matrix4x4 OrthoProjection Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -52,28 +52,6 @@ public abstract FrameBufferImpl FrameBuffer { get; } /// <summary> - /// Sets the display to windowed. Does nothing if the display is already - /// windowed. The DisplayWindow retains the same height and width as the - /// previous full screen resolution. - /// </summary> - public abstract void SetWindowed(); - - /// <summary> - /// Sets the display to a full screen Display. This overload should use the - /// same resolution as the desktop environment. - /// </summary> - public abstract void SetFullScreen(); - /// <summary> - /// Sets the display to a full screen Display. The resolution chosen is - /// driver/video card/monitor dependent, but it should be fairly close to - /// values specified. - /// </summary> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="bpp"></param> - public abstract void SetFullScreen(int width, int height, int bpp); - - /// <summary> /// Gets or sets the size of the render area. /// </summary> public abstract Size Size { get; set; } Deleted: trunk/AgateLib/Drivers/AgateDriverInfo.cs =================================================================== --- trunk/AgateLib/Drivers/AgateDriverInfo.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/AgateDriverInfo.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -1,216 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Text; -using AgateLib.AudioLib.ImplementationBase; -using AgateLib.DisplayLib.ImplementationBase; -using AgateLib.InputLib.ImplementationBase; - -namespace AgateLib.Drivers -{ - /// <summary> - /// Class which describes a driver for use by AgateLib. A class - /// inheriting from AgateDriverReporter should construct AgateDriverInfo - /// instances for each driver in a plug-in assembly. - /// </summary> - [Serializable] - public class AgateDriverInfo - { - private void SetValues(DriverType type, string driverTypeName, string friendlyName, int typeID, int priority) - { - mDriverTypeName = driverTypeName; - mFriendlyName = friendlyName; - mDriverType = type; - mDriverTypeID = (int)typeID; - mPriority = priority; - } - - /// <summary> - /// Constructs an AgateDriverInfo for a display driver. - /// </summary> - /// <param name="typeID">The DisplayTypeID member indicating what the driver uses.</param> - /// <param name="driverType">The System.Type object for the type inheriting from DisplayImpl.</param> - /// <param name="friendlyName">A friendly name to show the user when choosing a driver.</param> - /// <param name="priority">A integer indicating the priority of this driver over others which is used when autoselecting a driver.</param> - public AgateDriverInfo(DisplayTypeID typeID, Type driverType, string friendlyName, int priority) - { - if (typeof(DisplayImpl).IsAssignableFrom(driverType) == false || - driverType.IsAbstract == true) - { - throw new ArgumentException(string.Format( - "The type {0} is not a concrete implementation of DisplayImpl.")); - } - - SetValues(DriverType.Display, driverType.FullName, friendlyName, (int)typeID, priority); - } - /// <summary> - /// Constructs an AgateDriverInfo for an audio driver. - /// </summary> - /// <param name="typeID">The AudioTypeID member indicating what the driver uses.</param> - /// <param name="driverType">The System.Type object for the type inheriting from AudioImpl.</param> - /// <param name="friendlyName">A friendly name to show the user when choosing a driver.</param> - /// <param name="priority">A integer indicating the priority of this driver over others which is used when autoselecting a driver.</param> - public AgateDriverInfo(AudioTypeID typeID, Type driverType, string friendlyName, int priority) - { - if (typeof(AudioImpl).IsAssignableFrom(driverType) == false || - driverType.IsAbstract == true) - { - throw new ArgumentException(string.Format( - "The type {0} is not a concrete implementation of AudioImpl.")); - } - - SetValues(DriverType.Audio, driverType.FullName, friendlyName, (int)typeID, priority); - } - /// <summary> - /// Constructs an AgateDriverInfo for an input driver. - /// </summary> - /// <param name="typeID">The InputTypeID member indicating what the driver uses.</param> - /// <param name="driverType">The System.Type object for the type inheriting from InputImpl.</param> - /// <param name="friendlyName">A friendly name to show the user when choosing a driver.</param> - /// <param name="priority">A integer indicating the priority of this driver over others which is used when autoselecting a driver.</param> - public AgateDriverInfo(InputTypeID typeID, Type driverType, string friendlyName, int priority) - { - if (typeof(InputImpl).IsAssignableFrom(driverType) == false || - driverType.IsAbstract == true) - { - throw new ArgumentException(string.Format( - "The type {0} is not a concrete implementation of InputImpl.")); - } - - SetValues(DriverType.Input, driverType.FullName, friendlyName, (int)typeID, priority); - } - /// <summary> - /// Constructs an AgateDriverInfo for a desktop driver. - /// </summary> - /// <param name="typeID">The DesktopTypeID member indicating what the driver uses.</param> - /// <param name="driverType">The System.Type object for the type implementing IDesktopDriver.</param> - /// <param name="friendlyName">A friendly name to show the user when choosing a driver.</param> - /// <param name="priority">A integer indicating the priority of this driver over others which is used when autoselecting a driver.</param> - public AgateDriverInfo(DesktopTypeID typeID, Type driverType, string friendlyName, int priority) - { - if (typeof(IDesktopDriver).IsAssignableFrom(driverType) == false || - driverType.IsAbstract == true) - { - throw new ArgumentException(string.Format( - "The type {0} is not a concrete implementation of IDesktopDriver.")); - } - - SetValues(DriverType.Desktop, driverType.FullName, friendlyName, (int)typeID, priority); - } - - // These properties filled out by the driver - private string mDriverTypeName; - private string mFriendlyName; - private DriverType mDriverType; - private int mDriverTypeID; - private int mPriority; - - // These properties filled out by the registrar. - private string mAssemblyName; - private string mAssemblyFile; - - /// <summary> - /// Gets the fully qualified type name of the type implementing the driver routines. - /// </summary> - public string DriverTypeName - { - get { return mDriverTypeName; } - } - /// <summary> - /// Gets the friendly name that may be displayed to the user which identifies this driver. - /// </summary> - public string FriendlyName - { - get { return mFriendlyName; } - } - /// <summary> - /// Gets the type of driver. - /// </summary> - public DriverType DriverType - { - get { return mDriverType; } - } - /// <summary> - /// Gets the type id of this driver. This value should be cast to DisplayTypeID, AudioTypeID, etc. depending - /// on the value of DriverType. - /// </summary> - public int DriverTypeID - { - get { return mDriverTypeID; } - } - /// <summary> - /// Gets the priority of this driver when autoselecting which driver to use. - /// </summary> - public int Priority - { - get { return mPriority; } - } - - /// <summary> - /// Full name of the assembly. - /// </summary> - public string AssemblyName - { - get { return mAssemblyName; } - internal set { mAssemblyName = value; } - } - /// <summary> - /// Path to the assembly. - /// </summary> - public string AssemblyFile - { - get { return mAssemblyFile; } - internal set { mAssemblyFile = value; } - } - - /// <summary> - /// Gets a string representation of the AgateDriverInfo object. - /// </summary> - /// <returns></returns> - public override string ToString() - { - return "AgateDriverInfo: " + DriverTypeName + " in " + AssemblyFile; - } - } - - /// <summary> - /// Enum which indicates what type of driver is specified in an <c>AgateDriverInfo</c> structure. - /// </summary> - public enum DriverType - { - /// <summary> - /// Display driver - /// </summary> - Display, - /// <summary> - /// Audio driver - /// </summary> - Audio, - /// <summary> - /// Input driver - /// </summary> - Input, - /// <summary> - /// Desktop driver - /// </summary> - Desktop, - } - -} \ No newline at end of file Deleted: trunk/AgateLib/Drivers/AgateDriverReporter.cs =================================================================== --- trunk/AgateLib/Drivers/AgateDriverReporter.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/AgateDriverReporter.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -1,41 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Text; - -namespace AgateLib.Drivers -{ - /// <summary> - /// Class which is used by the <c>Registrar</c> to enumerate the drivers available - /// in a satellite assembly. Any assembly with drivers for use by AgateLib should - /// have a class inheriting from AgateDriverReporter and should construct AgateDriverInfo - /// objects for each driver in the assembly. - /// </summary> - [Serializable] - public abstract class AgateDriverReporter - { - /// <summary> - /// Constructs and returns AgateDriverInfo objects for each driver - /// in the hosted assembly. - /// </summary> - /// <returns></returns> - public abstract IEnumerable<AgateDriverInfo> ReportDrivers(); - } -} Deleted: trunk/AgateLib/Drivers/AgateSandBoxLoader.cs =================================================================== --- trunk/AgateLib/Drivers/AgateSandBoxLoader.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/AgateSandBoxLoader.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -1,134 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Reflection; - -namespace AgateLib.Drivers -{ - class AgateSandBoxLoader : MarshalByRefObject - { - public AgateDriverInfo[] ReportDrivers(string file) - { - List<AgateDriverInfo> retval = new List<AgateDriverInfo>(); - Assembly ass; - - try - { - ass = Assembly.LoadFrom(file); - Trace.WriteLine("Loaded assembly " + file + " in sandbox."); - } - catch (BadImageFormatException) - { - Trace.WriteLine(string.Format("Could not load the file {0}.", file)); - Trace.WriteLine("BadImageFormatException caught. This file probably is not a CLR assembly."); - - return retval.ToArray(); - } - catch (FileLoadException e) - { - Trace.WriteLine(string.Format("Could not load the file {0}.", file)); - Trace.WriteLine("FileLoadException caught:"); - Trace.Indent(); - Trace.WriteLine(e.Message); - Trace.Unindent(); - - return retval.ToArray(); - } - catch (Exception e) - { - Trace.WriteLine(string.Format("Could not load the file {0}.", file)); - Trace.WriteLine(string.Format("{0} caught:"), e.GetType().Name); - Trace.Indent(); - Trace.WriteLine(e.Message); - Trace.Unindent(); - - return retval.ToArray(); - } - - - Type[] types; - - try - { - types = ass.GetTypes(); - } - catch (ReflectionTypeLoadException e) - { - string message = string.Format( - "Caught ReflectionTypeLoadException in {0}.", file); - - foreach (var ex in e.LoaderExceptions) - { - message += Environment.NewLine; - message += ex.Message; - } - - message += Environment.NewLine + - "This is probably a sign that the build of the file " + file + - " does not match the build of AgateLib.dll."; - - Trace.WriteLine(message); - - return retval.ToArray(); - } - catch (Exception e) - { - Trace.WriteLine(string.Format( - "Could not load types in the file {0}. Check to make sure its dependencies are available. " + - "Caught exception {1}. {2}", file, e.GetType().ToString(), e.Message)); - - return retval.ToArray(); - } - - foreach (Type t in types) - { - if (t.IsAbstract) - continue; - if (typeof(AgateDriverReporter).IsAssignableFrom(t) == false) - continue; - - AgateDriverReporter reporter = (AgateDriverReporter)Activator.CreateInstance(t); - - try - { - foreach (AgateDriverInfo info in reporter.ReportDrivers()) - { - info.AssemblyFile = file; - info.AssemblyName = ass.FullName; - - retval.Add(info); - } - } - catch (Exception e) - { - Trace.WriteLine(string.Format( - "The driver reporter in {0} encountered an error." + Environment.NewLine + - "Caught exception {1}." + Environment.NewLine + - "{2}", file, e.GetType().Name, e.Message)); - } - } - - return retval.ToArray(); - } - } -} \ No newline at end of file Deleted: trunk/AgateLib/Drivers/IDesktopDriver.cs =================================================================== --- trunk/AgateLib/Drivers/IDesktopDriver.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/IDesktopDriver.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -1,47 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Text; - -namespace AgateLib.Drivers -{ - /// <summary> - /// An interface which provides a basic user interface for things which can't - /// be done with the driver system. - /// </summary> - public interface IDesktopDriver - { - /// <summary> - /// Creates an object which provides an interface to ask the user which drivers - /// to use. - /// </summary> - /// <returns></returns> - IUserSetSystems CreateUserSetSystems(); - - /// <summary> - /// Shows an error dialog using the operating system's methods. - /// </summary> - /// <param name="message"></param> - /// <param name="e">The exception causing the error. This parameter may be null, - /// and it is important that the implementation does not choke on a null value for e.</param> - /// <param name="level"></param> - void ShowErrorDialog(string message, Exception e, ErrorLevel level); - } -} Deleted: trunk/AgateLib/Drivers/IObjectConstructor.cs =================================================================== --- trunk/AgateLib/Drivers/IObjectConstructor.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/IObjectConstructor.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -1,30 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AgateLib.Drivers -{ - public interface IObjectConstructor - { - object CreateInstance(Type t); - } -} Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -26,7 +26,7 @@ { public interface IPlatformFactory { - PlatformInfo CreatePlatformInfo(); + PlatformInfo Info { get; } IStopwatch CreateStopwatch(); @@ -40,6 +40,6 @@ IReadFileProvider CreateAssetFileProvider(); - IObjectConstructor CreateDefaultSerializationConstructor(); + IPlatformSerialization CreateDefaultSerializationConstructor(); } } Copied: trunk/AgateLib/Drivers/IPlatformSerialization.cs (from rev 1475, trunk/AgateLib/Drivers/IObjectConstructor.cs) =================================================================== --- trunk/AgateLib/Drivers/IPlatformSerialization.cs (rev 0) +++ trunk/AgateLib/Drivers/IPlatformSerialization.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -0,0 +1,30 @@ +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Drivers +{ + public interface IPlatformSerialization + { + object CreateInstance(Type t); + } +} Deleted: trunk/AgateLib/Drivers/IUserSetSystems.cs =================================================================== --- trunk/AgateLib/Drivers/IUserSetSystems.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/IUserSetSystems.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -1,91 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Text; - -namespace AgateLib.Drivers -{ - /// <summary> - /// Enum for the results of a call to IUserSetSystem.RunDialog - /// </summary> - public enum SetSystemsDialogResult - { - /// <summary> - /// Value for when the user pressed OK - /// </summary> - OK, - /// <summary> - /// Value for when the user pressed CANCEL - /// </summary> - Cancel, - } - /// <summary> - /// Interface for asking the user which Agate drivers to invoke. - /// </summary> - public interface IUserSetSystems - { - /// <summary> - /// Adds a Display driver to the possible options. - /// </summary> - /// <param name="info"></param> - void AddDisplayType(AgateDriverInfo info); - /// <summary> - /// Adds a Audio driver to the possible options. - /// </summary> - /// <param name="info"></param> - void AddAudioType(AgateDriverInfo info); - /// <summary> - /// Adds a Input driver to the possible options. - /// </summary> - /// <param name="info"></param> - void AddInputType(AgateDriverInfo info); - - /// <summary> - /// Shows the dialog asking the user what drivers to use. - /// </summary> - /// <returns></returns> - SetSystemsDialogResult RunDialog(); - - /// <summary> - /// gets the selected Display driver - /// </summary> - DisplayTypeID DisplayType { get; } - /// <summary> - /// Gets the selected Audio driver - /// </summary> - AudioTypeID AudioType { get; } - /// <summary> - /// Gets the selected Input driver - /// </summary> - InputTypeID InputType { get; } - - /// <summary> - /// Sets which choices the user is presented with. - /// </summary> - /// <param name="chooseDisplay"></param> - /// <param name="chooseAudio"></param> - /// <param name="chooseInput"></param> - /// <param name="preferredAudio"></param> - /// <param name="preferredDisplay"></param> - /// <param name="preferredInput"></param> - void SetChoices(bool chooseDisplay, bool chooseAudio, bool chooseInput, - DisplayTypeID preferredDisplay, AudioTypeID preferredAudio, InputTypeID preferredInput); - } -} Deleted: trunk/AgateLib/Drivers/Registrar.cs =================================================================== --- trunk/AgateLib/Drivers/Registrar.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/Registrar.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -1,585 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Reflection; -using System.Text; -using AgateLib.AudioLib.ImplementationBase; -using AgateLib.DisplayLib.ImplementationBase; -using AgateLib.InputLib.ImplementationBase; -using AgateLib.Utility; - -namespace AgateLib.Drivers -{ - /// <summary> - /// Static class with which drivers register themselves so that the library can - /// instantiate them. - /// </summary> - public static class Registrar - { - private static List<AgateDriverInfo> - displayDrivers = new List<AgateDriverInfo>(), - audioDrivers = new List<AgateDriverInfo>(), - inputDrivers = new List<AgateDriverInfo>(), - desktopDrivers = new List<AgateDriverInfo>(); - - private static AgateDriverInfo mDisplayUsed; - private static AgateDriverInfo mAudioUsed; - private static AgateDriverInfo mInputUsed; - - private static bool mIsInitialized = false; - - private static IDesktopDriver mDesktop; - - private static readonly string[] KnownNativeLibraries = new string[] - { - "SDL.dll", - "SDL_mixer.dll", - "libogg-0.dll", - "libvorbis-0.dll", - "libvorbisfile-3.dll", - }; - - - static bool Contains(this IEnumerable<AgateDriverInfo> list, DisplayTypeID type) - { - return list.Any( - x => Comparator(x, DriverType.Display, (int)type)); - } - static bool Contains(this IEnumerable<AgateDriverInfo> list, AudioTypeID type) - { - return list.Any( - x => Comparator(x, DriverType.Audio, (int)type)); - } - static bool Contains(this IEnumerable<AgateDriverInfo> list, InputTypeID type) - { - return list.Any( - x => Comparator(x, DriverType.Input, (int)type)); - } - static bool Comparator(AgateDriverInfo info, DriverType driverType, int type) - { - return info.DriverType == driverType && info.DriverTypeID == type; - } - - static Registrar() - { - } - /// <summary> - /// Searches through FileManager.AssemblyPath for all *.dll files. These files - /// are loaded and searched for classes which derive from DisplayImpl, AudioImpl, etc. - /// </summary> - internal static void Initialize() - { - if (mIsInitialized) - return; - - RegisterNullDrivers(); - - AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); - AppDomain sandbox = AppDomain.CreateDomain("AgateSandBox", null, - new AppDomainSetup - { - ApplicationBase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase - }); - - AgateSandBoxLoader loader = (AgateSandBoxLoader) - sandbox.CreateInstanceAndUnwrap(Assembly.GetExecutingAssembly().FullName, - typeof(AgateSandBoxLoader).FullName); - - IEnumerable<string> files = AgateFileProvider.Assemblies.GetAllFiles("*.dll"); - - Trace.AutoFlush = true; - - foreach (string file in files) - { - if (ShouldSkipLibrary(file)) - continue; - - Trace.WriteLine("Probing " + file + "..."); - Trace.Indent(); - - int driverCount = 0; - - foreach (AgateDriverInfo info in loader.ReportDrivers(file)) - { - Trace.WriteLine("Found driver " + info.FriendlyName); - driverCount++; - - switch (info.DriverType) - { - case DriverType.Display: - displayDrivers.Add(info); - break; - - case DriverType.Audio: - audioDrivers.Add(info); - break; - - case DriverType.Input: - inputDrivers.Add(info); - break; - - case DriverType.Desktop: - desktopDrivers.Add(info); - break; - - default: - Core.ErrorReporting.Report(ErrorLevel.Warning, string.Format( - "Could not interpret DriverType returned by type {0} in assembly {1}.", - info.DriverTypeName, info.AssemblyFile), null); - - break; - } - } - - if (driverCount == 0) - Trace.WriteLine("No drivers found in " + file + "."); - - Trace.Unindent(); - } - - AppDomain.Unload(sandbox); - - SortDriverInfo(displayDrivers); - SortDriverInfo(audioDrivers); - SortDriverInfo(inputDrivers); - SortDriverInfo(desktopDrivers); - - mIsInitialized = true; - } - private static void SortDriverInfo(List<AgateDriverInfo> driverList) - { - // sorts the driver list in reverse order. - driverList.Sort(delegate(AgateDriverInfo a, AgateDriverInfo b) - { - return -a.Priority.CompareTo(b.Priority); - }); - } - - private static void RegisterNullDrivers() - { - Assembly thisAssembly = Assembly.GetExecutingAssembly(); - - AgateDriverInfo nullAudioInfo = new AgateDriverInfo(AudioTypeID.Silent, - typeof(NullSoundImpl), "No audio", -100); - - nullAudioInfo.AssemblyFile = thisAssembly.CodeBase; - nullAudioInfo.AssemblyName = thisAssembly.FullName; - - audioDrivers.Add(nullAudioInfo); - - AgateDriverInfo nullInputInfo = new AgateDriverInfo(InputTypeID.Silent, - typeof(NullInputImpl), "No input", -100); - - nullInputInfo.AssemblyFile = thisAssembly.CodeBase; - nullInputInfo.AssemblyName = thisAssembly.FullName; - - inputDrivers.Add(nullInputInfo); - } - - private static bool ShouldSkipLibrary(string file) - { - // Native libraries in the same directory will give an error when loaded, - // so skip any ones that we know about that will probably be in the same - // directory as the drivers. - if (IsKnownNativeLibrary(file)) - return true; - - // hack, because mono crashes if AgateMDX.dll is present. - // annoying, because it should report a failure to load the types in the - // assembly, and then the try catch should continue after that. - // TODO: this hack seems unnecessary in recent versions of Mono. Should it be removed? - if ((Environment.OSVersion.Platform == PlatformID.Unix || - Environment.OSVersion.Platform == (PlatformID)128) && - (System.IO.Path.GetFileName(file).ToLower().Contains("agatemdx.dll") || - System.IO.Path.GetFileName(file).ToLower().Contains("agatesdx.dll"))) - { - Core.ErrorReporting.Report(ErrorLevel.Comment, - string.Format("DirectX not supported on non-Windows platforms. {0}Remove {1} to eliminate this message.", - Environment.NewLine, System.IO.Path.GetFileName(file)), null); - - return true; - } - - // Skip the agatelib dll. - if (System.IO.Path.GetFileName(file).ToLower().Contains("agatelib.dll")) - return true; - - return false; - } - private static bool IsKnownNativeLibrary(string path) - { - string filename = System.IO.Path.GetFileName(path).ToLowerInvariant(); - - for (int i = 0; i < KnownNativeLibraries.Length; i++) - { - if (KnownNativeLibraries[i].ToLowerInvariant() == filename) - return true; - } - return false; - } - - - /// <summary> - /// Asks the user to select which drivers to use. - /// </summary> - /// <param name="chooseDisplay"></param> - /// <param name="chooseAudio"></param> - /// <param name="chooseInput"></param> - /// <param name="selectedDisplay"></param> - /// <param name="selectedAudio"></param> - /// <param name="selectedInput"></param> - /// <returns></returns> - internal static bool UserSelectDrivers(bool chooseDisplay, bool chooseAudio, bool chooseInput, - DisplayTypeID preferredDisplay, AudioTypeID preferredAudio, InputTypeID preferredInput, - out DisplayTypeID selectedDisplay, out AudioTypeID selectedAudio, out InputTypeID selectedInput) - { - if (mDesktop == null) - { - CreateDesktopDriver(); - - if (mDesktop == null) - { - SelectBestDrivers(chooseDisplay, chooseAudio, chooseInput, - preferredDisplay, preferredAudio, preferredInput, - out selectedDisplay, out selectedAudio, out selectedInput); - - return true; - } - } - - IUserSetSystems frm = mDesktop.CreateUserSetSystems(); - - // set default values. - selectedDisplay = DisplayTypeID.AutoSelect; - selectedAudio = AudioTypeID.AutoSelect; - selectedInput = InputTypeID.AutoSelect; - - foreach (AgateDriverInfo info in displayDrivers) - { - frm.AddDisplayType(info); - } - foreach (AgateDriverInfo info in audioDrivers) - { - frm.AddAudioType(info); - } - foreach (AgateDriverInfo info in inputDrivers) - { - frm.AddInputType(info); - } - - frm.SetChoices(chooseDisplay, chooseAudio, chooseInput, - preferredDisplay, preferredAudio, preferredInput); - - // run the dialog asking user which drivers to use. - if (frm.RunDialog() == SetSystemsDialogResult.Cancel) - { - return false; - } - - selectedDisplay = frm.DisplayType; - selectedAudio = frm.AudioType; - selectedInput = frm.InputType; - - return true; - - } - - private static void SelectBestDrivers(bool chooseDisplay, bool chooseAudio, bool chooseInput, - DisplayTypeID preferredDisplay, AudioTypeID preferredAudio, InputTypeID preferredInput, - out DisplayTypeID selectedDisplay, out AudioTypeID selectedAudio, out InputTypeID selectedInput) - { - // initial return values if a driver isn't selected. - selectedDisplay = DisplayTypeID.AutoSelect; - selectedAudio = AudioTypeID.AutoSelect; - selectedInput = InputTypeID.AutoSelect; - - if (preferredDisplay != DisplayTypeID.AutoSelect && displayDrivers.Contains(preferredDisplay)) - selectedDisplay = preferredDisplay; - else if (displayDrivers.Count > 0) - selectedDisplay = (DisplayTypeID)displayDrivers[0].DriverTypeID; - - if (preferredAudio != AudioTypeID.AutoSelect && audioDrivers.Contains(preferredAudio)) - selectedAudio = preferredAudio; - else if (audioDrivers.Count > 0) - selectedAudio = (AudioTypeID)audioDrivers[0].DriverTypeID; - - if (preferredInput != InputTypeID.AutoSelect && inputDrivers.Contains(preferredInput)) - selectedInput = preferredInput; - else if (inputDrivers.Count > 0) - selectedInput = (InputTypeID)inputDrivers[0].DriverTypeID; - } - - private static void CreateDesktopDriver() - { - if (desktopDrivers.Count == 0) - return; - - mDesktop = (IDesktopDriver)CreateDriverInstance(desktopDrivers[0]); - } - - internal static IDesktopDriver WinForms - { - get { return mDesktop; } - } - - public static bool IgnoreSavedSettings { get; set; } - internal static DisplayImpl CreateDisplayDriver(DisplayTypeID displayType) - { - if (TypeRegistry.DisplayDriver != null) - return (DisplayImpl)Activator.CreateInstance(TypeRegistry.DisplayDriver); - - if (displayDrivers.Count == 0) - throw new AgateException("No display drivers registered."); - - AgateDriverInfo info = null; - string text; - - bool settingsSelect = displayType == DisplayTypeID.AutoSelect; - settingsSelect &= Core.Settings["AgateLib"].TryGetValue("DisplayDriver", out text); - settingsSelect &= !IgnoreSavedSettings; - - if (settingsSelect) - { - info = FindDriverInfo(displayDrivers, text); - - if (info == null) - settingsSelect = false; - } - - if (settingsSelect == false) - info = FindDriverInfo(displayDrivers, (int)displayType); - - if (info == null) - throw new AgateException(string.Format("Could not find the driver {0}.", displayType)); - - Core.Settings["AgateLib"]["DisplayDriver"] = info.FriendlyName; - mDisplayUsed = info; - - return (DisplayImpl)CreateDriverInstance(info); - } - internal static AudioImpl CreateAudioDriver(AudioTypeID audioType) - { - if (audioDrivers.Count == 0) - throw new AgateException("No audio drivers registered."); - - AgateDriverInfo info = null; - string text; - - bool settingsSelect = audioType == AudioTypeID.AutoSelect; - settingsSelect &= Core.Settings["AgateLib"].TryGetValue("AudioDriver", out text); - settingsSelect &= !IgnoreSavedSettings; - - if (settingsSelect) - { - info = FindDriverInfo(audioDrivers, text); - - if (info == null) - settingsSelect = false; - } - - if (settingsSelect == false) - info = FindDriverInfo(audioDrivers, (int)audioType); - - if (info == null) - throw new AgateException(string.Format("Could not find the driver {0}.", audioType)); - - if (info.DriverTypeName.Contains("NullSoundImpl") == false) - { - Core.Settings["AgateLib"]["AudioDriver"] = info.FriendlyName; - } - - mAudioUsed = info; - - return (AudioImpl)CreateDriverInstance(info); - } - internal static InputImpl CreateInputDriver(InputTypeID inputType) - { - if (inputDrivers.Count == 0) - throw new AgateException("No audio drivers registered."); - - AgateDriverInfo info = null; - string text; - - bool settingsSelect = inputType == InputTypeID.AutoSelect; - settingsSelect &= Core.Settings["AgateLib"].TryGetValue("InputDriver", out text); - settingsSelect &= !IgnoreSavedSettings; - - if (settingsSelect) - { - info = FindDriverInfo(inputDrivers, text); - - if (info == null) - settingsSelect = false; - } - - if (settingsSelect == false) - info = FindDriverInfo(inputDrivers, (int)inputType); - - if (info == null) - throw new AgateException(string.Format("Could not find the driver {0}.", inputType)); - - if (info.DriverTypeName.Contains("NullInputImpl") == false) - { - Core.Settings["AgateLib"]["InputDriver"] = info.FriendlyName; - } - - mInputUsed = info; - - return (InputImpl)CreateDriverInstance(info); - } - - private static AgateDriverInfo FindDriverInfo(List<AgateDriverInfo> driverList, string matchText) - { - AgateDriverInfo retval = null; - - if (driverList.Count == 0) - return null; - - foreach(AgateDriverInfo info in driverList) - { - if (info.FriendlyName.Contains(matchText)) - retval = info; - } - - return retval; - } - private static AgateDriverInfo FindDriverInfo(List<AgateDriverInfo> driverList, int typeID) - { - AgateDriverInfo theInfo = null; - - if (driverList.Count == 0) - return null; - - // autoselect ID's are all zero - if (typeID == 0) - return driverList[0]; - - foreach (AgateDriverInfo info in driverList) - { - if (info.DriverTypeID != typeID) - continue; - - theInfo = info; - } - return theInfo; - } - private static AgateDriverInfo FindDriverInfo(IEnumerable<AgateDriverInfo> driverList, string assemblyFullName) - { - AgateDriverInfo theInfo = null; - - foreach (AgateDriverInfo info in driverList) - { - if (info.AssemblyName != assemblyFullName) - continue; - - theInfo = info; - } - return theInfo; - } - - private static object CreateDriverInstance(AgateDriverInfo info) - { - Assembly ass = Assembly.Load(info.AssemblyName); - - Type driverType = ass.GetType(info.DriverTypeName, false); - - if (driverType == null) - throw new AgateException(string.Format( - "Could not find the type {0} in the library {1}.", - info.DriverTypeName, - ass.FullName)); - - return Activator.CreateInstance(driverType); - } - - private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) - { - AgateDriverInfo info = null; - - info = info ?? FindDriverInfo(displayDrivers, args.Name); - info = info ?? FindDriverInfo(audioDrivers, args.Name); - info = info ?? FindDriverInfo(inputDrivers, args.Name); - info = info ?? FindDriverInfo(desktopDrivers, args.Name); - - if (info == null) - return null; - - return LoadAssemblyLoadFrom(info); - } - private static Assembly LoadAssemblyLoadFrom(AgateDriverInfo info) - { - Core.ErrorReporting.Report(ErrorLevel.Warning, - string.Format("Assembly {0} was loaded in the LoadFrom context. Move it to the application directory to load in the Load context.", info.AssemblyName), null); - return Assembly.LoadFrom(info.AssemblyFile); - } - - /// <summary> - /// Returns a collection with all the AgateDriverInfo structures for - /// registered display drivers. - /// </summary> - /// <returns></returns> - public static List<AgateDriverInfo> DisplayDrivers - { - get { return displayDrivers; } - } - /// <summary> - /// Returns a collection with all the AgateDriverInfo structures for - /// registered display drivers. - /// </summary> - /// <returns></returns> - public static List<AgateDriverInfo> AudioDrivers - { - get { return audioDrivers; } - } - /// <summary> - /// Returns a collection with all the AgateDriverInfo structures for - /// registered display drivers. - /// </summary> - /// <returns></returns> - public static List<AgateDriverInfo> InputDrivers - { - get { return inputDrivers; } - } - - /// <summary> - /// Returns the AgateDriverInfo for the initialized display driver. - /// </summary> - public static AgateDriverInfo DisplayUsed - { - get { return mDisplayUsed; } - } - /// <summary> - /// Returns the AgateDriverInfo for the initialized audio driver. - /// </summary> - public static AgateDriverInfo AudioUsed - { - get { return mAudioUsed; } - } - /// <summary> - /// Returns the AgateDriverInfo for the initialized input driver. - /// </summary> - public static AgateDriverInfo InputUsed - { - get { return mInputUsed; } - } - } -} Deleted: trunk/AgateLib/Drivers/TypeID.cs =================================================================== --- trunk/AgateLib/Drivers/TypeID.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Drivers/TypeID.cs 2014-08-24 02:45:10 UTC (rev 1477) @@ -1,174 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Text; - -namespace AgateLib.Drivers -{ - - /// <summary> - /// List of identifiers of known or planned display drivers. - /// </summary> - /// <remarks> - /// This really seems like an overengineered piece of garbage - /// designed just to use constraints in generic collections. - /// I'd get rid of the whole thing and replace it with enums, but - /// it's currently working, and I don't have any need to change it. - /// But if the need ever arises, I will redo this whole thing. - /// </remarks> - public enum DisplayTypeID - { - - /// <summary> - /// Specifies that the Registrar should automatically select the best available - /// display driver for the system. - /// </summary> - AutoSelect = 0, - - /// <summary> - /// The software System.Drawing driver. This is useful for - /// debugging the development of a new driver, as it should behave exactly like the - /// reference driver for 2D drawing. - /// </summary> - Drawing = 1, - /// <summary> - /// The software System.Drawing driver. This enum value is obsolete, use - /// DisplayTypeID.Drawing instead. - /// </summary> - [Obsolete] - Reference = 1, - - /// <summary> - /// Driver Implementation using SlimDX. - /// </summary> - Direct3D9_SDX = 0x120, - - /// <summary> - /// Driver Implementation using Managed DirectX 1.1. - /// </summary> - Direct3D_MDX_1_1 = 0x100, - - /// <summary> - /// Driver Implementation using XNA Studio. - /// </summary> - Direct3D_XNA = 0x110, - - /// <summary> - /// Driver implememtation using OpenGL, with some platform-independent library for window - /// creation. - /// </summary> - OpenGL = 0x210, - - /// <summary> - /// Driver implementation using SDL. SDL.NET does not support many of the basic features - /// of this library (notably, rotation of images) so is not considered an adequate driver - /// for general purpose use. However it may be the only driver available for certain target - /// platforms. - /// </summary> - SDL = 0x300, - - }; - - /// <summary> - /// List of identifiers of known or planned audio drivers. - /// </summary> - public enum AudioTypeID - { - - /// <summary> - /// Specifies that the Registrar should automatically select the best available - /// audio driver for the system. - /// </summary> - AutoSelect = 0, - - /// <summary> - /// A driver which does nothing. - /// </summary> - Silent = -0x100, - - /// <summary> - /// A DirectSound implementation. - /// </summary> - DirectSound = 0x100, - /// <summary> - /// Implementation using XAudio2, the new replacement for DirectSound. - /// </summary> - XAudio2 = 0x110, - - /// <summary> - /// Implementation using the cross-platform OpenAL library. - /// </summary> - OpenAL = 0x200, - - /// <summary> - /// Implementation using the cross-platform FMod library. - /// </summary> - FMod = 0x300, - - /// <summary> - /// Implementation using the SDL library. - /// </summary> - SDL = 0x400, - } - - /// <summary> - /// List of identifiers of known or planned input drivers. - /// </summary> - public enum InputTypeID - { - /// <summary> - /// Specifies that the Registrar should automatically select the best available - /// audio driver for the system. - /// </summary> - AutoSelect = 0, - - /// <summary> - /// A driver with no joysticks. - /// </summary> - Silent = -0x100, - - /// <summary> - /// A DirectInput implementation. - /// </summary> - DirectInput = 0x100, - /// <summary> - /// Implementation using the XNA framework. - /// </summary> - XInput = 0x110, - - /// <summary> - /// Driver implementation using SDL. - /// </summary> - SDL = 0x300, - } - - /// <summary> - /// List of identifiers for known or planned desktop drivers. - /// </summary> - public enum DesktopTypeID - { - /// <summary> - /// Desktop driver which uses System.Windows.Forms to interact - /// with the user. - /// </summary> - WinForms = 0x100, - } - -} Modified: trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs =================================================================== --- trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-08-23 21:28:36 UTC (rev 1476) +++ trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2014-08-24 02:45:10 ... [truncated message content] |
From: <ka...@us...> - 2014-08-23 21:28:43
|
Revision: 1476 http://sourceforge.net/p/agate/code/1476 Author: kanato Date: 2014-08-23 21:28:36 +0000 (Sat, 23 Aug 2014) Log Message: ----------- Convert OpenTK reference to nuget reference. Modified Paths: -------------- trunk/AgateLib-Everything.sln trunk/AgateLib.GL/AgateLib.GL.csproj trunk/AgateLib.GL/GL3/Shaders/ShaderSources.Designer.cs trunk/AgateLib.GL/packages.config trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj trunk/AgateLib.Platform.WindowsForms/WinForms/Icons.Designer.cs trunk/AgateLib.Platform.WindowsForms/packages.config trunk/AgateLib.sln Removed Paths: ------------- trunk/AgateLib.GL/OpenTK.dll trunk/AgateLib.GL/OpenTK.dll.config trunk/AgateLib.GL/OpenTK.xml Modified: trunk/AgateLib-Everything.sln =================================================================== --- trunk/AgateLib-Everything.sln 2014-08-23 20:11:39 UTC (rev 1475) +++ trunk/AgateLib-Everything.sln 2014-08-23 21:28:36 UTC (rev 1476) @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30501.0 +VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{6AFA2E43-361A-4AA6-83D9-6DE946C1F0B6}" ProjectSection(SolutionItems) = preProject @@ -40,92 +40,221 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x86 = Debug|x86 Public|Any CPU = Public|Any CPU + Public|ARM = Public|ARM + Public|x86 = Public|x86 Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|ARM.ActiveCfg = Debug|Any CPU + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.ActiveCfg = Debug|x86 + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.Build.0 = Debug|x86 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Any CPU.ActiveCfg = Release|x86 + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|ARM.ActiveCfg = Release|Any CPU + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x86.ActiveCfg = Debug|x86 + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x86.Build.0 = Debug|x86 {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|ARM.ActiveCfg = Release|Any CPU + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.ActiveCfg = Release|x86 + {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.Build.0 = Release|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|ARM.ActiveCfg = Debug|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|x86 + {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Any CPU.ActiveCfg = Release|x86 + {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|ARM.ActiveCfg = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.ActiveCfg = Debug|x86 + {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.Build.0 = Debug|x86 {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|ARM.ActiveCfg = Release|Any CPU + {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86 + {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.Build.0 = Release|x86 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.ActiveCfg = Debug|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Debug|x86.Build.0 = Debug|x86 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Any CPU.ActiveCfg = Release|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|Any CPU.Build.0 = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|ARM.ActiveCfg = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.ActiveCfg = Release|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Public|x86.Build.0 = Release|x86 {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|Any CPU.Build.0 = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|ARM.ActiveCfg = Release|Any CPU + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.ActiveCfg = Release|x86 + {F22ADCCC-7991-4F52-B2D0-697D60121BB3}.Release|x86.Build.0 = Release|x86 {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|ARM.ActiveCfg = Debug|Any CPU + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|x86.ActiveCfg = Debug|x86 + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|x86.Build.0 = Debug|x86 {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Public|Any CPU.ActiveCfg = Release|Any CPU {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Public|Any CPU.Build.0 = Release|Any CPU + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Public|ARM.ActiveCfg = Release|Any CPU + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Public|x86.ActiveCfg = Release|x86 + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Public|x86.Build.0 = Release|x86 {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|Any CPU.ActiveCfg = Release|Any CPU {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|Any CPU.Build.0 = Release|Any CPU + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|ARM.ActiveCfg = Release|Any CPU + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|x86.ActiveCfg = Release|x86 + {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|x86.Build.0 = Release|x86 {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|ARM.ActiveCfg = Debug|Any CPU + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|x86.ActiveCfg = Debug|x86 + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|x86.Build.0 = Debug|x86 {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Public|Any CPU.ActiveCfg = Release|Any CPU {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Public|Any CPU.Build.0 = Release|Any CPU + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Public|ARM.ActiveCfg = Release|Any CPU + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Public|x86.ActiveCfg = Release|x86 + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Public|x86.Build.0 = Release|x86 {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|Any CPU.ActiveCfg = Release|Any CPU {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|Any CPU.Build.0 = Release|Any CPU + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|ARM.ActiveCfg = Release|Any CPU + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|x86.ActiveCfg = Release|x86 + {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|x86.Build.0 = Release|x86 {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|ARM.ActiveCfg = Debug|Any CPU + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|x86.ActiveCfg = Debug|x86 + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|x86.Build.0 = Debug|x86 {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Public|Any CPU.ActiveCfg = Release|Any CPU {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Public|Any CPU.Build.0 = Release|Any CPU + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Public|ARM.ActiveCfg = Release|Any CPU + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Public|x86.ActiveCfg = Release|x86 + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Public|x86.Build.0 = Release|x86 {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|Any CPU.ActiveCfg = Release|Any CPU {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|Any CPU.Build.0 = Release|Any CPU + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|ARM.ActiveCfg = Release|Any CPU + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|x86.ActiveCfg = Release|x86 + {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|x86.Build.0 = Release|x86 {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|ARM.ActiveCfg = Debug|Any CPU + {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|x86.ActiveCfg = Debug|x86 + {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|x86.Build.0 = Debug|x86 {91F57346-B574-4D52-9EB0-AA191B552C94}.Public|Any CPU.ActiveCfg = Release|Any CPU {91F57346-B574-4D52-9EB0-AA191B552C94}.Public|Any CPU.Build.0 = Release|Any CPU + {91F57346-B574-4D52-9EB0-AA191B552C94}.Public|ARM.ActiveCfg = Release|Any CPU + {91F57346-B574-4D52-9EB0-AA191B552C94}.Public|x86.ActiveCfg = Release|x86 + {91F57346-B574-4D52-9EB0-AA191B552C94}.Public|x86.Build.0 = Release|x86 {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|Any CPU.ActiveCfg = Release|Any CPU {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|Any CPU.Build.0 = Release|Any CPU + {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|ARM.ActiveCfg = Release|Any CPU + {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x86.ActiveCfg = Release|x86 + {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x86.Build.0 = Release|x86 {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|ARM.ActiveCfg = Debug|Any CPU + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x86.ActiveCfg = Debug|x86 + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x86.Build.0 = Debug|x86 {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Public|Any CPU.ActiveCfg = Release|Any CPU {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Public|Any CPU.Build.0 = Release|Any CPU + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Public|ARM.ActiveCfg = Release|Any CPU + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Public|x86.ActiveCfg = Release|x86 + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Public|x86.Build.0 = Release|x86 {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|Any CPU.Build.0 = Release|Any CPU + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|ARM.ActiveCfg = Release|Any CPU + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x86.ActiveCfg = Release|x86 + {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x86.Build.0 = Release|x86 {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x86.ActiveCfg = Debug|x86 + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x86.Build.0 = Debug|x86 {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Public|Any CPU.ActiveCfg = Release|Any CPU {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Public|Any CPU.Build.0 = Release|Any CPU + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Public|ARM.ActiveCfg = Release|Any CPU + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Public|x86.ActiveCfg = Release|x86 + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Public|x86.Build.0 = Release|x86 {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|Any CPU.Build.0 = Release|Any CPU + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|ARM.ActiveCfg = Release|Any CPU + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x86.ActiveCfg = Release|x86 + {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x86.Build.0 = Release|x86 {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|ARM.ActiveCfg = Debug|Any CPU + {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x86.ActiveCfg = Debug|x86 + {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x86.Build.0 = Debug|x86 {436641C4-846C-42D0-8E8F-95F70E211D22}.Public|Any CPU.ActiveCfg = Release|Any CPU {436641C4-846C-42D0-8E8F-95F70E211D22}.Public|Any CPU.Build.0 = Release|Any CPU + {436641C4-846C-42D0-8E8F-95F70E211D22}.Public|ARM.ActiveCfg = Release|Any CPU + {436641C4-846C-42D0-8E8F-95F70E211D22}.Public|x86.ActiveCfg = Release|x86 + {436641C4-846C-42D0-8E8F-95F70E211D22}.Public|x86.Build.0 = Release|x86 {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|Any CPU.ActiveCfg = Release|Any CPU {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|Any CPU.Build.0 = Release|Any CPU + {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|ARM.ActiveCfg = Release|Any CPU + {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x86.ActiveCfg = Release|x86 + {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x86.Build.0 = Release|x86 {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|ARM.ActiveCfg = Debug|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Debug|x86.ActiveCfg = Debug|Any CPU {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|Any CPU.ActiveCfg = Release|Any CPU {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|Any CPU.Build.0 = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|ARM.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Public|x86.ActiveCfg = Release|Any CPU {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Any CPU.ActiveCfg = Release|Any CPU {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|Any CPU.Build.0 = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|ARM.ActiveCfg = Release|Any CPU + {8299274E-05DD-49E0-ACB8-70C2BBAC69D1}.Release|x86.ActiveCfg = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|ARM.ActiveCfg = Debug|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.ActiveCfg = Debug|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Debug|x86.Build.0 = Debug|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|Any CPU.ActiveCfg = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|Any CPU.Build.0 = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|ARM.ActiveCfg = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|x86.ActiveCfg = Release|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Public|x86.Build.0 = Release|x86 {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.ActiveCfg = Release|Any CPU {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|Any CPU.Build.0 = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|ARM.ActiveCfg = Release|Any CPU + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.ActiveCfg = Release|x86 + {94734E5A-0344-43E8-BB30-E32E3F57F611}.Release|x86.Build.0 = Release|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|ARM.ActiveCfg = Debug|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.ActiveCfg = Debug|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Debug|x86.Build.0 = Debug|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Any CPU.ActiveCfg = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|Any CPU.Build.0 = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|ARM.ActiveCfg = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x86.ActiveCfg = Release|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Public|x86.Build.0 = Release|x86 {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|Any CPU.Build.0 = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|ARM.ActiveCfg = Release|Any CPU + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.ActiveCfg = Release|x86 + {4B12561E-D37B-48A1-B6DB-218E94906C22}.Release|x86.Build.0 = Release|x86 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.ActiveCfg = Debug|x86 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Debug|x86.Build.0 = Debug|x86 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Any CPU.ActiveCfg = Release|Any CPU {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|Any CPU.Build.0 = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|ARM.ActiveCfg = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x86.ActiveCfg = Release|x86 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Public|x86.Build.0 = Release|x86 {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|Any CPU.Build.0 = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|ARM.ActiveCfg = Release|Any CPU + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.ActiveCfg = Release|x86 + {935D67A0-931E-46DE-9F6A-2D6DBC99AFF3}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/AgateLib.GL/AgateLib.GL.csproj =================================================================== --- trunk/AgateLib.GL/AgateLib.GL.csproj 2014-08-23 20:11:39 UTC (rev 1475) +++ trunk/AgateLib.GL/AgateLib.GL.csproj 2014-08-23 21:28:36 UTC (rev 1476) @@ -9,7 +9,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>AgateLib.GL</RootNamespace> <AssemblyName>AgateLib.GL</AssemblyName> - <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile /> </PropertyGroup> @@ -75,8 +75,7 @@ <ItemGroup> <Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\Drivers\AgateOTK\OpenTK.dll</HintPath> - <Private>True</Private> + <HintPath>..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Core" /> @@ -137,9 +136,6 @@ </EmbeddedResource> </ItemGroup> <ItemGroup> - <None Include="OpenTK.dll.config"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> <None Include="packages.config" /> <None Include="Resources\Basic2D_pixel.txt" /> </ItemGroup> @@ -147,14 +143,6 @@ <None Include="Resources\Basic2D_vert.txt" /> </ItemGroup> <ItemGroup> - <Content Include="OpenTK.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="OpenTK.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - </ItemGroup> - <ItemGroup> <ProjectReference Include="..\AgateLib\AgateLib.csproj"> <Project>{9490b719-829e-43a7-a5fe-8001f8a81759}</Project> <Name>AgateLib</Name> Modified: trunk/AgateLib.GL/GL3/Shaders/ShaderSources.Designer.cs =================================================================== --- trunk/AgateLib.GL/GL3/Shaders/ShaderSources.Designer.cs 2014-08-23 20:11:39 UTC (rev 1475) +++ trunk/AgateLib.GL/GL3/Shaders/ShaderSources.Designer.cs 2014-08-23 21:28:36 UTC (rev 1476) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.18408 +// Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -39,7 +39,7 @@ internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AgateLib.OpenGL.GL3.Shaders.ShaderSources", typeof(ShaderSources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AgateLib.GL.GL3.Shaders.ShaderSources", typeof(ShaderSources).Assembly); resourceMan = temp; } return resourceMan; Deleted: trunk/AgateLib.GL/OpenTK.dll =================================================================== (Binary files differ) Deleted: trunk/AgateLib.GL/OpenTK.dll.config =================================================================== --- trunk/AgateLib.GL/OpenTK.dll.config 2014-08-23 20:11:39 UTC (rev 1475) +++ trunk/AgateLib.GL/OpenTK.dll.config 2014-08-23 21:28:36 UTC (rev 1476) @@ -1,25 +0,0 @@ -<configuration> - <dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/> - <dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/> - <dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/> - <dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> - <dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/> - <dllmap os="linux" dll="libX11" target="libX11.so.6"/> - <dllmap os="linux" dll="libXi" target="libXi.so.6"/> - <dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/> - <dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/> - <dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> - <dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> - <dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> - <dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> - <dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> - <dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/> - <dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/> - <!-- XQuartz compatibility (X11 on Mac) --> - <dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/> - <dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/> - <dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/> - <dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/> - <dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/> - <dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/> -</configuration> Deleted: trunk/AgateLib.GL/OpenTK.xml =================================================================== --- trunk/AgateLib.GL/OpenTK.xml 2014-08-23 20:11:39 UTC (rev 1475) +++ trunk/AgateLib.GL/OpenTK.xml 2014-08-23 21:28:36 UTC (rev 1476) @@ -1,421025 +0,0 @@ -<?xml version="1.0"?> -<doc> - <assembly> - <name>OpenTK</name> - </assembly> - <members> - <member name="T:OpenTK.DisplayDevice"> - <summary> - Defines a display device on the underlying system, and provides - methods to query and change its display parameters. - </summary> - </member> - <member name="M:OpenTK.DisplayDevice.SelectResolution(System.Int32,System.Int32,System.Int32,System.Single)"> - <summary> - Selects an available resolution that matches the specified parameters. - </summary> - <param name="width">The width of the requested resolution in pixels.</param> - <param name="height">The height of the requested resolution in pixels.</param> - <param name="bitsPerPixel">The bits per pixel of the requested resolution.</param> - <param name="refreshRate">The refresh rate of the requested resolution in hertz.</param> - <returns>The requested DisplayResolution or null if the parameters cannot be met.</returns> - <remarks> - <para>If a matching resolution is not found, this function will retry ignoring the specified refresh rate, - bits per pixel and resolution, in this order. If a matching resolution still doesn't exist, this function will - return the current resolution.</para> - <para>A parameter set to 0 or negative numbers will not be used in the search (e.g. if refreshRate is 0, - any refresh rate will be considered valid).</para> - <para>This function allocates memory.</para> - </remarks> - </member> - <member name="M:OpenTK.DisplayDevice.ChangeResolution(OpenTK.DisplayResolution)"> - <summary>Changes the resolution of the DisplayDevice.</summary> - <param name="resolution">The resolution to set. <see cref="M:OpenTK.DisplayDevice.SelectResolution(System.Int32,System.Int32,System.Int32,System.Single)"/></param> - <exception cref="T:OpenTK.Graphics.GraphicsModeException">Thrown if the requested resolution could not be set.</exception> - <remarks>If the specified resolution is null, this function will restore the original DisplayResolution.</remarks> - </member> - <member name="M:OpenTK.DisplayDevice.ChangeResolution(System.Int32,System.Int32,System.Int32,System.Single)"> - <summary>Changes the resolution of the DisplayDevice.</summary> - <param name="width">The new width of the DisplayDevice.</param> - <param name="height">The new height of the DisplayDevice.</param> - <param name="bitsPerPixel">The new bits per pixel of the DisplayDevice.</param> - <param name="refreshRate">The new refresh rate of the DisplayDevice.</param> - <exception cref="T:OpenTK.Graphics.GraphicsModeException">Thrown if the requested resolution could not be set.</exception> - </member> - <member name="M:OpenTK.DisplayDevice.RestoreResolution"> - <summary>Restores the original resolution of the DisplayDevice.</summary> - <exception cref="T:OpenTK.Graphics.GraphicsModeException">Thrown if the original resolution could not be restored.</exception> - </member> - <member name="M:OpenTK.DisplayDevice.GetDisplay(OpenTK.DisplayIndex)"> - <summary> - Gets the <see cref="T:OpenTK.DisplayDevice"/> for the specified <see cref="T:OpenTK.DisplayIndex"/>. - </summary> - <param name="index">The <see cref="T:OpenTK.DisplayIndex"/> that defines the desired display.</param> - <returns>A <see cref="T:OpenTK.DisplayDevice"/> or null, if no device corresponds to the specified index.</returns> - </member> - <member name="M:OpenTK.DisplayDevice.ToString"> - <summary> - Returns a System.String representing this DisplayDevice. - </summary> - <returns>A System.String representing this DisplayDevice.</returns> - </member> - <member name="P:OpenTK.DisplayDevice.Bounds"> - <summary> - Gets the bounds of this instance in pixel coordinates.. - </summary> - </member> - <member name="P:OpenTK.DisplayDevice.Width"> - <summary>Gets a System.Int32 that contains the width of this display in pixels.</summary> - </member> - <member name="P:OpenTK.DisplayDevice.Height"> - <summary>Gets a System.Int32 that contains the height of this display in pixels.</summary> - </member> - <member name="P:OpenTK.DisplayDevice.BitsPerPixel"> - <summary>Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.</summary> - </member> - <member name="P:OpenTK.DisplayDevice.RefreshRate"> - <summary> - Gets a System.Single representing the vertical refresh rate of this display. - </summary> - </member> - <member name="P:OpenTK.DisplayDevice.IsPrimary"> - <summary>Gets a System.Boolean that indicates whether this Display is the primary Display in systems with multiple Displays.</summary> - </member> - <member name="P:OpenTK.DisplayDevice.AvailableResolutions"> - <summary> - Gets the list of <see cref="T:OpenTK.DisplayResolution"/> objects available on this device. - </summary> - </member> - <member name="P:OpenTK.DisplayDevice.AvailableDisplays"> - <summary> - Gets the list of available <see cref="T:OpenTK.DisplayDevice"/> objects. - This function allocates memory. - </summary> - </member> - <member name="P:OpenTK.DisplayDevice.Default"> - <summary>Gets the default (primary) display of this system.</summary> - </member> - <member name="P:OpenTK.DisplayDevice.OriginalResolution"> - <summary> - Gets the original resolution of this instance. - </summary> - </member> - <member name="T:OpenTK.DisplayIndex"> - <summary> - Defines <see cref="T:OpenTK.DisplayDevice"/> indices. - </summary> - </member> - <member name="F:OpenTK.DisplayIndex.First"> - <summary> - The first DisplayDevice. - </summary> - </member> - <member name="F:OpenTK.DisplayIndex.Second"> - <summary> - The second DisplayDevice. - </summary> - </member> - <member name="F:OpenTK.DisplayIndex.Third"> - <summary> - The third DisplayDevice. - </summary> - </member> - <member name="F:OpenTK.DisplayIndex.Fourth"> - <summary> - The fourth DisplayDevice. - </summary> - </member> - <member name="F:OpenTK.DisplayIndex.Fifth"> - <summary> - The fifth DisplayDevice. - </summary> - </member> - <member name="F:OpenTK.DisplayIndex.Sixth"> - <summary> - The sixth DisplayDevice. - </summary> - </member> - <member name="F:OpenTK.DisplayIndex.Primary"> - <summary> - The default (primary) DisplayDevice. - </summary> - </member> - <member name="F:OpenTK.DisplayIndex.Default"> - <summary> - The default (primary) DisplayDevice. - </summary> - </member> - <member name="T:OpenTK.Input.GamePadThumbSticks"> - <summary> - Describes the current thumb stick state of a <see cref="T:OpenTK.Input.GamePad"/> device - </summary> - </member> - <member name="M:OpenTK.Input.GamePadThumbSticks.op_Equality(OpenTK.Input.GamePadThumbSticks,OpenTK.Input.GamePadThumbSticks)"> - <param name="left">A <see cref="T:OpenTK.Input.GamePadThumbSticks"/> instance to test for equality.</param> - <param name="right">A <see cref="T:OpenTK.Input.GamePadThumbSticks"/> instance to test for equality.</param> - </member> - <member name="M:OpenTK.Input.GamePadThumbSticks.op_Inequality(OpenTK.Input.GamePadThumbSticks,OpenTK.Input.GamePadThumbSticks)"> - <param name="left">A <see cref="T:OpenTK.Input.GamePadThumbSticks"/> instance to test for inequality.</param> - <param name="right">A <see cref="T:OpenTK.Input.GamePadThumbSticks"/> instance to test for inequality.</param> - </member> - <member name="M:OpenTK.Input.GamePadThumbSticks.ToString"> - <summary> - Returns a <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>. - </summary> - <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>.</returns> - </member> - <member name="M:OpenTK.Input.GamePadThumbSticks.GetHashCode"> - <summary> - Serves as a hash function for a <see cref="T:OpenTK.Input.GamePadThumbSticks"/> object. - </summary> - <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table.</returns> - </member> - <member name="M:OpenTK.Input.GamePadThumbSticks.Equals(System.Object)"> - <summary> - Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>. - </summary> - <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>.</param> - <returns><c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current - <see cref="T:OpenTK.Input.GamePadThumbSticks"/>; otherwise, <c>false</c>.</returns> - </member> - <member name="M:OpenTK.Input.GamePadThumbSticks.Equals(OpenTK.Input.GamePadThumbSticks)"> - <summary> - Determines whether the specified <see cref="T:OpenTK.Input.GamePadThumbSticks"/> is equal to the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>. - </summary> - <param name="other">The <see cref="T:OpenTK.Input.GamePadThumbSticks"/> to compare with the current <see cref="T:OpenTK.Input.GamePadThumbSticks"/>.</param> - <returns><c>true</c> if the specified <see cref="T:OpenTK.Input.GamePadThumbSticks"/> is equal to the current - <see cref="T:OpenTK.Input.GamePadThumbSticks"/>; otherwise, <c>false</c>.</returns> - </member> - <member name="P:OpenTK.Input.GamePadThumbSticks.Left"> - <summary> - Gets a <see cref="T:OpenTK.Vector2"/> describing the state of the left thumb stick. - </summary> - </member> - <member name="P:OpenTK.Input.GamePadThumbSticks.Right"> - <summary> - Gets a <see cref="T:OpenTK.Vector2"/> describing the state of the right thumb stick. - </summary> - </member> - <member name="T:OpenTK.Input.GamePadTriggers"> - <summary> - Describes the state of a <see cref="T:OpenTK.Input.GamePad"/> trigger buttons. - </summary> - </member> - <member name="M:OpenTK.Input.GamePadTriggers.op_Equality(OpenTK.Input.GamePadTriggers,OpenTK.Input.GamePadTriggers)"> - <param name="left">A <see cref="T:OpenTK.Input.GamePadTriggers"/> instance to test for equality.</param> - <param name="right">A <see cref="T:OpenTK.Input.GamePadTriggers"/> instance to test for equality.</param> - </member> - <member name="M:OpenTK.Input.GamePadTriggers.op_Inequality(OpenTK.Input.GamePadTriggers,OpenTK.Input.GamePadTriggers)"> - <param name="left">A <see cref="T:OpenTK.Input.GamePadTriggers"/> instance to test for equality.</param> - <param name="right">A <see cref="T:OpenTK.Input.GamePadTriggers"/> instance to test for equality.</param> - </member> - <member name="M:OpenTK.Input.GamePadTriggers.ToString"> - <summary> - Returns a <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.GamePadTriggers"/>. - </summary> - <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.GamePadTriggers"/>.</returns> - </member> - <member name="M:OpenTK.Input.GamePadTriggers.GetHashCode"> - <summary> - Serves as a hash function for a <see cref="T:OpenTK.Input.GamePadTriggers"/> object. - </summary> - <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table.</returns> - </member> - <member name="M:OpenTK.Input.GamePadTriggers.Equals(System.Object)"> - <summary> - Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:OpenTK.Input.GamePadTriggers"/>. - </summary> - <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:OpenTK.Input.GamePadTriggers"/>.</param> - <returns><c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current - <see cref="T:OpenTK.Input.GamePadTriggers"/>; otherwise, <c>false</c>.</returns> - </member> - <member name="M:OpenTK.Input.GamePadTriggers.Equals(OpenTK.Input.GamePadTriggers)"> - <summary> - Determines whether the specified <see cref="T:OpenTK.Input.GamePadTriggers"/> is equal to the current <see cref="T:OpenTK.Input.GamePadTriggers"/>. - </summary> - <param name="other">The <see cref="T:OpenTK.Input.GamePadTriggers"/> to compare with the current <see cref="T:OpenTK.Input.GamePadTriggers"/>.</param> - <returns><c>true</c> if the specified <see cref="T:OpenTK.Input.GamePadTriggers"/> is equal to the current - <see cref="T:OpenTK.Input.GamePadTriggers"/>; otherwise, <c>false</c>.</returns> - </member> - <member name="P:OpenTK.Input.GamePadTriggers.Left"> - <summary> - Gets the offset of the left trigger button, between 0.0 and 1.0. - </summary> - </member> - <member name="P:OpenTK.Input.GamePadTriggers.Right"> - <summary> - Gets the offset of the left trigger button, between 0.0 and 1.0. - </summary> - </member> - <member name="T:OpenTK.Input.GamePadType"> - <summary> - Enumerates available <see cref="F:OpenTK.Input.GamePadType.GamePad"/> types. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.Unknown"> - <summary> - The <c>GamePad</c> is of an unknown type. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.ArcadeStick"> - <summary> - The <c>GamePad</c> is an arcade stick. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.DancePad"> - <summary> - The <c>GamePad</c> is a dance pad. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.FlightStick"> - <summary> - The <c>GamePad</c> is a flight stick. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.Guitar"> - <summary> - The <c>GamePad</c> is a guitar. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.Wheel"> - <summary> - The <c>GamePad</c> is a driving wheel. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.AlternateGuitar"> - <summary> - The <c>GamePad</c> is an alternate guitar. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.BigButtonPad"> - <summary> - The <c>GamePad</c> is a big button pad. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.DrumKit"> - <summary> - The <c>GamePad</c> is a drum kit. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.GamePad"> - <summary> - The <c>GamePad</c> is a game pad. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.ArcadePad"> - <summary> - The <c>GamePad</c> is an arcade pad. - </summary> - </member> - <member name="F:OpenTK.Input.GamePadType.BassGuitar"> - <summary> - The <c>GamePad</c> is a bass guitar. - </summary> - </member> - <member name="M:OpenTK.Input.IGamePadDriver.GetName(System.Int32)"> - <summary> - Retrieves the device name for the gamepad device. - </summary> - <param name="index">The index of the gamepad device.</param> - <returns>A <see cref="T:System.String"/> with the name of the specified device or <see cref="F:System.String.Empty"/>.</returns> - <remarks> - <para>If no device exists at the specified index, the return value is <see cref="F:System.String.Empty"/>.</para></remarks> - </member> - <member name="M:OpenTK.Input.IKeyboardDriver2.GetState"> - <summary> - Retrieves the combined <see cref="T:OpenTK.Input.KeyboardState"/> for all keyboard devices. - </summary> - <returns>An <see cref="T:OpenTK.Input.KeyboardState"/> structure containing the combined state for all keyboard devices.</returns> - </member> - <member name="M:OpenTK.Input.IKeyboardDriver2.GetState(System.Int32)"> - <summary> - Retrieves the <see cref="T:OpenTK.Input.KeyboardState"/> for the specified keyboard device. - </summary> - <param name="index">The index of the keyboard device.</param> - <returns>An <see cref="T:OpenTK.Input.KeyboardState"/> structure containing the state of the keyboard device.</returns> - </member> - <member name="M:OpenTK.Input.IKeyboardDriver2.GetDeviceName(System.Int32)"> - <summary> - Retrieves the device name for the keyboard device. - </summary> - <param name="index">The index of the keyboard device.</param> - <returns>A <see cref="T:System.String"/> with the name of the specified device or <see cref="F:System.String.Empty"/>.</returns> - <remarks> - <para>If no device exists at the specified index, the return value is <see cref="F:System.String.Empty"/>.</para></remarks> - </member> - <member name="T:OpenTK.Input.Joystick"> - <summary> - Provides access to Joystick devices. - Joystick devices provide a varying number of axes and buttons. - Use <c>GetCapabilities</c> to retrieve the number of supported - axes and buttons on a given device. - Use <c>GetState</c> to retrieve the current state of a given device. - </summary> - <seealso cref="T:OpenTK.Input.GamePad"/> - </member> - <member name="M:OpenTK.Input.Joystick.GetCapabilities(System.Int32)"> - <summary> - Retrieves the <see cref="T:OpenTK.Input.JoystickCapabilities"/> of the device connected - at the specified index. - </summary> - <returns> - A <see cref="T:OpenTK.Input.JoystickCapabilities"/> structure describing - the capabilities of the device at the specified index. - If no device is connected at the specified index, the <c>IsConnected</c> - property of the returned structure will be false. - </returns> - <param name="index">The zero-based index of the device to poll.</param> - </member> - <member name="M:OpenTK.Input.Joystick.GetState(System.Int32)"> - <summary> - Retrieves the <see cref="T:OpenTK.Input.JoystickState"/> of the device connected - at the specified index. - </summary> - <returns>A <see cref="T:OpenTK.Input.JoystickState"/> structure describing - the current state of the device at the specified index. - If no device is connected at this index, the <c>IsConnected</c> - property of the returned structure will be false. - </returns> - <param name="index">The zero-based index of the device to poll.</param> - </member> - <member name="T:OpenTK.Input.JoystickAxis"> - <summary> - Defines available JoystickDevice axes. - </summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis0"> - <summary>The first axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis1"> - <summary>The second axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis2"> - <summary>The third axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis3"> - <summary>The fourth axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis4"> - <summary>The fifth axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis5"> - <summary>The sixth axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis6"> - <summary>The seventh axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis7"> - <summary>The eighth axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis8"> - <summary>The ninth axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis9"> - <summary>The tenth axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Axis10"> - <summary>The eleventh axis of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickAxis.Last"> - <summary>The highest supported axis of the JoystickDevice.</summary> - </member> - <member name="T:OpenTK.Input.JoystickButton"> - <summary> - Defines available JoystickDevice buttons. - </summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button0"> - <summary>The first button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button1"> - <summary>The second button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button2"> - <summary>The third button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button3"> - <summary>The fourth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button4"> - <summary>The fifth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button5"> - <summary>The sixth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button6"> - <summary>The seventh button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button7"> - <summary>The eighth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button8"> - <summary>The ninth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button9"> - <summary>The tenth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button10"> - <summary>The eleventh button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button11"> - <summary>The twelfth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button12"> - <summary>The thirteenth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button13"> - <summary>The fourteenth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button14"> - <summary>The fifteenth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button15"> - <summary>The sixteenth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button16"> - <summary>The seventeenth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button17"> - <summary>The eighteenth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button18"> - <summary>The nineteenth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button19"> - <summary>The twentieth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button20"> - <summary>The twentyfirst button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button21"> - <summary>The twentysecond button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button22"> - <summary>The twentythird button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button23"> - <summary>The twentyfourth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button24"> - <summary>The twentyfifth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button25"> - <summary>The twentysixth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button26"> - <summary>The twentyseventh button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button27"> - <summary>The twentyeighth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button28"> - <summary>The twentynineth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button29"> - <summary>The thirtieth button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button30"> - <summary>The thirtyfirst button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Button31"> - <summary>The thirtysecond button of the JoystickDevice.</summary> - </member> - <member name="F:OpenTK.Input.JoystickButton.Last"> - <summary>The last supported button of the JoystickDevice.</summary> - </member> - <member name="T:OpenTK.Input.JoystickCapabilities"> - <summary> - Describes the <c>JoystickCapabilities</c> of a <see cref="T:OpenTK.Input.JoystickDevice"/>. - </summary> - </member> - <member name="M:OpenTK.Input.JoystickCapabilities.ToString"> - <summary> - Returns a <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>. - </summary> - <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>.</returns> - </member> - <member name="M:OpenTK.Input.JoystickCapabilities.GetHashCode"> - <summary> - Serves as a hash function for a <see cref="T:OpenTK.Input.JoystickCapabilities"/> object. - </summary> - <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table.</returns> - </member> - <member name="M:OpenTK.Input.JoystickCapabilities.Equals(System.Object)"> - <summary> - Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>. - </summary> - <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>.</param> - <returns><c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current - <see cref="T:OpenTK.Input.JoystickCapabilities"/>; otherwise, <c>false</c>.</returns> - </member> - <member name="M:OpenTK.Input.JoystickCapabilities.Equals(OpenTK.Input.JoystickCapabilities)"> - <summary> - Determines whether the specified <see cref="T:OpenTK.Input.JoystickCapabilities"/> is equal to the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>. - </summary> - <param name="other">The <see cref="T:OpenTK.Input.JoystickCapabilities"/> to compare with the current <see cref="T:OpenTK.Input.JoystickCapabilities"/>.</param> - <returns><c>true</c> if the specified <see cref="T:OpenTK.Input.JoystickCapabilities"/> is equal to the current - <see cref="T:OpenTK.Input.JoystickCapabilities"/>; otherwise, <c>false</c>.</returns> - </member> - <member name="P:OpenTK.Input.JoystickCapabilities.AxisCount"> - <summary> - Gets the number of axes supported by this <see cref="T:OpenTK.Input.JoystickDevice"/>. - </summary> - </member> - <member name="P:OpenTK.Input.JoystickCapabilities.ButtonCount"> - <summary> - Gets the number of buttons supported by this <see cref="T:OpenTK.Input.JoystickDevice"/>. - </summary> - </member> - <member name="P:OpenTK.Input.JoystickCapabilities.HatCount"> - <summary> - Gets the number of hats supported by this <see cref="T:OpenTK.Input.JoystickDevice"/>. - </summary> - </member> - <member name="P:OpenTK.Input.JoystickCapabilities.IsConnected"> - <summary> - Gets a value indicating whether this <see cref="T:OpenTK.Input.JoystickDevice"/> is connected. - </summary> - <value><c>true</c> if this instance is connected; otherwise, <c>false</c>.</value> - </member> - <member name="T:OpenTK.Input.JoystickState"> - <summary> - Describes the current state of a <see cref="T:OpenTK.Input.JoystickDevice"/>. - </summary> - </member> - <member name="M:OpenTK.Input.JoystickState.GetAxis(OpenTK.Input.JoystickAxis)"> - <summary> - Gets a value between -1.0 and 1.0 representing the current offset of the specified <see cref="T:OpenTK.Input.JoystickAxis"/>. - </summary> - <returns> - A value between -1.0 and 1.0 representing offset of the specified <see cref="T:OpenTK.Input.JoystickAxis"/>. - If the specified axis does not exist, then the return value is 0.0. Use <see cref="M:OpenTK.Input.Joystick.GetCapabilities(System.Int32)"/> - to query the number of available axes. - </returns> - <param name="axis">The <see cref="T:OpenTK.Input.JoystickAxis"/> to query.</param> - </member> - <member name="M:OpenTK.Input.JoystickState.GetButton(OpenTK.Input.JoystickButton)"> - <summary> - Gets the current <see cref="T:OpenTK.Input.ButtonState"/> of the specified <see cref="T:OpenTK.Input.JoystickButton"/>. - </summary> - <returns><see cref="F:OpenTK.Input.ButtonState.Pressed"/> if the specified button is pressed; otherwise, <see cref="F:OpenTK.Input.ButtonState.Released"/>.</returns> - <param name="button">The <see cref="T:OpenTK.Input.JoystickButton"/> to query.</param> - </member> - <member name="M:OpenTK.Input.JoystickState.GetHat(OpenTK.Input.JoystickHat)"> - <summary> - Gets the hat. - </summary> - <returns>The hat.</returns> - <param name="hat">Hat.</param> - </member> - <member name="M:OpenTK.Input.JoystickState.IsButtonDown(OpenTK.Input.JoystickButton)"> - <summary> - Gets a value indicating whether the specified <see cref="T:OpenTK.Input.JoystickButton"/> is currently pressed. - </summary> - <returns>true if the specified button is pressed; otherwise, false.</returns> - <param name="button">The <see cref="T:OpenTK.Input.JoystickButton"/> to query.</param> - </member> - <member name="M:OpenTK.Input.JoystickState.IsButtonUp(OpenTK.Input.JoystickButton)"> - <summary> - Gets a value indicating whether the specified <see cref="T:OpenTK.Input.JoystickButton"/> is currently released. - </summary> - <returns>true if the specified button is released; otherwise, false.</returns> - <param name="button">The <see cref="T:OpenTK.Input.JoystickButton"/> to query.</param> - </member> - <member name="M:OpenTK.Input.JoystickState.ToString"> - <summary> - Returns a <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.JoystickState"/>. - </summary> - <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:OpenTK.Input.JoystickState"/>.</returns> - </member> - <member name="M:OpenTK.Input.JoystickState.GetHashCode"> - <summary> - Serves as a hash function for a <see cref="T:OpenTK.Input.JoystickState"/> object. - </summary> - <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table.</returns> - </member> - <member name="M:OpenTK.Input.JoystickState.Equals(System.Object)"> - <summary> - Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:OpenTK.Input.JoystickState"/>. - </summary> - <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:OpenTK.Input.JoystickState"/>.</param> - <returns><c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current - <see cref="T:OpenTK.Input.JoystickState"/>; otherwise, <c>false</c>.</returns> - </member> - <member name="M:OpenTK.Input.JoystickState.Equals(OpenTK.Input.JoystickState)"> - <summary> - Determines whether the specified <see cref="T:OpenTK.Input.JoystickState"/> is equal to the current <see cref="T:OpenTK.Input.JoystickState"/>. - </summary> - <param name="other">The <see cref="T:OpenTK.Input.JoystickState"/> to compare with the current <see cref="T:OpenTK.Input.JoystickState"/>.</param> - <returns><c>true</c> if the specified <see cref="T:OpenTK.Inpu... [truncated message content] |
From: <ka...@us...> - 2014-08-23 20:11:44
|
Revision: 1475 http://sourceforge.net/p/agate/code/1475 Author: kanato Date: 2014-08-23 20:11:39 +0000 (Sat, 23 Aug 2014) Log Message: ----------- Refactor models to allow for scene model to be developed. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/ApplicationModels/AgateAppModel.cs trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs Added Paths: ----------- trunk/AgateLib/ApplicationModels/EntryPointAppModelBase.cs trunk/AgateLib/ApplicationModels/Scene.cs trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs trunk/AgateLib/ApplicationModels/SceneStack.cs trunk/AgateLib.Platform.WindowsForms/Initializer.cs Removed Paths: ------------- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs trunk/AgateLib.Platform.WindowsForms/Configuration.cs Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/AgateLib/AgateLib.csproj 2014-08-23 20:11:39 UTC (rev 1475) @@ -85,6 +85,10 @@ <Compile Include="Algorithms\PathFinding\AStarState.cs" /> <Compile Include="Algorithms\Inverting.cs" /> <Compile Include="ApplicationModels\CoordinateSystems\NaturalCoordinates.cs" /> + <Compile Include="ApplicationModels\EntryPointAppModelBase.cs" /> + <Compile Include="ApplicationModels\Scene.cs" /> + <Compile Include="ApplicationModels\SceneAppModelBase.cs" /> + <Compile Include="ApplicationModels\SceneStack.cs" /> <Compile Include="DisplayLib\FontSettings.cs" /> <Compile Include="DisplayLib\FontStyles.cs" /> <Compile Include="Drivers\NullDrivers\NullInputFactory.cs" /> Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs =================================================================== --- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -52,11 +52,6 @@ } - static Func<int> ActionToFunc(Action entry) - { - return () => { entry(); return 0; }; - } - #endregion DisplayWindow window; @@ -91,81 +86,28 @@ public void Dispose() { Dispose(true); + DisposeAutoCreatedWindow(); if (Instance == this) Instance = null; } - /// <summary> - /// Override this to clean up the platform initialization of AgateLib. - /// </summary> - /// <param name="disposing"></param> - protected virtual void Dispose(bool disposing) - { } - /// <summary> - /// Runs the application model with the specified entry point for your application. - /// </summary> - /// <param name="entry">A delegate which will be called to run your application.</param> - /// <returns>Returns 0.</returns> - public int Run(Action entry) - { - return RunImpl(entry); - } - /// <summary> - /// Runs the application model with the specified entry point for your application. - /// </summary> - /// <param name="entry">A delegate which will be called to run your application.</param> - /// <returns>Returns the return value from the <c>entry</c> parameter.</returns> - public int Run(Func<int> entry) - { - return RunImpl(entry); - } - /// <summary> - /// Runs the application model with the specified entry point and command line arguments for your application. - /// </summary> - /// <param name="args">The command arguments to process.</param> - /// <param name="entry">A delegate which will be called to run your application.</param> - /// <returns>Returns 0.</returns> - public int Run(string[] args, Action entry) - { - Parameters.Arguments = args; - return RunImpl(entry); - } - /// <summary> - /// Runs the application model with the specified entry point and command line arguments for your application. - /// </summary> - /// <param name="args">The command arguments to process.</param> - /// <param name="entry">A delegate which will be called to run your application.</param> - /// <returns>Returns the return value from the <c>entry</c> parameter.</returns> - public int Run(string[] args, Func<int> entry) + protected void DisposeAutoCreatedWindow() { - Parameters.Arguments = args; - - return RunImpl(entry); + if (window != null) + { + window.Dispose(); + window = null; + } } - private int RunImpl(Action entry) - { - return RunImpl(ActionToFunc(entry)); - } /// <summary> - /// Runs the application model by calling RunModel. If you override this, make - /// sure to catch the ExitGameException and return 0 in the exception handler. + /// Override this to clean up the platform initialization of AgateLib. /// </summary> - /// <param name="entry"></param> - /// <returns></returns> - protected virtual int RunImpl(Func<int> entry) - { - try - { - return RunModel(entry); - } - catch (ExitGameException) - { - return 0; - } - } + /// <param name="disposing"></param> + protected virtual void Dispose(bool disposing) + { } /// <summary> /// Processes command line arguments. Override this to completely replace the @@ -257,30 +199,9 @@ Log.WriteLine(" {0} {1}", arg, string.Join(" ", parm)); } - /// <summary> - /// Runs the application model. - /// </summary> - /// <param name="entryPoint"></param> - /// <returns></returns> - protected int RunModel(Func<int> entryPoint) + protected void PrerunInitialization() { - try - { - Initialize(); - AutoCreateDisplayWindow(); - SetPlatformEmulation(); - - int retval = BeginModel(entryPoint); - - return retval; - } - finally - { - if (window != null) - window.Dispose(); - - Dispose(); - } + SetPlatformEmulation(); } private void SetPlatformEmulation() @@ -291,17 +212,11 @@ } } - /// <summary> - /// Override this to implement the application model. This function - /// should call the entry point and return its return value. - /// It should not catch ExitGameException. - /// </summary> - /// <param name="entryPoint">The application entry point to call.</param> - /// <returns></returns> - protected abstract int BeginModel(Func<int> entryPoint); + protected void AutoCreateDisplayWindow() + { + if (window != null) + throw new InvalidOperationException("Cannot do autocreation of window if one already exists."); - private void AutoCreateDisplayWindow() - { if (Parameters.AutoCreateDisplayWindow == false) return; Added: trunk/AgateLib/ApplicationModels/EntryPointAppModelBase.cs =================================================================== --- trunk/AgateLib/ApplicationModels/EntryPointAppModelBase.cs (rev 0) +++ trunk/AgateLib/ApplicationModels/EntryPointAppModelBase.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.ApplicationModels +{ + /// <summary> + /// Provides a base class for application models that use a function + /// as an entry point. + /// </summary> + public abstract class EntryPointAppModelBase : AgateAppModel + { + + public EntryPointAppModelBase(ModelParameters parameters) + : base(parameters) + { } + + /// <summary> + /// Runs the application model with the specified entry point for your application. + /// </summary> + /// <param name="entry">A delegate which will be called to run your application.</param> + /// <returns>Returns 0.</returns> + public int Run(Action entry) + { + return RunImpl(entry); + } + /// <summary> + /// Runs the application model with the specified entry point for your application. + /// </summary> + /// <param name="entry">A delegate which will be called to run your application.</param> + /// <returns>Returns the return value from the <c>entry</c> parameter.</returns> + public int Run(Func<int> entry) + { + return RunImpl(entry); + } + /// <summary> + /// Runs the application model with the specified entry point and command line arguments for your application. + /// </summary> + /// <param name="args">The command arguments to process.</param> + /// <param name="entry">A delegate which will be called to run your application.</param> + /// <returns>Returns 0.</returns> + public int Run(string[] args, Action entry) + { + Parameters.Arguments = args; + + return RunImpl(entry); + } + /// <summary> + /// Runs the application model with the specified entry point and command line arguments for your application. + /// </summary> + /// <param name="args">The command arguments to process.</param> + /// <param name="entry">A delegate which will be called to run your application.</param> + /// <returns>Returns the return value from the <c>entry</c> parameter.</returns> + public int Run(string[] args, Func<int> entry) + { + Parameters.Arguments = args; + + return RunImpl(entry); + } + + private int RunImpl(Action entry) + { + return RunImpl(ActionToFunc(entry)); + } + /// <summary> + /// Runs the application model by calling RunModel. If you override this, make + /// sure to catch the ExitGameException and return 0 in the exception handler. + /// </summary> + /// <param name="entry"></param> + /// <returns></returns> + protected virtual int RunImpl(Func<int> entry) + { + try + { + return RunModel(entry); + } + catch (ExitGameException) + { + return 0; + } + } + + /// <summary> + /// Runs the application model. + /// </summary> + /// <param name="entryPoint"></param> + /// <returns></returns> + protected int RunModel(Func<int> entryPoint) + { + try + { + Initialize(); + AutoCreateDisplayWindow(); + PrerunInitialization(); + + int retval = BeginModel(entryPoint); + + return retval; + } + finally + { + DisposeAutoCreatedWindow(); + + Dispose(); + } + } + + /// <summary> + /// Override this to implement the application model. This function + /// should call the entry point and return its return value. + /// It should not catch ExitGameException. + /// </summary> + /// <param name="entryPoint">The application entry point to call.</param> + /// <returns></returns> + protected abstract int BeginModel(Func<int> entryPoint); + + static Func<int> ActionToFunc(Action entry) + { + return () => { entry(); return 0; }; + } + + } +} Added: trunk/AgateLib/ApplicationModels/Scene.cs =================================================================== --- trunk/AgateLib/ApplicationModels/Scene.cs (rev 0) +++ trunk/AgateLib/ApplicationModels/Scene.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.ApplicationModels +{ + public abstract class Scene + { + public bool UpdateBelow { get; set; } + public bool DrawBelow { get; set; } + + public abstract void Update(double delta_t); + public abstract void Draw(); + } +} Added: trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs =================================================================== --- trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs (rev 0) +++ trunk/AgateLib/ApplicationModels/SceneAppModelBase.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.ApplicationModels +{ + public abstract class SceneAppModelBase : AgateAppModel + { + public SceneAppModelBase(ModelParameters parameters) + : base(parameters) + { } + } +} Added: trunk/AgateLib/ApplicationModels/SceneStack.cs =================================================================== --- trunk/AgateLib/ApplicationModels/SceneStack.cs (rev 0) +++ trunk/AgateLib/ApplicationModels/SceneStack.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.ApplicationModels +{ + public static class SceneStack + { + static List<Scene> mScenes = new List<Scene>(); + + public static void Add(Scene scene) + { + mScenes.Add(scene); + } + public static void Remove(Scene scene) + { + mScenes.Remove(scene); + } + + static IEnumerable<Scene> ScenesAbove(Func<Scene, bool> pred) + { + if (mScenes.Count == 0) + yield break; + + int bottomIndex = 0; + + for (int i = mScenes.Count - 1; i >= 0; i--) + { + if (mScenes[i].UpdateBelow == false) + bottomIndex = i; + } + + for (int i = bottomIndex; i < mScenes.Count; i++) + yield return mScenes[i]; + } + + public static IEnumerable<Scene> UpdateScenes + { + get { return ScenesAbove(x => x.UpdateBelow == false); } + } + public static IEnumerable<Scene> DrawScenes + { + get { return ScenesAbove(x => x.DrawBelow == false); } + } + + public static int Count { get { return mScenes.Count; } } + + public static bool Contains(Scene scene) + { + return mScenes.Contains(scene); + } + } +} Modified: trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj =================================================================== --- trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/AgateLib.Platform.WindowsForms/AgateLib.Platform.WindowsForms.csproj 2014-08-23 20:11:39 UTC (rev 1475) @@ -89,7 +89,6 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="ApplicationModels\FormsModelBase.cs" /> <Compile Include="ApplicationModels\FormsModelParameters.cs" /> <Compile Include="ApplicationModels\PassiveModel.cs" /> <Compile Include="ApplicationModels\PassiveModelParameters.cs" /> @@ -135,7 +134,7 @@ <Compile Include="PlatformImplementation\TgzFileProvider.cs" /> <Compile Include="PlatformImplementation\ZipFileProvider.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Configuration.cs" /> + <Compile Include="Initializer.cs" /> <Compile Include="Resources\BuiltinResources.cs" /> <Compile Include="SurfaceExtensions.cs" /> <Compile Include="WinForms\AgateRenderTarget.cs"> Deleted: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/FormsModelBase.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -1,40 +0,0 @@ -using AgateLib.ApplicationModels; -using AgateLib.Platform.WindowsForms.Factories; -using AgateLib.Utility; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace AgateLib.Platform.WindowsForms.ApplicationModels -{ - public abstract class FormsModelBase : AgateAppModel - { - public FormsModelBase(ModelParameters parameters) - : base(parameters) - { - - } - - public new FormsModelParameters Parameters - { - get { return (FormsModelParameters)base.Parameters; } - } - - protected override void InitializeImpl() - { - Core.Initialize(new FormsFactory()); - - var assetProvider = new FileSystemProvider(System.IO.Path.GetFullPath(Parameters.AssetPath)); - AgateLib.IO.FileProvider.Initialize(assetProvider, Parameters.AssetLocations); - - System.IO.Directory.SetCurrentDirectory(assetProvider.SearchPath); - } - - protected override void Dispose(bool disposing) - { - } - } -} Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/PassiveModel.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -12,7 +12,7 @@ /// program exits. The passive model is suitable for applications which provide their own message /// pump and render loop logic. /// </summary> - public class PassiveModel : FormsModelBase + public class PassiveModel : EntryPointAppModelBase { #region --- Static Members --- Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SceneModel.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -1,4 +1,5 @@ using AgateLib.ApplicationModels; +using AgateLib.DisplayLib; using System; using System.Collections.Generic; using System.Linq; @@ -7,21 +8,33 @@ namespace AgateLib.Platform.WindowsForms.ApplicationModels { - public class SceneModel : FormsModelBase + public class SceneModel : SceneAppModelBase { private SceneModel(ModelParameters parameters) : base(parameters) { } public static ModelParameters DefaultParameters { get; set; } - protected override int BeginModel(Func<int> entryPoint) + public int Run(Scene scene) { - throw new NotImplementedException(); + if (SceneStack.Contains(scene) == false) + SceneStack.Add(scene); + + while(SceneStack.Count > 0) + { + foreach (var sc in SceneStack.UpdateScenes) + sc.Update(Display.DeltaTime); + + foreach (var sc in SceneStack.DrawScenes) + sc.Draw(); + } + + return 0; } public override void KeepAlive() { - throw new NotImplementedException(); + base.KeepAlive(); } } } Modified: trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/AgateLib.Platform.WindowsForms/ApplicationModels/SerialModel.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -9,7 +9,7 @@ namespace AgateLib.Platform.WindowsForms.ApplicationModels { - public class SerialModel : FormsModelBase + public class SerialModel : EntryPointAppModelBase { #region --- Static Members --- Deleted: trunk/AgateLib.Platform.WindowsForms/Configuration.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/Configuration.cs 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/AgateLib.Platform.WindowsForms/Configuration.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -1,38 +0,0 @@ -using AgateLib.Drivers; -using AgateLib.Platform.WindowsForms.DisplayImplementation; -using AgateLib.OpenGL; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using AgateLib.Platform.WindowsForms.Factories; -using AgateLib.Utility; - -namespace AgateLib.Platform.WindowsForms -{ - [Obsolete] - public static class Configuration - { - static FileProviderList mAssetProvider = new FileProviderList(); - static FileProviderList mResourceProvider = new FileProviderList(); - static FileProviderList mSurfaceProvider = new FileProviderList(); - static FileProviderList mSoundProvider = new FileProviderList(); - static FileProviderList mMusicProvider = new FileProviderList(); - - [Obsolete] - public static void Initialize() - { - - } - - [Obsolete("Use AgateLib.IO.FileProvider instead.", true)] - public static FileProviderList Resources { get { return mResourceProvider; } } - [Obsolete("Use AgateLib.IO.FileProvider instead.", true)] - public static FileProviderList Images { get { return mSurfaceProvider; } } - [Obsolete("Use AgateLib.IO.FileProvider instead.", true)] - public static FileProviderList Sounds { get { return mSoundProvider; } } - [Obsolete("Use AgateLib.IO.FileProvider instead.", true)] - public static FileProviderList MusicProvider { get { return mMusicProvider; } } - } -} Copied: trunk/AgateLib.Platform.WindowsForms/Initializer.cs (from rev 1473, trunk/AgateLib.Platform.WindowsForms/Configuration.cs) =================================================================== --- trunk/AgateLib.Platform.WindowsForms/Initializer.cs (rev 0) +++ trunk/AgateLib.Platform.WindowsForms/Initializer.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -0,0 +1,19 @@ +using AgateLib.Platform.WindowsForms.ApplicationModels; +using AgateLib.Platform.WindowsForms.Factories; +using AgateLib.Utility; + +namespace AgateLib.Platform.WindowsForms +{ + static class Initializer + { + public static void Initialize(FormsModelParameters Parameters) + { + Core.Initialize(new FormsFactory()); + + var assetProvider = new FileSystemProvider(System.IO.Path.GetFullPath(Parameters.AssetPath)); + AgateLib.IO.FileProvider.Initialize(assetProvider, Parameters.AssetLocations); + + System.IO.Directory.SetCurrentDirectory(assetProvider.SearchPath); + } + } +} Modified: trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs =================================================================== --- trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs 2014-08-23 16:20:55 UTC (rev 1474) +++ trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs 2014-08-23 20:11:39 UTC (rev 1475) @@ -19,10 +19,10 @@ { } - protected override int BeginModel(Func<int> entryPoint) - { - return 0; - } + //protected override int BeginModel(Func<int> entryPoint) + //{ + // return 0; + //} public List<string> Expected { get { return expected; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-23 16:21:00
|
Revision: 1474 http://sourceforge.net/p/agate/code/1474 Author: kanato Date: 2014-08-23 16:20:55 +0000 (Sat, 23 Aug 2014) Log Message: ----------- Refactor displayimpl so that factory methods are in DisplayFactory. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/Core.cs trunk/AgateLib/DisplayLib/DisplayWindow.cs trunk/AgateLib/DisplayLib/FontSurface.cs trunk/AgateLib/DisplayLib/FrameBuffer.cs trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs trunk/AgateLib/DisplayLib/Surface.cs trunk/AgateLib/Drivers/IAgateFactory.cs trunk/AgateLib/Drivers/IDisplayFactory.cs trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs trunk/AgateLib.Platform.WindowsForms/Factories/DisplayFactory.cs trunk/UnitTests/Fakes/FakeDisplayDriver.cs Removed Paths: ------------- trunk/AgateLib/Drivers/TypeRegistry.cs Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/AgateLib.csproj 2014-08-23 16:20:55 UTC (rev 1474) @@ -155,7 +155,6 @@ <Compile Include="Drivers\IInputFactory.cs" /> <Compile Include="Drivers\IObjectConstructor.cs" /> <Compile Include="Drivers\IPlatformFactory.cs" /> - <Compile Include="Drivers\TypeRegistry.cs" /> <Compile Include="ApplicationModels\ExitGameException.cs" /> <Compile Include="Extensions\Collections\Generic\ListSorting.cs" /> <Compile Include="Extensions\Collections\NonGeneric\NonGenericListSorting.cs" /> Modified: trunk/AgateLib/Core.cs =================================================================== --- trunk/AgateLib/Core.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/Core.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -331,7 +331,7 @@ FileSystem.Path = factory.PlatformFactory.CreatePath(); FileProvider.Initialize(factory.PlatformFactory); - Display.Initialize(factory.DisplayFactory.CreateDisplayImpl()); + Display.Initialize(factory.DisplayFactory.DisplayImpl); Audio.Initialize(factory.AudioFactory.CreateAudioImpl()); JoystickInput.Initialize(factory.InputFactory.CreateJoystickInputImpl()); Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs =================================================================== --- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -58,14 +58,14 @@ CreateWindowParams par = CreateWindowParams.FullScreen( disp.Title, disp.Size.Width, disp.Size.Height, disp.Bpp); - mImpl = Display.Impl.CreateDisplayWindow(this, par); + mImpl = Core.Factory.DisplayFactory.CreateDisplayWindow(this, par); } else { CreateWindowParams par = CreateWindowParams.Windowed( disp.Title, disp.Size.Width, disp.Size.Height, disp.AllowResize, null); - mImpl = Display.Impl.CreateDisplayWindow(this, par); + mImpl = Core.Factory.DisplayFactory.CreateDisplayWindow(this, par); } Display.RenderTarget = FrameBuffer; @@ -83,7 +83,7 @@ "Display has not been initialized." + Environment.NewLine + "Did you forget to call AgateSetup.Initialize or Display.Initialize?"); - mImpl = Display.Impl.CreateDisplayWindow(this, windowParams); + mImpl = Core.Factory.DisplayFactory.CreateDisplayWindow(this, windowParams); Display.RenderTarget = FrameBuffer; Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose); Modified: trunk/AgateLib/DisplayLib/FontSurface.cs =================================================================== --- trunk/AgateLib/DisplayLib/FontSurface.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/DisplayLib/FontSurface.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -74,7 +74,7 @@ throw new ArgumentOutOfRangeException("Font size must be positive and non-zero, but was " + sizeInPoints.ToString() + "."); - mImpl = Display.Impl.CreateFont(fontFamily, sizeInPoints, style); + mImpl = Core.Factory.DisplayFactory.CreateFont(fontFamily, sizeInPoints, style); Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose); @@ -110,7 +110,7 @@ /// <param name="bitmapOptions"></param> public FontSurface(BitmapFontOptions bitmapOptions) { - mImpl = Display.Impl.CreateFont(bitmapOptions); + mImpl = Core.Factory.DisplayFactory.CreateFont(bitmapOptions); Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose); Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -44,7 +44,7 @@ /// <param name="size"></param> public FrameBuffer(Size size) { - impl = Display.Impl.CreateFrameBuffer(size); + impl = Core.Factory.DisplayFactory.CreateFrameBuffer(size); CoordinateSystem = new Rectangle(Point.Empty, size); } /// <summary> Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -110,82 +110,7 @@ /// </summary> protected abstract void OnRenderTargetResize(); - ///// <summary> - ///// Creates a DisplayWindowImpl derived object. - ///// </summary> - ///// <param name="title"></param> - ///// <param name="clientWidth"></param> - ///// <param name="clientHeight"></param> - ///// <param name="allowResize"></param> - ///// <param name="iconFile"></param> - ///// <param name="startFullscreen"></param> - ///// <returns></returns> - //public abstract DisplayWindowImpl CreateDisplayWindow(string title, int clientWidth, int clientHeight, string iconFile, bool startFullscreen, bool allowResize); - ///// <summary> - ///// Creates a DisplayWindowImpl derived object. - ///// </summary> - //public abstract DisplayWindowImpl CreateDisplayWindow(System.Windows.Forms.Control renderTarget); - /// <summary> - /// Creates a DisplayWindowImpl derived object. - /// </summary> - /// <param name="windowParams"></param> - /// <returns></returns> - public abstract DisplayWindowImpl CreateDisplayWindow(DisplayWindow owner, CreateWindowParams windowParams); - - /// <summary> - /// Creates a SurfaceImpl derived object. - /// </summary> - /// <param name="provider"></param> - /// <param name="filename"></param> - /// <returns></returns> - public virtual SurfaceImpl CreateSurface(IReadFileProvider provider, string filename) - { - return CreateSurface(provider.OpenRead(filename)); - } - /// <summary> - /// Creates a SurfaceImpl derived object. - /// </summary> - public abstract SurfaceImpl CreateSurface(string fileName); - /// <summary> - /// Creates a SurfaceImpl derived object from a stream containing - /// the file contents. - /// </summary> - /// <param name="fileStream"></param> - /// <returns></returns> - public abstract SurfaceImpl CreateSurface(Stream fileStream); - - /// <summary> - /// Creates a SurfaceImpl derived object. - /// </summary> - public abstract SurfaceImpl CreateSurface(Size surfaceSize); - - /// <summary> - /// Creates a SurfaceImpl derived object. - /// Forwards the call to CreateSurface(Size). - /// </summary> - public SurfaceImpl CreateSurface(int width, int height) - { - return CreateSurface(new Size(width, height)); - } - /// <summary> - /// Creates a FontSurfaceImpl derived object. - /// </summary> - /// <param name="fontFamily"></param> - /// <param name="sizeInPoints"></param> - /// <param name="style"></param> - /// <returns></returns> - public abstract FontSurfaceImpl CreateFont(string fontFamily, - float sizeInPoints, FontStyles style); - - /// <summary> - /// Creates a BitmapFontImpl object from the specified options. - /// </summary> - /// <param name="bitmapOptions"></param> - /// <returns></returns> - public abstract FontSurfaceImpl CreateFont(BitmapFontOptions bitmapOptions); - - /// <summary> /// Gets or sets the threshold value for alpha transparency below which /// pixels are considered completely transparent, and may not be drawn. /// </summary> @@ -651,50 +576,6 @@ protected internal abstract void HideCursor(); - protected internal virtual VertexBufferImpl CreateVertexBuffer( - Geometry.VertexTypes.VertexLayout layout, int vertexCount) - { - throw new AgateException("Cannot create a vertex buffer with a driver that does not support 3D."); - } - - protected internal virtual IndexBufferImpl CreateIndexBuffer(IndexBufferType type, int size) - { - throw new AgateException("Cannot create an index buffer with a driver that does not support 3D."); - } - - - /// <summary> - /// Creates one of the build in shaders in AgateLib. Implementers should - /// return null for any built in shader that is not supported. - /// Basic2DShader must have an implementation, but any other shader can be unsupported. - /// </summary> - /// <param name="builtInShaderType"></param> - /// <returns></returns> - protected internal abstract AgateShaderImpl CreateBuiltInShader(AgateLib.DisplayLib.Shaders.Implementation.BuiltInShader builtInShaderType); - - /// <summary> - /// Creates a - /// </summary> - /// <param name="size"></param> - protected internal abstract FrameBufferImpl CreateFrameBuffer(Size size); - - /// <summary> - /// Override this method if shaders are supported. - /// Only call the base class method if shaders aren't supported, as it throws a NotSupportedException. - /// </summary> - /// <returns></returns> - [Obsolete] - protected internal virtual ShaderCompilerImpl CreateShaderCompiler() - { - throw new NotSupportedException("The current driver does not support shaders."); - } - - [Obsolete] - public virtual Effect Effect - { - get { return null; } - set { throw new NotSupportedException("The current driver does not support shaders."); } - } public virtual AgateShader Shader { get { return mShader; } @@ -723,5 +604,26 @@ protected internal abstract bool GetRenderState(RenderStateBool renderStateBool); protected internal abstract void SetRenderState(RenderStateBool renderStateBool, bool value); + protected internal virtual VertexBufferImpl CreateVertexBuffer( + Geometry.VertexTypes.VertexLayout layout, int vertexCount) + { + throw new AgateException("Cannot create a vertex buffer with a driver that does not support 3D."); + } + + protected internal virtual IndexBufferImpl CreateIndexBuffer(IndexBufferType type, int size) + { + throw new AgateException("Cannot create an index buffer with a driver that does not support 3D."); + } + + + /// <summary> + /// Creates one of the build in shaders in AgateLib. Implementers should + /// return null for any built in shader that is not supported. + /// Basic2DShader must have an implementation, but any other shader can be unsupported. + /// </summary> + /// <param name="builtInShaderType"></param> + /// <returns></returns> + protected internal abstract AgateShaderImpl CreateBuiltInShader(AgateLib.DisplayLib.Shaders.Implementation.BuiltInShader builtInShaderType); + } } Modified: trunk/AgateLib/DisplayLib/Surface.cs =================================================================== --- trunk/AgateLib/DisplayLib/Surface.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/DisplayLib/Surface.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -93,7 +93,7 @@ if (fileprovider == null) fileprovider = AgateLib.IO.FileProvider.SurfaceAssets; - mImpl = Display.Impl.CreateSurface(fileprovider.ResolveFile(filename)); + mImpl = Core.Factory.DisplayFactory.CreateSurface(fileprovider, filename); Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose); Display.PackAllSurfacesEvent += new EventHandler(Display_PackAllSurfacesEvent); @@ -107,7 +107,7 @@ if (Display.Impl == null) throw new AgateException("AgateLib's display system has not been initialized."); - mImpl = Display.Impl.CreateSurface(st); + mImpl = Core.Factory.DisplayFactory.CreateSurface(st); Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose); Display.PackAllSurfacesEvent += new EventHandler(Display_PackAllSurfacesEvent); @@ -133,7 +133,7 @@ if (Display.Impl == null) throw new AgateException("AgateLib's display system has not been initialized."); - mImpl = Display.Impl.CreateSurface(size); + mImpl = Core.Factory.DisplayFactory.CreateSurface(size); Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose); Display.PackAllSurfacesEvent += new EventHandler(Display_PackAllSurfacesEvent); Modified: trunk/AgateLib/Drivers/IAgateFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IAgateFactory.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/Drivers/IAgateFactory.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -21,6 +21,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using AgateLib.DisplayLib; namespace AgateLib.Drivers { @@ -31,6 +32,6 @@ IInputFactory InputFactory { get; } IPlatformFactory PlatformFactory { get; } - DisplayLib.FontSurface DefaultFont { get; set; } + FontSurface DefaultFont { get; set; } } } Modified: trunk/AgateLib/Drivers/IDisplayFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -16,17 +16,76 @@ // // Contributor(s): Erik Ylvisaker // +using AgateLib.DisplayLib; +using AgateLib.DisplayLib.BitmapFont; using AgateLib.DisplayLib.ImplementationBase; +using AgateLib.Geometry; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AgateLib.Drivers { + /// <summary> + /// Interface that the display factory must implement. + /// </summary> public interface IDisplayFactory { - DisplayImpl CreateDisplayImpl(); + DisplayImpl DisplayImpl { get; } + + /// <summary> + /// Creates a DisplayWindowImpl derived object. + /// </summary> + /// <param name="windowParams"></param> + /// <returns></returns> + DisplayWindowImpl CreateDisplayWindow(DisplayWindow owner, CreateWindowParams windowParams); + + /// <summary> + /// Creates a SurfaceImpl derived object. + /// </summary> + /// <param name="provider"></param> + /// <param name="filename"></param> + /// <returns></returns> + SurfaceImpl CreateSurface(IReadFileProvider provider, string filename); + + /// <summary> + /// Creates a SurfaceImpl derived object from a stream containing + /// the file contents. + /// </summary> + /// <param name="fileStream"></param> + /// <returns></returns> + SurfaceImpl CreateSurface(Stream fileStream); + + /// <summary> + /// Creates a SurfaceImpl derived object that is blank of the specified size. + /// </summary> + SurfaceImpl CreateSurface(Size surfaceSize); + + /// <summary> + /// Creates a FontSurfaceImpl derived object based on an operating system font. + /// </summary> + /// <param name="fontFamily"></param> + /// <param name="sizeInPoints"></param> + /// <param name="style"></param> + /// <returns></returns> + FontSurfaceImpl CreateFont(string fontFamily, float sizeInPoints, FontStyles style); + + /// <summary> + /// Creates a BitmapFontImpl object from the specified options. + /// </summary> + /// <param name="bitmapOptions"></param> + /// <returns></returns> + FontSurfaceImpl CreateFont(BitmapFontOptions bitmapOptions); + + + /// <summary> + /// Creates a FrameBufferImpl object of the specified size. + /// </summary> + /// <param name="size"></param> + FrameBufferImpl CreateFrameBuffer(Size size); + } } Deleted: trunk/AgateLib/Drivers/TypeRegistry.cs =================================================================== --- trunk/AgateLib/Drivers/TypeRegistry.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/Drivers/TypeRegistry.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -1,33 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.Drivers -{ - public static class TypeRegistry - { - public static Type DisplayDriver { get; set; } - public static Type AudioDriver { get; set; } - public static Type InputDriver { get; set; } - } -} Modified: trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs =================================================================== --- trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib/Resources/Legacy/AgateResourceCollection.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -456,7 +456,7 @@ { string path = string.IsNullOrEmpty(RootDirectory) ? filename : RootDirectory + "/" + filename; - SurfaceImpl impl = Display.Impl.CreateSurface(FileProvider, path); + SurfaceImpl impl = Core.Factory.DisplayFactory.CreateSurface(FileProvider, path); mOwnedSurfaces.Add(filename, impl); Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/DesktopGLDisplay.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -45,8 +45,6 @@ Stack<Rectangle> mClipRects = new Stack<Rectangle>(); Rectangle mCurrentClip = Rectangle.Empty; private bool mVSync = true; - private bool mSupportsFramebufferArb; - private bool mSupportsFramebufferExt; private bool mNonPowerOf2Textures; private bool mSupportsShaders; private decimal mGLVersion; @@ -56,8 +54,6 @@ PrimitiveRenderer mPrimitives; - bool mGL3; - public Surface WhiteSurface { get; @@ -69,6 +65,10 @@ private set { mNonPowerOf2Textures = value; } } + public bool GL3 { get; private set; } + public bool SupportsFramebufferExt { get; internal set; } + public bool SupportsFramebufferArb { get; private set;} + protected override void OnRenderTargetChange(FrameBuffer oldRenderTarget) { mRenderTarget = RenderTarget.Impl as GL_FrameBuffer; @@ -92,29 +92,10 @@ { return ShaderFactory.CreateBuiltInShader(builtInShaderType); } - public override DisplayWindowImpl CreateDisplayWindow(DisplayWindow owner, CreateWindowParams windowParams) - { - if (windowParams.IsFullScreen && windowParams.RenderToControl == false) - return new GL_GameWindow(owner, windowParams); - else - return new GL_DisplayControl(owner, windowParams); - //if (windowParams.RenderToControl) - //{ - // return new GL_DisplayControl(windowParams); - //} - //else - //{ - // return new GL_GameWindow(windowParams); - //} - } - public override SurfaceImpl CreateSurface(string fileName) - { - return new GL_Surface(fileName); - } protected override VertexBufferImpl CreateVertexBuffer(VertexLayout layout, int vertexCount) { - if (mGL3) + if (GL3) return new AgateLib.OpenGL.GL3.GLVertexBuffer(layout, vertexCount); else return new AgateLib.OpenGL.Legacy.LegacyVertexBuffer(layout, vertexCount); @@ -124,55 +105,8 @@ return new GL_IndexBuffer(type, size); } - public override SurfaceImpl CreateSurface(Size surfaceSize) + public bool ReadSettingsBool(string name) { - return new GL_Surface(surfaceSize); - } - public override SurfaceImpl CreateSurface(System.IO.Stream fileStream) - { - return new GL_Surface(fileStream); - } - public override FontSurfaceImpl CreateFont(string fontFamily, float sizeInPoints, FontStyles style) - { - BitmapFontOptions options = new BitmapFontOptions(fontFamily, sizeInPoints, style); - - return AgateLib.Platform.WindowsForms.WinForms.BitmapFontUtil.ConstructFromOSFont(options); - } - public override FontSurfaceImpl CreateFont(BitmapFontOptions bitmapOptions) - { - return AgateLib.Platform.WindowsForms.WinForms.BitmapFontUtil.ConstructFromOSFont(bitmapOptions); - } - - protected override FrameBufferImpl CreateFrameBuffer(Size size) - { - if (mGL3 || (mSupportsFramebufferArb && ReadSettingsBool("DisableFramebufferArb") == false)) - return new AgateLib.OpenGL.GL3.FrameBuffer((IGL_Surface)new Surface(size).Impl); - else if (mSupportsFramebufferExt && ReadSettingsBool("DisableFramebufferExt") == false) - { - try - { - return new AgateLib.OpenGL.Legacy.FrameBufferExt((IGL_Surface)new Surface(size).Impl); - } - catch (Exception e) - { - Trace.WriteLine(string.Format("Caught exception {0} when trying to create GL_FrameBuffer_Ext wrapper.", e.GetType())); - Trace.Indent(); - Trace.WriteLine(e.Message); - Trace.Unindent(); - Trace.WriteLine(""); - Trace.WriteLine("Disabling frame buffer extension, and falling back onto glCopyTexSubImage2D."); - Trace.WriteLine("Extensive use of offscreen rendering targets will result in poor performance."); - Trace.WriteLine(""); - - mSupportsFramebufferExt = false; - } - } - - return new AgateLib.OpenGL.Legacy.FrameBufferReadPixels((IGL_Surface)new Surface(size).Impl); - } - - bool ReadSettingsBool(string name) - { string value; if (AgateLib.Core.Settings["AgateLib.OpenGL"].TryGetValue(name, out value) == false) @@ -186,7 +120,7 @@ public GLDrawBuffer CreateDrawBuffer() { - if (mGL3) + if (GL3) return new AgateLib.OpenGL.GL3.DrawBuffer(); else return new AgateLib.OpenGL.Legacy.LegacyDrawBuffer(); @@ -364,19 +298,19 @@ { if (ReadSettingsBool("EnableGL3")) { - mGL3 = true; + GL3 = true; } else { - mGL3 = false; + GL3 = false; mGLVersion = 2.1m; } } LoadExtensions(); - mSupportsFramebufferArb = SupportsExtension("GL_ARB_FRAMEBUFFER_OBJECT"); - mSupportsFramebufferExt = SupportsExtension("GL_EXT_FRAMEBUFFER_OBJECT"); + SupportsFramebufferArb = SupportsExtension("GL_ARB_FRAMEBUFFER_OBJECT"); + SupportsFramebufferExt = SupportsExtension("GL_EXT_FRAMEBUFFER_OBJECT"); mNonPowerOf2Textures = SupportsExtension("GL_ARB_NON_POWER_OF_TWO"); if (mGLVersion >= 3m) @@ -398,7 +332,7 @@ throw new AgateLib.AgateException("OpenGL 1.2 or higher is required, but this system only supports OpenGL " + mGLVersion.ToString() + "."); } - if (mGL3) + if (GL3) mPrimitives = new AgateLib.OpenGL.GL3.GLPrimitiveRenderer(); else mPrimitives = new AgateLib.OpenGL.Legacy.LegacyPrimitiveRenderer(); @@ -408,7 +342,7 @@ mSupportsShaders = true; } - ShaderFactory.Initialize(mGL3); + ShaderFactory.Initialize(GL3); Trace.WriteLine(string.Format("OpenGL version {0} from vendor {1} detected.", mGLVersion, vendor)); Trace.WriteLine("NPOT: " + mNonPowerOf2Textures.ToString()); @@ -420,7 +354,7 @@ string[] extensions; private void LoadExtensions() { - if (mGL3) + if (GL3) { // Forward compatible context (GL 3.0+) int num_extensions; Modified: trunk/AgateLib.Platform.WindowsForms/Factories/DisplayFactory.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/Factories/DisplayFactory.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/AgateLib.Platform.WindowsForms/Factories/DisplayFactory.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -1,7 +1,14 @@ -using AgateLib.Drivers; +using AgateLib.Diagnostics; +using AgateLib.DisplayLib; +using AgateLib.DisplayLib.BitmapFont; +using AgateLib.DisplayLib.ImplementationBase; +using AgateLib.Drivers; +using AgateLib.Geometry; +using AgateLib.OpenGL; using AgateLib.Platform.WindowsForms.DisplayImplementation; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -10,9 +17,90 @@ { class DisplayFactory : IDisplayFactory { - public DisplayLib.ImplementationBase.DisplayImpl CreateDisplayImpl() + public DisplayFactory() { - return new DesktopGLDisplay(); + FullDisplayImpl = new DesktopGLDisplay(); } + + public DisplayImpl DisplayImpl { get { return FullDisplayImpl; } } + public DesktopGLDisplay FullDisplayImpl { get; private set; } + + public DisplayWindowImpl CreateDisplayWindow(DisplayWindow owner, DisplayLib.CreateWindowParams windowParams) + { + if (windowParams.IsFullScreen && windowParams.RenderToControl == false) + return new GL_GameWindow(owner, windowParams); + else + return new GL_DisplayControl(owner, windowParams); + } + + public SurfaceImpl CreateSurface(IReadFileProvider provider, string filename) + { + return new GL_Surface(provider.ResolveFile(filename)); + } + + public SurfaceImpl CreateSurface(Stream fileStream) + { + return new GL_Surface(fileStream); + } + + public SurfaceImpl CreateSurface(Size surfaceSize) + { + return new GL_Surface(surfaceSize); + } + + public FontSurfaceImpl CreateFont(string fontFamily, float sizeInPoints, FontStyles style) + { + BitmapFontOptions options = new BitmapFontOptions(fontFamily, sizeInPoints, style); + + return AgateLib.Platform.WindowsForms.WinForms.BitmapFontUtil.ConstructFromOSFont(options); + } + + public FontSurfaceImpl CreateFont(BitmapFontOptions bitmapOptions) + { + return AgateLib.Platform.WindowsForms.WinForms.BitmapFontUtil.ConstructFromOSFont(bitmapOptions); + } + + + public FrameBufferImpl CreateFrameBuffer(Size size) + { + if (FullDisplayImpl.GL3) + return new AgateLib.OpenGL.GL3.FrameBuffer((IGL_Surface)new Surface(size).Impl); + + if (SupportsFramebufferArb && ReadSettingsBool("DisableFramebufferArb") == false) + return new AgateLib.OpenGL.GL3.FrameBuffer((IGL_Surface)new Surface(size).Impl); + + if (SupportsFramebufferExt && ReadSettingsBool("DisableFramebufferExt") == false) + { + try + { + return new AgateLib.OpenGL.Legacy.FrameBufferExt((IGL_Surface)new Surface(size).Impl); + } + catch (Exception e) + { + Log.WriteLine(string.Format("Caught exception {0} when trying to create GL_FrameBuffer_Ext wrapper.", e.GetType())); + Log.WriteLine(e.Message); + Log.WriteLine(""); + Log.WriteLine("Disabling frame buffer extension, and falling back onto glCopyTexSubImage2D."); + Log.WriteLine("Extensive use of offscreen rendering targets will result in poor performance."); + Log.WriteLine(""); + + SupportsFramebufferExt = false; + } + } + + return new AgateLib.OpenGL.Legacy.FrameBufferReadPixels((IGL_Surface)new Surface(size).Impl); + } + + private bool ReadSettingsBool(string name) + { + return FullDisplayImpl.ReadSettingsBool(name); + } + + public bool SupportsFramebufferArb { get { return FullDisplayImpl.SupportsFramebufferArb; } } + public bool SupportsFramebufferExt + { + get { return FullDisplayImpl.SupportsFramebufferExt; } + set { FullDisplayImpl.SupportsFramebufferExt = value; } + } } } Modified: trunk/UnitTests/Fakes/FakeDisplayDriver.cs =================================================================== --- trunk/UnitTests/Fakes/FakeDisplayDriver.cs 2014-08-21 06:06:57 UTC (rev 1473) +++ trunk/UnitTests/Fakes/FakeDisplayDriver.cs 2014-08-23 16:20:55 UTC (rev 1474) @@ -44,36 +44,7 @@ throw new NotImplementedException(); } - public override DisplayWindowImpl CreateDisplayWindow(AgateLib.DisplayLib.DisplayWindow owner, AgateLib.DisplayLib.CreateWindowParams windowParams) - { - return new FakeDisplayWindow(owner, windowParams); - } - public override SurfaceImpl CreateSurface(string fileName) - { - throw new NotImplementedException(); - } - - public override SurfaceImpl CreateSurface(System.IO.Stream fileStream) - { - throw new NotImplementedException(); - } - - public override SurfaceImpl CreateSurface(AgateLib.Geometry.Size surfaceSize) - { - throw new NotImplementedException(); - } - - public override FontSurfaceImpl CreateFont(string fontFamily, float sizeInPoints, AgateLib.DisplayLib.FontStyles style) - { - throw new NotImplementedException(); - } - - public override FontSurfaceImpl CreateFont(BitmapFontOptions bitmapOptions) - { - throw new NotImplementedException(); - } - protected override void OnBeginFrame() { throw new NotImplementedException(); @@ -159,10 +130,6 @@ return null; } - protected internal override FrameBufferImpl CreateFrameBuffer(AgateLib.Geometry.Size size) - { - throw new NotImplementedException(); - } protected internal override bool GetRenderState(AgateLib.DisplayLib.RenderStateBool renderStateBool) { @@ -185,10 +152,47 @@ class FakeDisplayFactory : IDisplayFactory { - public DisplayImpl CreateDisplayImpl() + public FakeDisplayFactory() { - return new FakeDisplayDriver(); + DisplayImpl = new FakeDisplayDriver(); } + + public DisplayImpl DisplayImpl { get; private set;} + + public DisplayWindowImpl CreateDisplayWindow(AgateLib.DisplayLib.DisplayWindow owner, AgateLib.DisplayLib.CreateWindowParams windowParams) + { + return new FakeDisplayWindow(owner, windowParams); + } + + public SurfaceImpl CreateSurface(IReadFileProvider fileProvider, string fileName) + { + throw new NotImplementedException(); + } + + public SurfaceImpl CreateSurface(System.IO.Stream fileStream) + { + throw new NotImplementedException(); + } + + public SurfaceImpl CreateSurface(AgateLib.Geometry.Size surfaceSize) + { + throw new NotImplementedException(); + } + + public FontSurfaceImpl CreateFont(string fontFamily, float sizeInPoints, AgateLib.DisplayLib.FontStyles style) + { + throw new NotImplementedException(); + } + + public FontSurfaceImpl CreateFont(BitmapFontOptions bitmapOptions) + { + throw new NotImplementedException(); + } + + public FrameBufferImpl CreateFrameBuffer(AgateLib.Geometry.Size size) + { + throw new NotImplementedException(); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-21 06:06:59
|
Revision: 1473 http://sourceforge.net/p/agate/code/1473 Author: kanato Date: 2014-08-21 06:06:57 +0000 (Thu, 21 Aug 2014) Log Message: ----------- Remove obsolete code. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/UserInterface/Widgets/Window.cs Removed Paths: ------------- trunk/AgateLib/UserInterface/Margin.cs trunk/AgateLib/UserInterface/WindowTransition.cs Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-20 14:18:48 UTC (rev 1472) +++ trunk/AgateLib/AgateLib.csproj 2014-08-21 06:06:57 UTC (rev 1473) @@ -577,7 +577,6 @@ <Compile Include="UserInterface\Css\Selectors\ICssSelector.cs" /> <Compile Include="UserInterface\IAudioPlayer.cs" /> <Compile Include="UserInterface\ISurfaceProvider.cs" /> - <Compile Include="UserInterface\Margin.cs" /> <Compile Include="UserInterface\Widgets\Container.cs" /> <Compile Include="UserInterface\Widgets\Desktop.cs" /> <Compile Include="UserInterface\Widgets\Gui.cs" /> @@ -598,7 +597,6 @@ <Compile Include="UserInterface\Widgets\WidgetEventArgs.cs" /> <Compile Include="UserInterface\Widgets\WidgetList.cs" /> <Compile Include="UserInterface\Widgets\Window.cs" /> - <Compile Include="UserInterface\WindowTransition.cs" /> <Compile Include="Utility\Ref.cs"> <SubType>Code</SubType> </Compile> Deleted: trunk/AgateLib/UserInterface/Margin.cs =================================================================== --- trunk/AgateLib/UserInterface/Margin.cs 2014-08-20 14:18:48 UTC (rev 1472) +++ trunk/AgateLib/UserInterface/Margin.cs 2014-08-21 06:06:57 UTC (rev 1473) @@ -1,33 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Zodiac.UserInterface.GuiSystem -{ - public struct Margin - { - public int Left; - public int Right; - public int Top; - public int Bottom; - } -} Modified: trunk/AgateLib/UserInterface/Widgets/Window.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Window.cs 2014-08-20 14:18:48 UTC (rev 1472) +++ trunk/AgateLib/UserInterface/Widgets/Window.cs 2014-08-21 06:06:57 UTC (rev 1473) @@ -27,9 +27,6 @@ { public class Window : Container { - string mBackgroundStyle = "paper"; - string mFrameStyle = "paper"; - public Window() { } @@ -41,40 +38,5 @@ : base(contents) { } - - public FontSurface FontSmall { get; set; } - - public string BackgroundStyle - { - get { return mBackgroundStyle; } - set - { - mBackgroundStyle = value; - } - } - public string FrameStyle - { - get { return mFrameStyle; } - set - { - mFrameStyle = value; - } - } - - public override void DrawImpl() - { - // draw children after drawing frame - base.DrawImpl(); - } - public override void Update(double delta_t, ref bool processInput) - { - base.Update(delta_t, ref processInput); - } - - public override void OnInputButtonDown(AgateLib.InputLib.KeyCode button, ref bool handled) - { - base.OnInputButtonDown(button, ref handled); - } - } } Deleted: trunk/AgateLib/UserInterface/WindowTransition.cs =================================================================== --- trunk/AgateLib/UserInterface/WindowTransition.cs 2014-08-20 14:18:48 UTC (rev 1472) +++ trunk/AgateLib/UserInterface/WindowTransition.cs 2014-08-21 06:06:57 UTC (rev 1473) @@ -1,221 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using AgateLib.DisplayLib; -using AgateLib.Geometry; -using AgateLib.UserInterface.Widgets; - -namespace Zodiac.UserInterface.GuiSystem -{ - public class WindowTransition - { - Window mOwner; - - public WindowTransition(Window wind, TransitionType transitionType) - { - OffScreen = true; - mOwner = wind; - this.TransitionType = transitionType; - } - - bool mInitialized; - public bool InTransition { get; private set; } - public bool HasStarted { get; private set; } - public TransitionType TransitionType { get; private set; } - - Vector2 mStartPosition; - Vector2 mTargetDestination; - float mVelocityMag; - float mAccelerationMag; - - Vector2 mDestination; - Vector2 mPosition; - Vector2 mVelocity; - Vector2 mAcceleration; - - double mTime; - const double mFinalTime = 0.2; - - internal void Update(double delta_t, ref bool processInput) - { - if (mInitialized == false) - Initialize(); - - if (HasStarted == false) - { - TransitionIn(); - HasStarted = true; - } - else if (InTransition == false) - { - return; - } - else - { - if (delta_t > 0.1) - delta_t = 0.1; - - mTime += delta_t; - - processInput = false; - - float dtf = (float)delta_t; - Vector2 step = mVelocity * dtf + 0.5f * mAcceleration * dtf * dtf; - - mPosition += step; - mVelocity += mAcceleration * dtf; - - if (mTime >= mFinalTime) - { - CancelTransition(); - } - } - - mOwner.X = (int)(mPosition.X + 0.5); - mOwner.Y = (int)(mPosition.Y + 0.5); - } - /// <summary> - /// The initialize routine assume that the position of the owning window is - /// its destination. - /// </summary> - private void Initialize() - { - mInitialized = true; - - mTargetDestination = new Vector2(mOwner.X, mOwner.Y); - mStartPosition = mTargetDestination; - mVelocity = Vector2.Empty; - - switch (TransitionType) - { - case TransitionType.FromLeft: - mStartPosition.X = -mOwner.Width - 20; - break; - - case TransitionType.FromTop: - mStartPosition.Y = -mOwner.Height - 20; - break; - - case TransitionType.FromRight: - mStartPosition.X = Display.CurrentWindow.Width + 20; - break; - - case TransitionType.FromBottom: - mStartPosition.Y = Display.CurrentWindow.Height + 20; - break; - } - - // we are using a parabola to slow down as the window reaches its destination. - // r controls the initial speed and amount of slowdown required. at the time - // finalTime/r the window has traveled half-way. r must be larger than one. - // the value chosen 2+sqrt(2) gives a zero velocity as the windows come to rest. - const double r = 3.414213562; - - double distance = (mStartPosition - mTargetDestination).Magnitude; - - mVelocityMag = -(float)(distance / (mFinalTime * (r - 1)) * (1 - r * r * 0.5)); - mAccelerationMag = (float)(distance / (mFinalTime * mFinalTime * (r - 1)) * (r * r - 2 * r)); - - } - - bool MovingOut { get; set; } - - public void TransitionOut() - { - if (MovingOut) - return; - - OffScreen = true; - MovingOut = true; - - InTransition = true; - mTime = 0; - mVelocity = Vector2.Empty; - - mPosition = mTargetDestination; - mDestination = mStartPosition; - - RecalculateVectors(); - - mVelocity += (float)mFinalTime * mAcceleration; - mVelocity *= -1; - mAcceleration *= -1; - } - public void TransitionIn() - { - if (!OffScreen) - return; - - OffScreen = true; - MovingOut = false; - - InTransition = true; - mTime = 0; - mVelocity = Vector2.Empty; - - mPosition = mStartPosition; - mDestination = mTargetDestination; - - RecalculateVectors(); - } - - private void RecalculateVectors() - { - mVelocity = mDestination - mPosition; - mVelocity /= mVelocity.Magnitude; - - mAcceleration = -mVelocity; - - mVelocity *= mVelocityMag; - mAcceleration *= mAccelerationMag; - } - - private static void Swap<T>(ref T a, ref T b) - { - T c = a; - a = b; - b = c; - } - - public bool OffScreen { get; private set; } - - public void CancelTransition() - { - InTransition = false; - mPosition = mDestination; - - if (MovingOut == false) - OffScreen = false; - } - - } - - public enum TransitionType - { - None, - - FromTop, - FromLeft, - FromRight, - FromBottom, - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-20 14:18:55
|
Revision: 1472 http://sourceforge.net/p/agate/code/1472 Author: kanato Date: 2014-08-20 14:18:48 +0000 (Wed, 20 Aug 2014) Log Message: ----------- Fix debugger slowness caused by Enum.TryParse method. Modified Paths: -------------- trunk/AgateLib/UserInterface/Css/Documents/CssBorder.cs trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs Modified: trunk/AgateLib/UserInterface/Css/Documents/CssBorder.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Documents/CssBorder.cs 2014-08-20 01:37:39 UTC (rev 1471) +++ trunk/AgateLib/UserInterface/Css/Documents/CssBorder.cs 2014-08-20 14:18:48 UTC (rev 1472) @@ -130,11 +130,11 @@ { Width = CssDistance.FromString(v); } - if (Enum.TryParse(v, out stl)) + else if (Enum.TryParse(v, out stl)) { Style = stl; } - if (CssTypeConverter.TryParseColor(v, out clr)) + else if (CssTypeConverter.TryParseColor(v, out clr)) { Color = clr; } Modified: trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-08-20 01:37:39 UTC (rev 1471) +++ trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-08-20 14:18:48 UTC (rev 1472) @@ -337,6 +337,14 @@ { var border = style.Data.Border; + if (border.Top.Color.A == 0 && + border.Left.Color.A == 0 && + border.Right.Color.A == 0 && + border.Bottom.Color.A == 0) + { + return; + } + // draw top Rectangle rect = new Rectangle(borderRect.X, borderRect.Y, borderRect.Width, (int)border.Top.Width.Amount); Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-08-20 01:37:39 UTC (rev 1471) +++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-08-20 14:18:48 UTC (rev 1472) @@ -494,7 +494,7 @@ } void pct_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { - SetInternalMousePosition(Interop.Convert(e.Location)); + //SetInternalMousePosition(Interop.Convert(e.Location)); Input.QueueInputEvent(AgateInputEventArgs.MouseMove( this, PixelToLogicalCoords(new Point(e.X, e.Y)))); } Modified: trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs 2014-08-20 01:37:39 UTC (rev 1471) +++ trunk/AgateLib.Platform.WindowsForms/WinForms/FormUtil.cs 2014-08-20 14:18:48 UTC (rev 1472) @@ -124,8 +124,7 @@ /// <summary> /// Gets a System.Windows.Forms.Cursor object which is completely transparent. /// </summary> - [Obsolete("This will be made private in the next release. Don't use it.")] - public static Cursor BlankCursor + internal static Cursor BlankCursor { get { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-20 01:37:46
|
Revision: 1471 http://sourceforge.net/p/agate/code/1471 Author: kanato Date: 2014-08-20 01:37:39 +0000 (Wed, 20 Aug 2014) Log Message: ----------- Add some caching to user interface. Modified Paths: -------------- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs trunk/AgateLib/UserInterface/Widgets/Gui.cs trunk/AgateLib/UserInterface/Widgets/IGuiLayoutEngine.cs trunk/UnitTests/UserInterface/Css/LayoutTest.cs trunk/UnitTests/UserInterface/Widgets/ConversionTests.cs Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-19 21:50:07 UTC (rev 1470) +++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-20 01:37:39 UTC (rev 1471) @@ -36,17 +36,23 @@ { this.mAdapter = adapter; } - public void RedoLayout(Gui gui) + public void UpdateLayout(Gui gui) { - RedoLayout(gui, Display.RenderTarget.CoordinateSystem.Size); + UpdateLayout(gui, Display.RenderTarget.CoordinateSystem.Size); } - public void RedoLayout(Gui gui, Size renderTargetSize) + public void UpdateLayout(Gui gui, Size renderTargetSize) { + bool totalRefresh = false; + + totalRefresh |= gui.Desktop.Width != renderTargetSize.Width; + totalRefresh |= gui.Desktop.Height != renderTargetSize.Height; + gui.Desktop.Width = renderTargetSize.Width; gui.Desktop.Height = renderTargetSize.Height; + SetDesktopAnimatorProperties(gui.Desktop); - RedoLayout(gui.Desktop); + RedoLayout(gui.Desktop, totalRefresh); RedoFixedLayout(gui.Desktop); } @@ -111,7 +117,7 @@ } - private void RedoLayout(Container container) + private void RedoLayout(Container container, bool forceRefresh = false) { var containerStyle = mAdapter.GetStyle(container); var containerAnim = containerStyle.Animator; @@ -120,6 +126,12 @@ containerAnim.ClientRect.X = 0; containerAnim.ClientRect.Y = 0; + if (forceRefresh == false) + { + if (container.Descendants.Any(x => x.LayoutDirty) == false) + return; + } + int maxWidth = ComputeMaxWidthForContainer(containerStyle); Point nextPos = Point.Empty; int maxHeight = 0; @@ -210,6 +222,8 @@ maxHeight = Math.Max(maxHeight, anim.ClientRect.Height + box.Top + box.Bottom); bottom = Math.Max(bottom, anim.ClientRect.Y + anim.ClientRect.Height + box.Bottom); // only add box.Bottom here, because box.Top is taken into account in child.Y. } + + child.LayoutDirty = false; } containerAnim.ClientRect.Width = Math.Min(largestWidth, maxWidth); @@ -246,7 +260,7 @@ break; } - + container.LayoutDirty = false; } private Widget TopLevelWidget(Widget child) Modified: trunk/AgateLib/UserInterface/Widgets/Gui.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Gui.cs 2014-08-19 21:50:07 UTC (rev 1470) +++ trunk/AgateLib/UserInterface/Widgets/Gui.cs 2014-08-20 01:37:39 UTC (rev 1471) @@ -290,7 +290,7 @@ public void OnUpdate(double delta_t, bool processInput) { - mLayout.RedoLayout(this); + mLayout.UpdateLayout(this); mRenderer.Update(this, delta_t); DispatchEvent(window => { window.Update(delta_t, ref processInput); return false; }); Modified: trunk/AgateLib/UserInterface/Widgets/IGuiLayoutEngine.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/IGuiLayoutEngine.cs 2014-08-19 21:50:07 UTC (rev 1470) +++ trunk/AgateLib/UserInterface/Widgets/IGuiLayoutEngine.cs 2014-08-20 01:37:39 UTC (rev 1471) @@ -25,6 +25,6 @@ { public interface IGuiLayoutEngine { - void RedoLayout(Gui gui); + void UpdateLayout(Gui gui); } } Modified: trunk/UnitTests/UserInterface/Css/LayoutTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-19 21:50:07 UTC (rev 1470) +++ trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-20 01:37:39 UTC (rev 1471) @@ -53,7 +53,7 @@ } private void RedoLayout() { - engine.RedoLayout(gui, new Size(1000, 1000)); + engine.UpdateLayout(gui, new Size(1000, 1000)); foreach (var d in gui.Desktop.Descendants) { Modified: trunk/UnitTests/UserInterface/Widgets/ConversionTests.cs =================================================================== --- trunk/UnitTests/UserInterface/Widgets/ConversionTests.cs 2014-08-19 21:50:07 UTC (rev 1470) +++ trunk/UnitTests/UserInterface/Widgets/ConversionTests.cs 2014-08-20 01:37:39 UTC (rev 1471) @@ -19,7 +19,7 @@ } class FakeLayout : IGuiLayoutEngine { - public void RedoLayout(Gui gui) + public void UpdateLayout(Gui gui) { } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-19 21:50:12
|
Revision: 1470 http://sourceforge.net/p/agate/code/1470 Author: kanato Date: 2014-08-19 21:50:07 +0000 (Tue, 19 Aug 2014) Log Message: ----------- Add licensing and comments to some files. Modified Paths: -------------- trunk/AgateLib/ApplicationModels/AgateAppModel.cs trunk/AgateLib/ApplicationModels/AssetLocations.cs trunk/AgateLib/ApplicationModels/CoordinateSystems/FixedAspectRatioCoordinates.cs trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs trunk/AgateLib/ApplicationModels/ExitGameException.cs trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs trunk/AgateLib/ApplicationModels/ModelParameters.cs trunk/AgateLib/Diagnostics/AgateConsole.cs trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleDictionary.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessage.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessageType.cs trunk/AgateLib/Diagnostics/ConsoleSupport/DescriptionAttribute.cs trunk/AgateLib/Diagnostics/ConsoleSupport/ICommandProcessor.cs trunk/AgateLib/Diagnostics/Log.cs trunk/AgateLib/Drivers/DriverImplBase.cs trunk/AgateLib/Drivers/IAgateFactory.cs trunk/AgateLib/Drivers/IAudioFactory.cs trunk/AgateLib/Drivers/IDisplayFactory.cs trunk/AgateLib/Drivers/IInputFactory.cs trunk/AgateLib/Drivers/IObjectConstructor.cs trunk/AgateLib/Drivers/IPlatformFactory.cs trunk/AgateLib/Drivers/NullDrivers/NullInputFactory.cs trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs trunk/AgateLib/Drivers/TypeRegistry.cs trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs trunk/AgateLib/Extensions/Collections/NonGeneric/NonGenericListSorting.cs trunk/AgateLib/Geometry/Polygon.cs trunk/AgateLib/IO/FileProvider.cs trunk/AgateLib/IO/FileSystem.cs trunk/AgateLib/IO/IDirectory.cs trunk/AgateLib/IO/IFile.cs trunk/AgateLib/IO/IPath.cs trunk/AgateLib/IO/IReadWriteFileProvider.cs trunk/AgateLib/IO/IWriteFileProvider.cs trunk/AgateLib/IO/SubDirectoryProvider.cs trunk/AgateLib/InputLib/AgateInputEventArgs.cs trunk/AgateLib/InputLib/IInputHandler.cs trunk/AgateLib/InputLib/Input.cs trunk/AgateLib/InputLib/InputHandlerList.cs trunk/AgateLib/InputLib/JoystickEventArgs.cs trunk/AgateLib/InputLib/MouseButton.cs trunk/AgateLib/Mathematics/MathHelper.cs trunk/AgateLib/Platform/IStopWatch.cs trunk/AgateLib/Platform/PlatformInfo.cs trunk/AgateLib/Platform/Timing.cs trunk/AgateLib/Resources/DC/AgateResource.cs trunk/AgateLib/Resources/DC/AgateResourceCollection.cs trunk/AgateLib/Resources/DC/FontResource.cs trunk/AgateLib/Resources/DC/FontSurfaceResource.cs trunk/AgateLib/Resources/DC/ResourceCollection.cs trunk/AgateLib/Resources/DC/SpriteFrameResource.cs trunk/AgateLib/Resources/DC/SpriteResource.cs trunk/AgateLib/Resources/DC/SurfaceResource.cs trunk/AgateLib/Serialization/Xle/CompressionMode.cs trunk/AgateLib/Serialization/Xle/CompressionType.cs trunk/AgateLib/Serialization/Xle/IXleTypeSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/PointFSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/PointSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleFSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/RectangleSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeFSerializer.cs trunk/AgateLib/Serialization/Xle/TypeSerializers/SizeSerializer.cs trunk/AgateLib/Serialization/Xle/XleTypeSerializerBase.cs trunk/AgateLib/Serialization/Xle/XleTypeSerializerCollection.cs Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs =================================================================== --- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,23 @@ -using AgateLib.DisplayLib; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Diagnostics; +using AgateLib.DisplayLib; using AgateLib.Geometry; using AgateLib.InputLib; using AgateLib.Platform; @@ -149,8 +168,17 @@ } /// <summary> - /// Processes command line arguments. + /// Processes command line arguments. Override this to completely replace the + /// comand line argument processor. /// </summary> + /// <remarks> + /// Arguments are only processed if they start + /// with a dash (-). Any arguments which do not start with a dash are considered + /// parameters to the previous argument. For example, the argument string + /// <code>--window 640,480 test --novsync</code> would call ProcessArgument once + /// for --window with the parameters <code>640,480 test</code> and again for + /// --novsync. + /// </remarks> protected virtual void ProcessArguments() { if (Parameters.Arguments == null) return; @@ -171,7 +199,7 @@ break; } - if (arg.StartsWith("--")) + if (arg.StartsWith("-")) { ProcessArgument(arg, p); @@ -180,6 +208,13 @@ } } + /// <summary> + /// Processes a single command line argument. Override this to replace how + /// command line arguments interact with AgateLib. Unrecognized arguments will be + /// passed to ProcessCustomArgument. + /// </summary> + /// <param name="arg"></param> + /// <param name="parm"></param> protected virtual void ProcessArgument(string arg, IList<string> parm) { switch (arg) @@ -200,10 +235,33 @@ break; default: + ProcessCustomArgument(arg, parm); break; } } + /// <summary> + /// Called when a command-line argument is unhandled. This function logs the argument + /// to AgateLib.Diagnostics.Log. Override this to handle custom arguments. + /// </summary> + /// <param name="arg"></param> + /// <param name="parm"></param> + /// <remarks> + /// All arguments to AgateLib start with two dashes (--). Custom arguments for your + /// application can safely start with a single dash (-) and they won't clash with AgateLib + /// arguments. + /// </remarks> + protected virtual void ProcessCustomArgument(string arg, IList<string> parm) + { + Log.WriteLine("Unknown command line argument:"); + Log.WriteLine(" {0} {1}", arg, string.Join(" ", parm)); + } + + /// <summary> + /// Runs the application model. + /// </summary> + /// <param name="entryPoint"></param> + /// <returns></returns> protected int RunModel(Func<int> entryPoint) { try @@ -233,6 +291,13 @@ } } + /// <summary> + /// Override this to implement the application model. This function + /// should call the entry point and return its return value. + /// It should not catch ExitGameException. + /// </summary> + /// <param name="entryPoint">The application entry point to call.</param> + /// <returns></returns> protected abstract int BeginModel(Func<int> entryPoint); private void AutoCreateDisplayWindow() @@ -261,6 +326,11 @@ window.Closing += window_Closing; } + /// <summary> + /// Method called when the autocreated display window is closing. + /// </summary> + /// <param name="sender"></param> + /// <param name="cancel"></param> protected virtual void window_Closing(object sender, ref bool cancel) { } @@ -297,10 +367,20 @@ return Display.Caps.NativeScreenResolution; } + /// <summary> + /// Returns the auto created display window. If the application model did not + /// automatically create a display window, this is null. + /// </summary> public DisplayWindow AutoCreatedWindow { get { return window; } } + /// <summary> + /// These are the parameters used to initialize and start up the application model. + /// </summary> public ModelParameters Parameters { get; set; } + /// <summary> + /// Processes input events. + /// </summary> public virtual void KeepAlive() { Input.DispatchQueuedEvents(); Modified: trunk/AgateLib/ApplicationModels/AssetLocations.cs =================================================================== --- trunk/AgateLib/ApplicationModels/AssetLocations.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/ApplicationModels/AssetLocations.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,16 +24,34 @@ namespace AgateLib.ApplicationModels { + /// <summary> + /// Structure which indicates where various assets are stored. + /// </summary> public class AssetLocations { public AssetLocations() { } + /// <summary> + /// Path prefix to load surfaces from. + /// </summary> public string Surfaces { get; set; } + /// <summary> + /// Path prefix to load sound effects from. + /// </summary> public string Sound { get; set; } + /// <summary> + /// Path prefix to load music files from. + /// </summary> public string Music { get; set; } + /// <summary> + /// Path prefix to load resource files from. + /// </summary> public string Resources { get; set; } + /// <summary> + /// Path prefix to load user interface files from. + /// </summary> public string UserInterface { get; set; } } } Modified: trunk/AgateLib/ApplicationModels/CoordinateSystems/FixedAspectRatioCoordinates.cs =================================================================== --- trunk/AgateLib/ApplicationModels/CoordinateSystems/FixedAspectRatioCoordinates.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/ApplicationModels/CoordinateSystems/FixedAspectRatioCoordinates.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.Geometry; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs =================================================================== --- trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.Geometry; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/ApplicationModels/ExitGameException.cs =================================================================== --- trunk/AgateLib/ApplicationModels/ExitGameException.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/ApplicationModels/ExitGameException.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,14 +1,47 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AgateLib.ApplicationModels { + /// <summary> + /// Exception which can be thrown to exit an AgateLib game. + /// </summary> public class ExitGameException : Exception { + /// <summary> + /// Constructs an ExitGameException. + /// </summary> public ExitGameException() { } + /// <summary> + /// Constructs an ExitGameException. + /// </summary> + /// <param name="message"></param> public ExitGameException(string message) : base(message) { } + /// <summary> + /// Constructs an ExitGameException. + /// </summary> + /// <param name="message"></param> + /// <param name="inner"></param> public ExitGameException(string message, Exception inner) : base(message, inner) { } } } Modified: trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs =================================================================== --- trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/ApplicationModels/ICoordinateSystemCreator.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.Geometry; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; using System; using System.Collections.Generic; using System.Linq; @@ -6,17 +24,16 @@ namespace AgateLib.ApplicationModels { + /// <summary> + /// Interface for classes which create a coordinate system for a given DisplayWindow size. + /// </summary> public interface ICoordinateSystemCreator { + /// <summary> + /// Returns the coordinate system given the size of the display window. + /// </summary> + /// <param name="displayWindowSize"></param> + /// <returns></returns> Rectangle DetermineCoordinateSystem(Size displayWindowSize); } - - public static class CoordinateSystemCreatorExtensions - { - public static Rectangle DetermineCoordinateSystem( - this ICoordinateSystemCreator csc, Size displayWindowSize) - { - return csc.DetermineCoordinateSystem(displayWindowSize); - } - } } Modified: trunk/AgateLib/ApplicationModels/ModelParameters.cs =================================================================== --- trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.ApplicationModels.CoordinateSystems; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.ApplicationModels.CoordinateSystems; using AgateLib.Geometry; using AgateLib.Platform; using System; @@ -9,8 +27,15 @@ namespace AgateLib.ApplicationModels { + /// <summary> + /// Class which contains the parameters which are used to initialize AgateLib + /// and start up the application model. + /// </summary> public class ModelParameters { + /// <summary> + /// Constructs a ModelParameters object with default parameters. + /// </summary> public ModelParameters() { AssetLocations = new AssetLocations(); @@ -21,21 +46,53 @@ ApplicationName = "AgateLib Application"; VerticalSync = true; } + /// <summary> + /// Constructs a ModelParameters object with default parameters. + /// Also stores the command line arguments. + /// </summary> + /// <param name="args"></param> public ModelParameters(string[] args) : this() { Arguments = args; } + /// <summary> + /// The name of your application. This is used for the title bar of the + /// automatically created DisplayWindow. + /// </summary> public string ApplicationName { get; set; } + /// <summary> + /// Indicates whether AgateLib should automatically create a display window when starting up. + /// This defaults to true for every application model except the passive model. + /// </summary> public bool AutoCreateDisplayWindow { get; set; } + /// <summary> + /// Indicates what size of display window to set. If this is set to Size.Empty (the default) + /// then AgateLib will automatically choose a resolution. This will typically be the same + /// resolution as the display device. + /// </summary> public Size DisplayWindowSize { get; set; } + /// <summary> + /// Indicates whether AgateLib should create a full screen display window when + /// automatically creating a DisplayWindow. Defaults to true. + /// </summary> public bool CreateFullScreenWindow { get; set; } + /// <summary> + /// Indicates whether the frame rate should be restricted to the natural frequency + /// of the display device. + /// </summary> public bool VerticalSync { get; set; } + /// <summary> + /// The command line arguments which were passed in to the application. + /// </summary> public string[] Arguments { get; set; } + /// <summary> + /// Object which indicates the locations of the various assets that are loaded by AgateLib. + /// </summary> public AssetLocations AssetLocations { get; set; } /// <summary> @@ -45,6 +102,10 @@ /// </summary> public ICoordinateSystemCreator CoordinateSystem { get; set; } + /// <summary> + /// Indicates the device type to emulate. This primarily affects the built-in user interface + /// implementation. + /// </summary> public DeviceType EmulateDeviceType { get; set; } } } Modified: trunk/AgateLib/Diagnostics/AgateConsole.cs =================================================================== --- trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Diagnostics/AgateConsole.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.Diagnostics.ConsoleSupport; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Diagnostics.ConsoleSupport; using AgateLib.DisplayLib; using AgateLib.DisplayLib.Shaders; using AgateLib.Geometry; Modified: trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/AgateConsoleCommandProcessor.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; Modified: trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleDictionary.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleDictionary.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleDictionary.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessage.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessage.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessage.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessageType.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessageType.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/ConsoleMessageType.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Diagnostics/ConsoleSupport/DescriptionAttribute.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/DescriptionAttribute.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/DescriptionAttribute.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Diagnostics/ConsoleSupport/ICommandProcessor.cs =================================================================== --- trunk/AgateLib/Diagnostics/ConsoleSupport/ICommandProcessor.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Diagnostics/ConsoleSupport/ICommandProcessor.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; namespace AgateLib.Diagnostics.ConsoleSupport { Modified: trunk/AgateLib/Diagnostics/Log.cs =================================================================== --- trunk/AgateLib/Diagnostics/Log.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Diagnostics/Log.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; Modified: trunk/AgateLib/Drivers/DriverImplBase.cs =================================================================== --- trunk/AgateLib/Drivers/DriverImplBase.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/DriverImplBase.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,3 @@ -using AgateLib.Diagnostics; // The contents of this file are subject to the Mozilla Public License // Version 1.1 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License at @@ -17,6 +16,7 @@ // // Contributor(s): Erik Ylvisaker // +using AgateLib.Diagnostics; using System; using System.Collections.Generic; using System.Text; Modified: trunk/AgateLib/Drivers/IAgateFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IAgateFactory.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/IAgateFactory.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Drivers/IAudioFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IAudioFactory.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/IAudioFactory.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Drivers/IDisplayFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/IDisplayFactory.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.DisplayLib.ImplementationBase; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.DisplayLib.ImplementationBase; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/Drivers/IInputFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IInputFactory.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/IInputFactory.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Drivers/IObjectConstructor.cs =================================================================== --- trunk/AgateLib/Drivers/IObjectConstructor.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/IObjectConstructor.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Drivers/IPlatformFactory.cs =================================================================== --- trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/IPlatformFactory.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.Platform; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Platform; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/Drivers/NullDrivers/NullInputFactory.cs =================================================================== --- trunk/AgateLib/Drivers/NullDrivers/NullInputFactory.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/NullDrivers/NullInputFactory.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs =================================================================== --- trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/NullDrivers/NullSoundFactory.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Drivers/TypeRegistry.cs =================================================================== --- trunk/AgateLib/Drivers/TypeRegistry.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Drivers/TypeRegistry.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs =================================================================== --- trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Extensions/Collections/Generic/ListSorting.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -6,6 +24,9 @@ namespace AgateLib.Extensions.Collections.Generic { + /// <summary> + /// Extensions for Lists that provide stable sort methods. + /// </summary> public static class ListSorting { /// <summary> Modified: trunk/AgateLib/Extensions/Collections/NonGeneric/NonGenericListSorting.cs =================================================================== --- trunk/AgateLib/Extensions/Collections/NonGeneric/NonGenericListSorting.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Extensions/Collections/NonGeneric/NonGenericListSorting.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/Geometry/Polygon.cs =================================================================== --- trunk/AgateLib/Geometry/Polygon.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/Geometry/Polygon.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/IO/FileProvider.cs =================================================================== --- trunk/AgateLib/IO/FileProvider.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/IO/FileProvider.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.ApplicationModels; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.ApplicationModels; using AgateLib.Drivers; using System; using System.Collections.Generic; Modified: trunk/AgateLib/IO/FileSystem.cs =================================================================== --- trunk/AgateLib/IO/FileSystem.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/IO/FileSystem.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.IO; using System.Linq; Modified: trunk/AgateLib/IO/IDirectory.cs =================================================================== --- trunk/AgateLib/IO/IDirectory.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/IO/IDirectory.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/IO/IFile.cs =================================================================== --- trunk/AgateLib/IO/IFile.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/IO/IFile.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/IO/IPath.cs =================================================================== --- trunk/AgateLib/IO/IPath.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/IO/IPath.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/IO/IReadWriteFileProvider.cs =================================================================== --- trunk/AgateLib/IO/IReadWriteFileProvider.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/IO/IReadWriteFileProvider.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/IO/IWriteFileProvider.cs =================================================================== --- trunk/AgateLib/IO/IWriteFileProvider.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/IO/IWriteFileProvider.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/IO/SubDirectoryProvider.cs =================================================================== --- trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/InputLib/AgateInputEventArgs.cs =================================================================== --- trunk/AgateLib/InputLib/AgateInputEventArgs.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/InputLib/AgateInputEventArgs.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using AgateLib.Geometry; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; using AgateLib.InputLib.Legacy; using System; using System.Collections.Generic; Modified: trunk/AgateLib/InputLib/IInputHandler.cs =================================================================== --- trunk/AgateLib/InputLib/IInputHandler.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/InputLib/IInputHandler.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/InputLib/Input.cs =================================================================== --- trunk/AgateLib/InputLib/Input.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/InputLib/Input.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/InputLib/InputHandlerList.cs =================================================================== --- trunk/AgateLib/InputLib/InputHandlerList.cs 2014-08-19 20:17:02 UTC (rev 1469) +++ trunk/AgateLib/InputLib/InputHandlerList.cs 2014-08-19 21:50:07 UTC (rev 1470) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +/... [truncated message content] |
From: <ka...@us...> - 2014-08-19 20:17:07
|
Revision: 1469 http://sourceforge.net/p/agate/code/1469 Author: kanato Date: 2014-08-19 20:17:02 +0000 (Tue, 19 Aug 2014) Log Message: ----------- Add unit test updates for namespace changes. Modified Paths: -------------- trunk/Tests/UserInterfaceTests/GuiStuff.cs trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs trunk/UnitTests/Fakes/FakePlatformInfo.cs trunk/UnitTests/UserInterface/Css/AdapterTest.cs trunk/UnitTests/UserInterface/Css/BindingTest.cs trunk/UnitTests/UserInterface/Css/CssTestBase.cs trunk/UnitTests/UserInterface/Css/LayoutTest.cs trunk/UnitTests/UserInterface/Css/ParseTest.cs Modified: trunk/Tests/UserInterfaceTests/GuiStuff.cs =================================================================== --- trunk/Tests/UserInterfaceTests/GuiStuff.cs 2014-08-19 20:16:14 UTC (rev 1468) +++ trunk/Tests/UserInterfaceTests/GuiStuff.cs 2014-08-19 20:17:02 UTC (rev 1469) @@ -4,6 +4,7 @@ using AgateLib.InputLib.Legacy; using AgateLib.Resources.Legacy; using AgateLib.UserInterface.Css; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Layout; using AgateLib.UserInterface.Css.Rendering; using AgateLib.UserInterface.Widgets; Modified: trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs =================================================================== --- trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs 2014-08-19 20:16:14 UTC (rev 1468) +++ trunk/UnitTests/ApplicationModels/ArgumentProcessing.cs 2014-08-19 20:17:02 UTC (rev 1469) @@ -1,5 +1,6 @@ using AgateLib.ApplicationModels; using AgateLib.Geometry; +using AgateLib.Platform; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; @@ -33,7 +34,7 @@ { } - protected override void ProcessArgument(string arg, string parm) + protected override void ProcessArgument(string arg, IList<string> parm) { if (Expected.Count > 0) { @@ -42,9 +43,9 @@ expected.RemoveAt(0); - if (parm != "") + if (parm.Count > 0) { - Assert.AreEqual(expected[0], parm); + Assert.AreEqual(expected[0], parm[0]); expected.RemoveAt(0); } } @@ -92,5 +93,24 @@ Assert.IsFalse(p.Parameters.CreateFullScreenWindow); Assert.AreEqual(new Size(640, 480), p.Parameters.DisplayWindowSize); } + + + [TestMethod] + public void DeviceEmulation() + { + ArgumentProcessing p = EmulationArgument(DeviceType.Handheld); + Assert.AreEqual(DeviceType.Handheld, p.Parameters.EmulateDeviceType); + } + + private static ArgumentProcessing EmulationArgument(DeviceType type) + { + ArgumentProcessing p = new ArgumentProcessing(new ModelParameters + { + Arguments = ("--emulate-device " + type.ToString()).Split(' '), + }); + + p.Initialize(); + return p; + } } } Modified: trunk/UnitTests/Fakes/FakePlatformInfo.cs =================================================================== --- trunk/UnitTests/Fakes/FakePlatformInfo.cs 2014-08-19 20:16:14 UTC (rev 1468) +++ trunk/UnitTests/Fakes/FakePlatformInfo.cs 2014-08-19 20:17:02 UTC (rev 1469) @@ -22,15 +22,5 @@ { throw new NotImplementedException(); } - - public override PlatformType PlatformType - { - get { throw new NotImplementedException(); } - } - - public override DotNetRuntime Runtime - { - get { throw new NotImplementedException(); } - } } } Modified: trunk/UnitTests/UserInterface/Css/AdapterTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/AdapterTest.cs 2014-08-19 20:16:14 UTC (rev 1468) +++ trunk/UnitTests/UserInterface/Css/AdapterTest.cs 2014-08-19 20:17:02 UTC (rev 1469) @@ -1,5 +1,5 @@ using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Widgets; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; Modified: trunk/UnitTests/UserInterface/Css/BindingTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/BindingTest.cs 2014-08-19 20:16:14 UTC (rev 1468) +++ trunk/UnitTests/UserInterface/Css/BindingTest.cs 2014-08-19 20:17:02 UTC (rev 1469) @@ -1,5 +1,5 @@ using AgateLib.UserInterface.Css.Binders; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Selectors; using AgateLib.UserInterface.Widgets; using Microsoft.VisualStudio.TestTools.UnitTesting; Modified: trunk/UnitTests/UserInterface/Css/CssTestBase.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/CssTestBase.cs 2014-08-19 20:16:14 UTC (rev 1468) +++ trunk/UnitTests/UserInterface/Css/CssTestBase.cs 2014-08-19 20:17:02 UTC (rev 1469) @@ -1,6 +1,6 @@ using AgateLib.Geometry; using AgateLib.UserInterface.Css.Binders; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Selectors; using AgateLib.UserInterface.Widgets; using Microsoft.VisualStudio.TestTools.UnitTesting; Modified: trunk/UnitTests/UserInterface/Css/LayoutTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-19 20:16:14 UTC (rev 1468) +++ trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-19 20:17:02 UTC (rev 1469) @@ -3,6 +3,7 @@ using AgateLib.Geometry; using AgateLib.Platform.WindowsForms.ApplicationModels; using AgateLib.UnitTests.Fakes; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Layout; using AgateLib.UserInterface.Widgets; using AgateLib.UserInterface.Widgets.Tests; Modified: trunk/UnitTests/UserInterface/Css/ParseTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/ParseTest.cs 2014-08-19 20:16:14 UTC (rev 1468) +++ trunk/UnitTests/UserInterface/Css/ParseTest.cs 2014-08-19 20:17:02 UTC (rev 1469) @@ -1,7 +1,7 @@ using AgateLib.Geometry; using AgateLib.UnitTesting; using AgateLib.UserInterface.Css.Binders; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Selectors; using AgateLib.UserInterface.Widgets; using Microsoft.VisualStudio.TestTools.UnitTesting; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-19 20:16:28
|
Revision: 1468 http://sourceforge.net/p/agate/code/1468 Author: kanato Date: 2014-08-19 20:16:14 +0000 (Tue, 19 Aug 2014) Log Message: ----------- Initial implementation of css media selection. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/ApplicationModels/AgateAppModel.cs trunk/AgateLib/ApplicationModels/ModelParameters.cs trunk/AgateLib/Platform/PlatformInfo.cs trunk/AgateLib/UserInterface/Css/Binders/Binding.cs trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs trunk/AgateLib/UserInterface/Css/CssAdapter.cs trunk/AgateLib/UserInterface/Css/CssStyleData.cs trunk/AgateLib/UserInterface/Css/Documents/CssBackground.cs trunk/AgateLib/UserInterface/Css/Documents/CssBackgroundPosition.cs trunk/AgateLib/UserInterface/Css/Documents/CssBorder.cs trunk/AgateLib/UserInterface/Css/Documents/CssBorderImage.cs trunk/AgateLib/UserInterface/Css/Documents/CssBoxComponent.cs trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs trunk/AgateLib/UserInterface/Css/Documents/CssFont.cs trunk/AgateLib/UserInterface/Css/Documents/CssLayout.cs trunk/AgateLib/UserInterface/Css/Documents/CssRectangle.cs trunk/AgateLib/UserInterface/Css/Documents/CssTransition.cs trunk/AgateLib/UserInterface/Css/Documents/ICssBoxComponent.cs trunk/AgateLib/UserInterface/Css/Documents/ICssPropertyFromText.cs trunk/AgateLib/UserInterface/Css/Documents/PropertyEnums.cs trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs trunk/AgateLib/UserInterface/Css/Layout/Defaults/MenuDefaultStyle.cs trunk/AgateLib/UserInterface/Css/Parser/CssParser.cs trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs trunk/AgateLib/UserInterface/Css/Rendering/Transitions/SlideTransition.cs trunk/AgateLib/UserInterface/Css/Rendering/Transitions/TransitionFactory.cs trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs trunk/AgateLib/UserInterface/Css/Selectors/CssSelector.cs trunk/AgateLib/UserInterface/Css/Selectors/CssSelectorChain.cs trunk/AgateLib/UserInterface/Css/Selectors/ICssSelector.cs trunk/AgateLib/UserInterface/Widgets/Gui.cs trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FormsPlatformInfo.cs Added Paths: ----------- trunk/AgateLib/Platform/PlatformEnums.cs trunk/AgateLib/UserInterface/Css/CssMediaInfo.cs trunk/AgateLib/UserInterface/Css/Documents/ trunk/AgateLib/UserInterface/Css/Documents/CssDocument.cs trunk/AgateLib/UserInterface/Css/Documents/CssMediaSelector.cs Removed Paths: ------------- trunk/AgateLib/Platform/PlatformType.cs trunk/AgateLib/UserInterface/Css/CssDocument.cs trunk/AgateLib/UserInterface/Css/CssMedia.cs trunk/AgateLib/UserInterface/Css/Properties/ Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/AgateLib.csproj 2014-08-19 20:16:14 UTC (rev 1468) @@ -183,7 +183,7 @@ <Compile Include="IO\SubDirectoryProvider.cs" /> <Compile Include="Platform\IStopWatch.cs" /> <Compile Include="Platform\PlatformInfo.cs" /> - <Compile Include="Platform\PlatformType.cs" /> + <Compile Include="Platform\PlatformEnums.cs" /> <Compile Include="Resources\Legacy\ImageResource.cs" /> <Compile Include="Serialization\Xle\CompressionMode.cs" /> <Compile Include="Serialization\Xle\CompressionType.cs" /> @@ -526,27 +526,28 @@ <Compile Include="UserInterface\Css\Binders\ReflectionPropertyBinder.cs" /> <Compile Include="UserInterface\Css\Cache\StyleCache.cs" /> <Compile Include="UserInterface\Css\CssAdapter.cs" /> - <Compile Include="UserInterface\Css\Properties\CssBackground.cs" /> - <Compile Include="UserInterface\Css\Properties\CssBackgroundPosition.cs" /> - <Compile Include="UserInterface\Css\Properties\CssBorder.cs" /> - <Compile Include="UserInterface\Css\Properties\CssBorderImage.cs" /> - <Compile Include="UserInterface\Css\Properties\CssBoxComponent.cs" /> - <Compile Include="UserInterface\Css\Properties\PropertyEnums.cs" /> - <Compile Include="UserInterface\Css\Properties\CssDistance.cs" /> - <Compile Include="UserInterface\Css\CssDocument.cs" /> - <Compile Include="UserInterface\Css\Properties\CssFont.cs" /> - <Compile Include="UserInterface\Css\Properties\CssLayout.cs" /> - <Compile Include="UserInterface\Css\CssMedia.cs" /> + <Compile Include="UserInterface\Css\CssMediaInfo.cs" /> + <Compile Include="UserInterface\Css\Documents\CssBackground.cs" /> + <Compile Include="UserInterface\Css\Documents\CssBackgroundPosition.cs" /> + <Compile Include="UserInterface\Css\Documents\CssBorder.cs" /> + <Compile Include="UserInterface\Css\Documents\CssBorderImage.cs" /> + <Compile Include="UserInterface\Css\Documents\CssBoxComponent.cs" /> + <Compile Include="UserInterface\Css\Documents\PropertyEnums.cs" /> + <Compile Include="UserInterface\Css\Documents\CssDistance.cs" /> + <Compile Include="UserInterface\Css\Documents\CssDocument.cs" /> + <Compile Include="UserInterface\Css\Documents\CssFont.cs" /> + <Compile Include="UserInterface\Css\Documents\CssLayout.cs" /> + <Compile Include="UserInterface\Css\Documents\CssMediaSelector.cs" /> <Compile Include="UserInterface\Css\CssPseudoClass.cs" /> - <Compile Include="UserInterface\Css\Properties\CssRectangle.cs" /> + <Compile Include="UserInterface\Css\Documents\CssRectangle.cs" /> <Compile Include="UserInterface\Css\CssRuleBlock.cs" /> <Compile Include="UserInterface\Css\CssStyle.cs" /> <Compile Include="UserInterface\Css\CssStyleData.cs" /> - <Compile Include="UserInterface\Css\Properties\CssTransition.cs" /> + <Compile Include="UserInterface\Css\Documents\CssTransition.cs" /> <Compile Include="UserInterface\Css\Extensions.cs" /> - <Compile Include="UserInterface\Css\Properties\ICssBoxComponent.cs" /> + <Compile Include="UserInterface\Css\Documents\ICssBoxComponent.cs" /> <Compile Include="UserInterface\Css\ICssCanSelect.cs" /> - <Compile Include="UserInterface\Css\Properties\ICssPropertyFromText.cs" /> + <Compile Include="UserInterface\Css\Documents\ICssPropertyFromText.cs" /> <Compile Include="UserInterface\Css\Layout\CssBox.cs" /> <Compile Include="UserInterface\Css\Layout\CssBoxModel.cs" /> <Compile Include="UserInterface\Css\Layout\CssLayoutEngine.cs" /> Modified: trunk/AgateLib/ApplicationModels/AgateAppModel.cs =================================================================== --- trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/ApplicationModels/AgateAppModel.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -1,6 +1,7 @@ using AgateLib.DisplayLib; using AgateLib.Geometry; using AgateLib.InputLib; +using AgateLib.Platform; using System; using System.Collections.Generic; using System.Linq; @@ -14,8 +15,8 @@ public static AgateAppModel Instance { get; private set; } - public static bool IsAlive - { + public static bool IsAlive + { get { if (Instance == null) @@ -31,7 +32,7 @@ } } - + static Func<int> ActionToFunc(Action entry) { return () => { entry(); return 0; }; @@ -50,6 +51,11 @@ Instance = this; } + /// <summary> + /// Initializes the applicatin model. This will process command line arguments and initialize AgateLib. + /// It is not required to call this function manually, it will be called by the Run method if it has not + /// been called. + /// </summary> public void Initialize() { ProcessArguments(); @@ -57,6 +63,9 @@ InitializeImpl(); } + /// <summary> + /// Override this to provide proper platform initialization of AgateLib. + /// </summary> protected virtual void InitializeImpl() { } @@ -67,24 +76,49 @@ if (Instance == this) Instance = null; } + /// <summary> + /// Override this to clean up the platform initialization of AgateLib. + /// </summary> + /// <param name="disposing"></param> protected virtual void Dispose(bool disposing) { } - + /// <summary> + /// Runs the application model with the specified entry point for your application. + /// </summary> + /// <param name="entry">A delegate which will be called to run your application.</param> + /// <returns>Returns 0.</returns> public int Run(Action entry) { return RunImpl(entry); } + /// <summary> + /// Runs the application model with the specified entry point for your application. + /// </summary> + /// <param name="entry">A delegate which will be called to run your application.</param> + /// <returns>Returns the return value from the <c>entry</c> parameter.</returns> public int Run(Func<int> entry) { return RunImpl(entry); } + /// <summary> + /// Runs the application model with the specified entry point and command line arguments for your application. + /// </summary> + /// <param name="args">The command arguments to process.</param> + /// <param name="entry">A delegate which will be called to run your application.</param> + /// <returns>Returns 0.</returns> public int Run(string[] args, Action entry) { Parameters.Arguments = args; return RunImpl(entry); } + /// <summary> + /// Runs the application model with the specified entry point and command line arguments for your application. + /// </summary> + /// <param name="args">The command arguments to process.</param> + /// <param name="entry">A delegate which will be called to run your application.</param> + /// <returns>Returns the return value from the <c>entry</c> parameter.</returns> public int Run(string[] args, Func<int> entry) { Parameters.Arguments = args; @@ -96,6 +130,12 @@ { return RunImpl(ActionToFunc(entry)); } + /// <summary> + /// Runs the application model by calling RunModel. If you override this, make + /// sure to catch the ExitGameException and return 0 in the exception handler. + /// </summary> + /// <param name="entry"></param> + /// <returns></returns> protected virtual int RunImpl(Func<int> entry) { try @@ -108,42 +148,57 @@ } } + /// <summary> + /// Processes command line arguments. + /// </summary> protected virtual void ProcessArguments() { if (Parameters.Arguments == null) return; - for(int i = 0; i < Parameters.Arguments.Length; i++) + List<string> p = new List<string>(); + + for (int i = 0; i < Parameters.Arguments.Length; i++) { var arg = Parameters.Arguments[i]; - int extraArguments = Parameters.Arguments.Length - i- 1; - bool nextArgIsParam = extraArguments > 0 && Parameters.Arguments[i+1].StartsWith("--") == false; + int extraArguments = Parameters.Arguments.Length - i - 1; - if (arg.StartsWith("--")) + p.Clear(); + for (int j = i+1; j < Parameters.Arguments.Length; j++) { - if (nextArgIsParam) - { - ProcessArgument(arg, Parameters.Arguments[i + 1]); - i++; - } + if (Parameters.Arguments[j].StartsWith("-") == false) + p.Add(Parameters.Arguments[j]); else - ProcessArgument(arg, ""); + break; } + + if (arg.StartsWith("--")) + { + ProcessArgument(arg, p); + + i += p.Count; + } } } - protected virtual void ProcessArgument(string arg, string parm) + protected virtual void ProcessArgument(string arg, IList<string> parm) { - switch(arg) + switch (arg) { case "--window": Parameters.CreateFullScreenWindow = false; - Parameters.DisplayWindowSize = Size.FromString(parm); + if (parm.Count > 0) + Parameters.DisplayWindowSize = Size.FromString(parm[0]); break; case "--novsync": Parameters.VerticalSync = false; break; + case "--emulate-device": + if (parm.Count > 0) + Parameters.EmulateDeviceType = (DeviceType)Enum.Parse(typeof(DeviceType), parm[0], true); + break; + default: break; } @@ -155,6 +210,7 @@ { Initialize(); AutoCreateDisplayWindow(); + SetPlatformEmulation(); int retval = BeginModel(entryPoint); @@ -169,15 +225,23 @@ } } + private void SetPlatformEmulation() + { + if (Parameters.EmulateDeviceType != DeviceType.Unknown) + { + Core.Platform.DeviceType = Parameters.EmulateDeviceType; + } + } + protected abstract int BeginModel(Func<int> entryPoint); - + private void AutoCreateDisplayWindow() { if (Parameters.AutoCreateDisplayWindow == false) return; if (Parameters.CreateFullScreenWindow) - { + { window = DisplayWindow.CreateFullScreen( Parameters.ApplicationName, GetFullScreenSize()); @@ -221,8 +285,8 @@ { if (Parameters.DisplayWindowSize.IsEmpty) return GetScreenSize(); - - if (Parameters.DisplayWindowSize.Width == 0 ) throw new AgateException("Cannot create a display window with width 0."); + + if (Parameters.DisplayWindowSize.Width == 0) throw new AgateException("Cannot create a display window with width 0."); if (Parameters.DisplayWindowSize.Height == 0) throw new AgateException("Cannot create a display window with height 0."); return Parameters.DisplayWindowSize; Modified: trunk/AgateLib/ApplicationModels/ModelParameters.cs =================================================================== --- trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/ApplicationModels/ModelParameters.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -1,5 +1,6 @@ using AgateLib.ApplicationModels.CoordinateSystems; using AgateLib.Geometry; +using AgateLib.Platform; using System; using System.Collections.Generic; using System.Linq; @@ -43,5 +44,7 @@ /// AutoCreateDisplayWindow is false, this property is not used. /// </summary> public ICoordinateSystemCreator CoordinateSystem { get; set; } + + public DeviceType EmulateDeviceType { get; set; } } } Copied: trunk/AgateLib/Platform/PlatformEnums.cs (from rev 1466, trunk/AgateLib/Platform/PlatformType.cs) =================================================================== --- trunk/AgateLib/Platform/PlatformEnums.cs (rev 0) +++ trunk/AgateLib/Platform/PlatformEnums.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -0,0 +1,145 @@ +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.Platform +{ + /// <summary> + /// Enumeration listing the known platform types. + /// </summary> + public enum PlatformType + { + /// <summary> + /// Default value. + /// </summary> + Unknown = 0, + + /// <summary> + /// The Microsoft Windows platform, including Windows 98, Windows NT, Windows XP, Windows Vista, etc. + /// </summary> + Windows, + /// <summary> + /// Some Linux / Unix platform, typically running with an X windowing system. + /// </summary> + Linux, + /// <summary> + /// Mac OS 10.3 or later. + /// </summary> + MacOS, + + /// <summary> + /// Microsoft's XBox 360 console. + /// </summary> + XBox360, + /// <summary> + /// The portable GP2x handheld, or compatible. + /// </summary> + Gp2x, + + /// <summary> + /// An device running the Android operating system. + /// </summary> + Android, + } + + /// <summary> + /// Enum which indicates which type of device we are running on. + /// </summary> + public enum DeviceType + { + /// <summary> + /// Undetermined device type + /// </summary> + Unknown = 0, + + /// <summary> + /// A desktop or laptop computer with a mouse and keyboard for input. + /// </summary> + Computer, + /// <summary> + /// A tablet with a large screen and the main input method is the touch screen. + /// </summary> + Tablet, + /// <summary> + /// A handheld device such as a smart phone with a small but possibly high resolution screen. + /// </summary> + Handheld, + } + + /// <summary> + /// Enum indicating which version of Microsoft Windows is currently being run. + /// </summary> + public enum WindowsVersion + { + /// <summary> + /// An unknown version of Windows. + /// </summary> + Unknown = 0, + + /// <summary> + /// Windows 98. + /// </summary> + Windows98, + /// <summary> + /// Windows XP or Server 2003. + /// </summary> + WindowsXP, + /// <summary> + /// Windows Vista or Server 2008. + /// </summary> + WindowsVista, + /// <summary> + /// Windows 7. + /// </summary> + Windows7, + /// <summary> + /// Windows 8. + /// </summary> + Windows8 + } + + /// <summary> + /// Enum indicating which .NET runtime is currently in use. + /// </summary> + public enum DotNetRuntime + { + /// <summary> + /// An unknown runtime. + /// </summary> + Unknown = 0, + + /// <summary> + /// Microsoft's runtime. + /// </summary> + MicrosoftDotNet = 1, + /// <summary> + /// The runtime of the Mono project. + /// </summary> + Mono = 2, + /// <summary> + /// The DotGnu / Portable.NET runtime. + /// Note that presence of this enumeration value does not indicate + /// that using AgateLib on DotGnu is supported. + /// </summary> + DotGnu = 9999, + } +} Modified: trunk/AgateLib/Platform/PlatformInfo.cs =================================================================== --- trunk/AgateLib/Platform/PlatformInfo.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/Platform/PlatformInfo.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -13,8 +13,9 @@ protected internal abstract void SetFolderPaths(string mCompanyName, string mAppName); protected internal abstract void EnsureAppDataDirectoryExists(); - public abstract PlatformType PlatformType { get; } + public PlatformType PlatformType { get; protected internal set; } + public DeviceType DeviceType { get; protected internal set; } - public abstract DotNetRuntime Runtime { get; } + public DotNetRuntime Runtime { get; protected internal set; } } } Deleted: trunk/AgateLib/Platform/PlatformType.cs =================================================================== --- trunk/AgateLib/Platform/PlatformType.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/Platform/PlatformType.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -1,116 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AgateLib.Platform -{ - /// <summary> - /// Enumeration listing the known platform types. - /// </summary> - public enum PlatformType - { - /// <summary> - /// Default value. - /// </summary> - Unknown = 0, - - /// <summary> - /// The Microsoft Windows platform, including Windows 98, Windows NT, Windows XP, Windows Vista, etc. - /// </summary> - Windows, - /// <summary> - /// Some Linux / Unix platform, typically running with an X windowing system. - /// </summary> - Linux, - /// <summary> - /// Mac OS 10.3 or later. - /// </summary> - MacOS, - - /// <summary> - /// Microsoft's XBox 360 console. - /// </summary> - XBox360, - /// <summary> - /// The portable GP2x handheld, or compatible. - /// </summary> - Gp2x, - } - - /// <summary> - /// Enum indicating which version of Microsoft Windows is currently being run. - /// </summary> - public enum WindowsVersion - { - /// <summary> - /// An unknown version of Windows. - /// </summary> - Unknown = 0, - - /// <summary> - /// Windows 98. - /// </summary> - Windows98, - /// <summary> - /// Windows XP or Server 2003. - /// </summary> - WindowsXP, - /// <summary> - /// Windows Vista or Server 2008. - /// </summary> - WindowsVista, - /// <summary> - /// Windows 7. - /// </summary> - Windows7, - /// <summary> - /// Windows 8. - /// </summary> - Windows8 - } - - /// <summary> - /// Enum indicating which .NET runtime is currently in use. - /// </summary> - public enum DotNetRuntime - { - /// <summary> - /// An unknown runtime. - /// </summary> - Unknown = 0, - - /// <summary> - /// Microsoft's runtime. - /// </summary> - MicrosoftDotNet = 1, - /// <summary> - /// The runtime of the Mono project. - /// </summary> - Mono = 2, - /// <summary> - /// The DotGnu / Portable.NET runtime. - /// Note that presence of this enumeration value does not indicate - /// that using AgateLib on DotGnu is supported. - /// </summary> - DotGnu = 9999, - } -} Modified: trunk/AgateLib/UserInterface/Css/Binders/Binding.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/Binding.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Binders/Binding.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -16,7 +16,7 @@ // // Contributor(s): Erik Ylvisaker // -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -17,7 +17,7 @@ // Contributor(s): Erik Ylvisaker // using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/UserInterface/Css/CssAdapter.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssAdapter.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/CssAdapter.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -19,7 +19,7 @@ using AgateLib.DisplayLib; using AgateLib.UserInterface.Css.Layout; using AgateLib.UserInterface.Css.Layout.Defaults; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Selectors; using AgateLib.UserInterface.Widgets; using System; @@ -27,6 +27,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using AgateLib.Platform; namespace AgateLib.UserInterface.Css { @@ -35,13 +36,31 @@ Dictionary<Widget, CssStyle> mObjectStyles = new Dictionary<Widget, CssStyle>(); DefaultStyleCollection mDefaultStyles = new DefaultStyleCollection(); private CssDocument mDocument; - + internal CssAdapter(CssDocument doc) { Document = doc; + + MediumInfo = new CssMediumInfo(); + + switch (Core.Platform.DeviceType) + { + case DeviceType.Computer: + MediumInfo.MediaType = MediaType.Screen; + break; + + case DeviceType.Handheld: + MediumInfo.MediaType = MediaType.Handheld; + break; + + case DeviceType.Tablet: + MediumInfo.MediaType = MediaType.Tablet; + break; + } } - public CssAdapter(CssDocument doc, Font defaultFont) : this(doc) + public CssAdapter(CssDocument doc, Font defaultFont) + : this(doc) { this.DefaultFont = defaultFont; } @@ -55,8 +74,6 @@ { mDocument = value; - CurrentMedium = mDocument.DefaultMedium; - foreach (var style in mObjectStyles.Values) { style.AppliedBlocks.Clear(); @@ -233,7 +250,7 @@ return; mDefaultStyles[style.Widget.GetType()].InheritParentProperties(style, GetStyle(style.Widget.Parent)); - + } private void ReportError(string p) @@ -254,20 +271,23 @@ string id = control.Name; IEnumerable<string> classes = GetCssClasses(style); - foreach (var block in CurrentMedium.RuleBlocks) + foreach (var medium in ApplicableMedia) { - if (BlockAppliesTo(block, control, id, classes)) + foreach (var block in medium.RuleBlocks) { - if (style.AppliedBlocks.Contains(block) == false) + if (BlockAppliesTo(block, control, id, classes)) { - style.AppliedBlocks.Add(block); + if (style.AppliedBlocks.Contains(block) == false) + { + style.AppliedBlocks.Add(block); + } } - } - else - { - if (style.AppliedBlocks.Contains(block)) + else { - style.AppliedBlocks.Remove(block); + if (style.AppliedBlocks.Contains(block)) + { + style.AppliedBlocks.Remove(block); + } } } } @@ -327,8 +347,31 @@ return style.SplitClasses; } + public CssMediumInfo MediumInfo { get; set; } + public IEnumerable<CssMediaSelector> ApplicableMedia + { + get + { + yield return Document.DefaultMedium; - CssMedia CurrentMedium { get; set; } + foreach (var medium in Document.Media) + { + if (MediaSelectorApplies(medium.Selector, MediumInfo)) + yield return medium; + } + } + } + + private bool MediaSelectorApplies(CssSelectorGroup selectorGroup, CssMediumInfo medium) + { + foreach (var sel in selectorGroup.IndividualSelectors) + { + if (sel.Matches(medium.MediaType.ToString(), null, CssPseudoClass.None, null)) + return true; + } + + return false; + } } } Deleted: trunk/AgateLib/UserInterface/Css/CssDocument.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssDocument.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/CssDocument.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -1,61 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using AgateLib.UserInterface.Css.Binders; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public class CssDocument - { - List<CssMedia> mMedia = new List<CssMedia>(); - - public CssDocument() - { - var defaultMedium = new CssMedia { Selector = "all" }; - Media.Add(defaultMedium); - } - public static CssDocument Load(string filename) - { - CssDocument doc = new CssDocument(); - CssParser parser = new CssParser(); - - parser.Load(doc, filename); - - return doc; - } - public static CssDocument FromText(string text) - { - CssDocument doc = new CssDocument(); - CssParser parser = new CssParser(); - - parser.ParseCss(doc, text); - - return doc; - } - - - public List<CssMedia> Media { get { return mMedia; } } - - public CssMedia DefaultMedium { get { return mMedia.First(x => x.Selector.Text == "all"); } } - } -} Deleted: trunk/AgateLib/UserInterface/Css/CssMedia.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssMedia.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/CssMedia.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -1,38 +0,0 @@ -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is AgateLib. -// -// The Initial Developer of the Original Code is Erik Ylvisaker. -// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. -// All Rights Reserved. -// -// Contributor(s): Erik Ylvisaker -// -using AgateLib.UserInterface.Css.Selectors; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public class CssMedia : ICssCanSelect - { - public CssMedia() - { - RuleBlocks = new List<CssRuleBlock>(); - } - - public CssSelectorGroup Selector { get;set;} - public List<CssRuleBlock> RuleBlocks { get; private set; } - } -} Added: trunk/AgateLib/UserInterface/Css/CssMediaInfo.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssMediaInfo.cs (rev 0) +++ trunk/AgateLib/UserInterface/Css/CssMediaInfo.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -0,0 +1,39 @@ +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.UserInterface.Css +{ + public class CssMediumInfo + { + public MediaType MediaType { get; set; } + } + + public enum MediaType + { + Any = -1, + Unknown, + Screen, + Tablet, + Handheld, + } +} Modified: trunk/AgateLib/UserInterface/Css/CssStyleData.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssStyleData.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/CssStyleData.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -18,7 +18,7 @@ // using AgateLib.Geometry; using AgateLib.UserInterface.Css.Parser; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Selectors; using System; using System.Collections.Generic; @@ -29,7 +29,7 @@ namespace AgateLib.UserInterface.Css { - public class CssStyleData : ICssCanSelect + public class CssStyleData { public CssStyleData() { @@ -38,8 +38,6 @@ public void Clear() { - Selector = ""; - PositionData = new CssRectangle(); Font = new CssFont(); Background = new CssBackground(); @@ -52,8 +50,6 @@ Display = CssDisplay.Initial; } - public CssSelectorGroup Selector { get; set; } - [CssPromoteProperties] public CssRectangle PositionData { get; set; } @@ -82,13 +78,4 @@ [CssPromoteProperties(prefix: "transition")] public CssTransition Transition { get; set; } } - - public enum CssPosition - { - Initial, - Static = Initial, - Relative, - Absolute, - Fixed, - } } Modified: trunk/AgateLib/UserInterface/Css/Documents/CssBackground.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssBackground.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssBackground.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -24,7 +24,7 @@ using System.Linq; using System.Text; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssBackground : ICssPropertyFromText { Modified: trunk/AgateLib/UserInterface/Css/Documents/CssBackgroundPosition.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssBackgroundPosition.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssBackgroundPosition.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -21,7 +21,7 @@ using System.Linq; using System.Text; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssBackgroundPosition : ICssPropertyFromText { Modified: trunk/AgateLib/UserInterface/Css/Documents/CssBorder.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssBorder.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssBorder.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -25,7 +25,7 @@ using System.Text; using System.ComponentModel; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssBorder : ICssPropertyFromText, ICssBoxComponent { Modified: trunk/AgateLib/UserInterface/Css/Documents/CssBorderImage.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssBorderImage.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssBorderImage.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -23,7 +23,7 @@ using System.Text; using System.Threading.Tasks; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssBorderImage : ICssPropertyFromText { Modified: trunk/AgateLib/UserInterface/Css/Documents/CssBoxComponent.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssBoxComponent.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssBoxComponent.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -24,7 +24,7 @@ using System.Text; using System.Threading.Tasks; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssBoxComponent : ICssPropertyFromText, ICssBoxComponent { Modified: trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssDistance.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssDistance.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -23,7 +23,7 @@ using System.Text; using System.Threading.Tasks; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public struct CssDistance : IEquatable<CssDistance> { Copied: trunk/AgateLib/UserInterface/Css/Documents/CssDocument.cs (from rev 1467, trunk/AgateLib/UserInterface/Css/CssDocument.cs) =================================================================== --- trunk/AgateLib/UserInterface/Css/Documents/CssDocument.cs (rev 0) +++ trunk/AgateLib/UserInterface/Css/Documents/CssDocument.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -0,0 +1,61 @@ +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Binders; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.UserInterface.Css.Documents +{ + public class CssDocument + { + List<CssMediaSelector> mMedia = new List<CssMediaSelector>(); + + public CssDocument() + { + var defaultMedium = new CssMediaSelector { Selector = "all" }; + Media.Add(defaultMedium); + } + public static CssDocument Load(string filename) + { + CssDocument doc = new CssDocument(); + CssParser parser = new CssParser(); + + parser.Load(doc, filename); + + return doc; + } + public static CssDocument FromText(string text) + { + CssDocument doc = new CssDocument(); + CssParser parser = new CssParser(); + + parser.ParseCss(doc, text); + + return doc; + } + + + public List<CssMediaSelector> Media { get { return mMedia; } } + + public CssMediaSelector DefaultMedium { get { return mMedia.First(x => x.Selector.Text == "all"); } } + } +} Modified: trunk/AgateLib/UserInterface/Css/Documents/CssFont.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssFont.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssFont.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -25,7 +25,7 @@ using System.Linq; using System.Text; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssFont { Modified: trunk/AgateLib/UserInterface/Css/Documents/CssLayout.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssLayout.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssLayout.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -25,7 +25,7 @@ using System.Text; using System.Threading.Tasks; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssLayout : ICssPropertyFromText { Copied: trunk/AgateLib/UserInterface/Css/Documents/CssMediaSelector.cs (from rev 1467, trunk/AgateLib/UserInterface/Css/CssMedia.cs) =================================================================== --- trunk/AgateLib/UserInterface/Css/Documents/CssMediaSelector.cs (rev 0) +++ trunk/AgateLib/UserInterface/Css/Documents/CssMediaSelector.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -0,0 +1,38 @@ +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Selectors; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.UserInterface.Css +{ + public class CssMediaSelector : ICssCanSelect + { + public CssMediaSelector() + { + RuleBlocks = new List<CssRuleBlock>(); + } + + public CssSelectorGroup Selector { get;set;} + public List<CssRuleBlock> RuleBlocks { get; private set; } + } +} Modified: trunk/AgateLib/UserInterface/Css/Documents/CssRectangle.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssRectangle.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssRectangle.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -25,7 +25,7 @@ using System.Text; using System.Threading.Tasks; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssRectangle : ICssPropertyFromText { Modified: trunk/AgateLib/UserInterface/Css/Documents/CssTransition.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/CssTransition.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/CssTransition.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -22,7 +22,7 @@ using System.Linq; using System.Text; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public class CssTransition : ICssPropertyFromText { Modified: trunk/AgateLib/UserInterface/Css/Documents/ICssBoxComponent.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/ICssBoxComponent.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/ICssBoxComponent.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -18,7 +18,7 @@ // using System; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public interface ICssBoxComponent { Modified: trunk/AgateLib/UserInterface/Css/Documents/ICssPropertyFromText.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/ICssPropertyFromText.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/ICssPropertyFromText.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -22,7 +22,7 @@ using System.Text; using System.Threading.Tasks; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public interface ICssPropertyFromText { Modified: trunk/AgateLib/UserInterface/Css/Documents/PropertyEnums.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Properties/PropertyEnums.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Documents/PropertyEnums.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -22,7 +22,7 @@ using System.Text; using System.Threading.Tasks; -namespace AgateLib.UserInterface.Css.Properties +namespace AgateLib.UserInterface.Css.Documents { public enum CssDisplay { @@ -94,4 +94,13 @@ Padding_Box, Content_Box, } + + public enum CssPosition + { + Initial, + Static = Initial, + Relative, + Absolute, + Fixed, + } } Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -18,7 +18,7 @@ // using AgateLib.DisplayLib; using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Widgets; using System; using System.Collections.Generic; Modified: trunk/AgateLib/UserInterface/Css/Layout/Defaults/MenuDefaultStyle.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/Defaults/MenuDefaultStyle.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Layout/Defaults/MenuDefaultStyle.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -16,7 +16,7 @@ // // Contributor(s): Erik Ylvisaker // -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/UserInterface/Css/Parser/CssParser.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Parser/CssParser.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Parser/CssParser.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -19,6 +19,7 @@ using AgateLib.Diagnostics; using AgateLib.Geometry; using AgateLib.UserInterface.Css.Binders; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Parser.Lexer; using AgateLib.UserInterface.Css.Selectors; using System; @@ -40,9 +41,9 @@ List<Token<CssTokenType>> tokenList; int index; - CssMedia defaultMedium; + CssMediaSelector defaultMedium; - CssMedia currentMedium; + CssMediaSelector currentMedium; CssRuleBlock currentBlock; Token<CssTokenType> currentToken; @@ -177,7 +178,7 @@ if (currentMedium == null) { - currentMedium = new CssMedia { Selector = selector }; + currentMedium = new CssMediaSelector { Selector = selector }; target.Media.Add(currentMedium); } Modified: trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -18,7 +18,7 @@ // using AgateLib.DisplayLib; using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Widgets; using System; using System.Collections.Generic; Modified: trunk/AgateLib/UserInterface/Css/Rendering/Transitions/SlideTransition.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Rendering/Transitions/SlideTransition.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Rendering/Transitions/SlideTransition.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -17,7 +17,7 @@ // Contributor(s): Erik Ylvisaker // using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Widgets; using System; using System.Collections.Generic; Modified: trunk/AgateLib/UserInterface/Css/Rendering/Transitions/TransitionFactory.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Rendering/Transitions/TransitionFactory.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Rendering/Transitions/TransitionFactory.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -16,7 +16,7 @@ // // Contributor(s): Erik Ylvisaker // -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -17,7 +17,7 @@ // Contributor(s): Erik Ylvisaker // using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Properties; +using AgateLib.UserInterface.Css.Documents; using AgateLib.UserInterface.Css.Rendering.Transitions; using System; using System.Collections.Generic; Modified: trunk/AgateLib/UserInterface/Css/Selectors/CssSelector.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Selectors/CssSelector.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Selectors/CssSelector.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -110,12 +110,10 @@ public IList<string> CssClasses { get { return classes; } } public CssPseudoClass PseudoClass { get; private set; } - public bool Matches(Widgets.Widget control, string id, CssPseudoClass pc, IEnumerable<string> classes) + public bool Matches(string typename, string id, CssPseudoClass pc, IEnumerable<string> classes) { - var type = control.GetType().Name; - if (ObjectType != null && - ObjectType.Equals(type, StringComparison.OrdinalIgnoreCase) + ObjectType.Equals(typename, StringComparison.OrdinalIgnoreCase) == false) { return false; Modified: trunk/AgateLib/UserInterface/Css/Selectors/CssSelectorChain.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Selectors/CssSelectorChain.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Selectors/CssSelectorChain.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -42,7 +42,7 @@ public IEnumerable<ICssSelector> Selectors { get { return mSelectors; } } - public bool Matches(Widget control, string id, CssPseudoClass pc, IEnumerable<string> classes) + public bool Matches(string typename, string id, CssPseudoClass pc, IEnumerable<string> classes) { //for (int i = mSelectors.Count - 1; i >= 0; i--) //{ Modified: trunk/AgateLib/UserInterface/Css/Selectors/ICssSelector.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Selectors/ICssSelector.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Css/Selectors/ICssSelector.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -27,6 +27,14 @@ { public interface ICssSelector { - bool Matches(Widget control, string id, CssPseudoClass pseudoClass, IEnumerable<string> classes); + bool Matches(string type, string id, CssPseudoClass pseudoClass, IEnumerable<string> classes); } + + public static class SelectorExtensions + { + public static bool Matches(this ICssSelector selector, Widget widget, string id, CssPseudoClass pseudoClass, IEnumerable<string> classes) + { + return selector.Matches(widget.GetType().Name, id, pseudoClass, classes); + } + } } Modified: trunk/AgateLib/UserInterface/Widgets/Gui.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Gui.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib/UserInterface/Widgets/Gui.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -370,7 +370,7 @@ // } //} - internal AgateLib.UserInterface.Css.CssDocument CssDocument { get; set; } + internal AgateLib.UserInterface.Css.Documents.CssDocument CssDocument { get; set; } } Modified: trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FormsPlatformInfo.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FormsPlatformInfo.cs 2014-08-19 06:16:00 UTC (rev 1467) +++ trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FormsPlatformInfo.cs 2014-08-19 20:16:14 UTC (rev 1468) @@ -46,8 +46,9 @@ internal FormsPlatformInfo() { - mType = DetectPlatformType(); - mRuntime = DetectRuntime(); + PlatformType = DetectPlatformType(); + DeviceType = DeviceType.Computer; + Runtime = DetectRuntime(); m64Bit = Detect64Bit(); // According to http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k%28SYSTEM.DIAGNOSTICS.DEBUG.LISTENERS%29;k%28TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV3.5%22%29;k%28DevLang-CSHARP%29&rd=true @@ -230,21 +231,6 @@ } } - /// <summary> - /// Gets the platform type. - /// </summary> - public override PlatformType PlatformType - { - get { return mType; } - } - /// <summary> - /// Gets the runtime being used. - /// </summary> - public override DotNetRuntime Runtime - { - get { return mRuntime; } - } - PlatformType DetectPlatformType() { switch (Environment.OSVersion.Platform) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-19 06:16:17
|
Revision: 1467 http://sourceforge.net/p/agate/code/1467 Author: kanato Date: 2014-08-19 06:16:00 +0000 (Tue, 19 Aug 2014) Log Message: ----------- Organize css properties and add copyright information to several files. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/Sprites/CollisionRegion.cs trunk/AgateLib/Sprites/ISpriteContainer.cs trunk/AgateLib/Sprites/SpriteContainer.cs trunk/AgateLib/UnitTesting/AssertThrows.cs trunk/AgateLib/UserInterface/Css/Binders/Binding.cs trunk/AgateLib/UserInterface/Css/Binders/CssAlias.cs trunk/AgateLib/UserInterface/Css/Binders/CssBindingMapper.cs trunk/AgateLib/UserInterface/Css/Binders/CssPropertyMap.cs trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs trunk/AgateLib/UserInterface/Css/Binders/PropertyChain.cs trunk/AgateLib/UserInterface/Css/Binders/ReflectionPropertyBinder.cs trunk/AgateLib/UserInterface/Css/Cache/StyleCache.cs trunk/AgateLib/UserInterface/Css/CssAdapter.cs trunk/AgateLib/UserInterface/Css/CssDocument.cs trunk/AgateLib/UserInterface/Css/CssMedia.cs trunk/AgateLib/UserInterface/Css/CssPseudoClass.cs trunk/AgateLib/UserInterface/Css/CssRuleBlock.cs trunk/AgateLib/UserInterface/Css/CssStyle.cs trunk/AgateLib/UserInterface/Css/CssStyleData.cs trunk/AgateLib/UserInterface/Css/Extensions.cs trunk/AgateLib/UserInterface/Css/ICssCanSelect.cs trunk/AgateLib/UserInterface/Css/Layout/CssBox.cs trunk/AgateLib/UserInterface/Css/Layout/CssBoxModel.cs trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs trunk/AgateLib/UserInterface/Css/Layout/Defaults/BlankDefaultStyle.cs trunk/AgateLib/UserInterface/Css/Layout/Defaults/DefaultStyleCollection.cs trunk/AgateLib/UserInterface/Css/Layout/Defaults/IDefaultStyleSetter.cs trunk/AgateLib/UserInterface/Css/Layout/Defaults/MenuDefaultStyle.cs trunk/AgateLib/UserInterface/Css/Layout/Defaults/WindowDefaultStyle.cs trunk/AgateLib/UserInterface/Css/Parser/CssParser.cs trunk/AgateLib/UserInterface/Css/Parser/CssPromoteProperties.cs trunk/AgateLib/UserInterface/Css/Parser/Lexer/EnumParser.cs trunk/AgateLib/UserInterface/Css/Parser/Lexer/ITokenTypeConverter.cs trunk/AgateLib/UserInterface/Css/Parser/Lexer/Token.cs trunk/AgateLib/UserInterface/Css/Parser/Lexer/Tokenizer.cs trunk/AgateLib/UserInterface/Css/ReflectionExtensions.cs trunk/AgateLib/UserInterface/Css/Rendering/CssDefaultImageProvider.cs trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs trunk/AgateLib/UserInterface/Css/Rendering/ICssImageProvider.cs trunk/AgateLib/UserInterface/Css/Rendering/Transitions/IWidgetTransition.cs trunk/AgateLib/UserInterface/Css/Rendering/Transitions/NullTransition.cs trunk/AgateLib/UserInterface/Css/Rendering/Transitions/SlideTransition.cs trunk/AgateLib/UserInterface/Css/Rendering/Transitions/TransitionFactory.cs trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs trunk/AgateLib/UserInterface/Css/Selectors/CssSelector.cs trunk/AgateLib/UserInterface/Css/Selectors/CssSelectorChain.cs trunk/AgateLib/UserInterface/Css/Selectors/CssSelectorGroup.cs trunk/AgateLib/UserInterface/Css/Selectors/ICssSelector.cs trunk/AgateLib/UserInterface/IAudioPlayer.cs trunk/AgateLib/UserInterface/ISurfaceProvider.cs trunk/AgateLib/UserInterface/Margin.cs trunk/AgateLib/UserInterface/Widgets/Container.cs trunk/AgateLib/UserInterface/Widgets/Desktop.cs trunk/AgateLib/UserInterface/Widgets/Gui.cs trunk/AgateLib/UserInterface/Widgets/GuiInput.cs trunk/AgateLib/UserInterface/Widgets/GuiSound.cs trunk/AgateLib/UserInterface/Widgets/IGuiLayoutEngine.cs trunk/AgateLib/UserInterface/Widgets/IGuiRenderer.cs trunk/AgateLib/UserInterface/Widgets/ImageDisplay.cs trunk/AgateLib/UserInterface/Widgets/InputMap.cs trunk/AgateLib/UserInterface/Widgets/KeyboardEventArgs.cs trunk/AgateLib/UserInterface/Widgets/Label.cs trunk/AgateLib/UserInterface/Widgets/Menu.cs trunk/AgateLib/UserInterface/Widgets/MenuItem.cs trunk/AgateLib/UserInterface/Widgets/MouseEventArgs.cs trunk/AgateLib/UserInterface/Widgets/Panel.cs trunk/AgateLib/UserInterface/Widgets/ProgressBar.cs trunk/AgateLib/UserInterface/Widgets/Widget.cs trunk/AgateLib/UserInterface/Widgets/WidgetEventArgs.cs trunk/AgateLib/UserInterface/Widgets/WidgetList.cs trunk/AgateLib/UserInterface/Widgets/Window.cs trunk/AgateLib/UserInterface/WindowTransition.cs trunk/Tests/UserInterfaceTests/GuiStuff.cs trunk/UnitTests/UserInterface/Css/AdapterTest.cs trunk/UnitTests/UserInterface/Css/BindingTest.cs trunk/UnitTests/UserInterface/Css/CssTestBase.cs trunk/UnitTests/UserInterface/Css/ParseTest.cs Added Paths: ----------- trunk/AgateLib/UserInterface/Css/Properties/ trunk/AgateLib/UserInterface/Css/Properties/CssBackground.cs trunk/AgateLib/UserInterface/Css/Properties/CssBackgroundPosition.cs trunk/AgateLib/UserInterface/Css/Properties/CssBorder.cs trunk/AgateLib/UserInterface/Css/Properties/CssBorderImage.cs trunk/AgateLib/UserInterface/Css/Properties/CssBoxComponent.cs trunk/AgateLib/UserInterface/Css/Properties/CssDistance.cs trunk/AgateLib/UserInterface/Css/Properties/CssFont.cs trunk/AgateLib/UserInterface/Css/Properties/CssLayout.cs trunk/AgateLib/UserInterface/Css/Properties/CssRectangle.cs trunk/AgateLib/UserInterface/Css/Properties/CssTransition.cs trunk/AgateLib/UserInterface/Css/Properties/ICssBoxComponent.cs trunk/AgateLib/UserInterface/Css/Properties/ICssPropertyFromText.cs trunk/AgateLib/UserInterface/Css/Properties/PropertyEnums.cs Removed Paths: ------------- trunk/AgateLib/UserInterface/Css/CssBackground.cs trunk/AgateLib/UserInterface/Css/CssBorder.cs trunk/AgateLib/UserInterface/Css/CssBorderImage.cs trunk/AgateLib/UserInterface/Css/CssBoxComponent.cs trunk/AgateLib/UserInterface/Css/CssDisplay.cs trunk/AgateLib/UserInterface/Css/CssDistance.cs trunk/AgateLib/UserInterface/Css/CssFont.cs trunk/AgateLib/UserInterface/Css/CssLayout.cs trunk/AgateLib/UserInterface/Css/CssRectangle.cs trunk/AgateLib/UserInterface/Css/CssTransition.cs trunk/AgateLib/UserInterface/Css/ICssBoxComponent.cs trunk/AgateLib/UserInterface/Css/ICssPropertyFromText.cs trunk/AgateLib/UserInterface/Widgets/Linq/ Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/AgateLib.csproj 2014-08-19 06:16:00 UTC (rev 1467) @@ -526,26 +526,27 @@ <Compile Include="UserInterface\Css\Binders\ReflectionPropertyBinder.cs" /> <Compile Include="UserInterface\Css\Cache\StyleCache.cs" /> <Compile Include="UserInterface\Css\CssAdapter.cs" /> - <Compile Include="UserInterface\Css\CssBackground.cs" /> - <Compile Include="UserInterface\Css\CssBorder.cs" /> - <Compile Include="UserInterface\Css\CssBorderImage.cs" /> - <Compile Include="UserInterface\Css\CssBoxComponent.cs" /> - <Compile Include="UserInterface\Css\CssDisplay.cs" /> - <Compile Include="UserInterface\Css\CssDistance.cs" /> + <Compile Include="UserInterface\Css\Properties\CssBackground.cs" /> + <Compile Include="UserInterface\Css\Properties\CssBackgroundPosition.cs" /> + <Compile Include="UserInterface\Css\Properties\CssBorder.cs" /> + <Compile Include="UserInterface\Css\Properties\CssBorderImage.cs" /> + <Compile Include="UserInterface\Css\Properties\CssBoxComponent.cs" /> + <Compile Include="UserInterface\Css\Properties\PropertyEnums.cs" /> + <Compile Include="UserInterface\Css\Properties\CssDistance.cs" /> <Compile Include="UserInterface\Css\CssDocument.cs" /> - <Compile Include="UserInterface\Css\CssFont.cs" /> - <Compile Include="UserInterface\Css\CssLayout.cs" /> + <Compile Include="UserInterface\Css\Properties\CssFont.cs" /> + <Compile Include="UserInterface\Css\Properties\CssLayout.cs" /> <Compile Include="UserInterface\Css\CssMedia.cs" /> <Compile Include="UserInterface\Css\CssPseudoClass.cs" /> - <Compile Include="UserInterface\Css\CssRectangle.cs" /> + <Compile Include="UserInterface\Css\Properties\CssRectangle.cs" /> <Compile Include="UserInterface\Css\CssRuleBlock.cs" /> <Compile Include="UserInterface\Css\CssStyle.cs" /> <Compile Include="UserInterface\Css\CssStyleData.cs" /> - <Compile Include="UserInterface\Css\CssTransition.cs" /> + <Compile Include="UserInterface\Css\Properties\CssTransition.cs" /> <Compile Include="UserInterface\Css\Extensions.cs" /> - <Compile Include="UserInterface\Css\ICssBoxComponent.cs" /> + <Compile Include="UserInterface\Css\Properties\ICssBoxComponent.cs" /> <Compile Include="UserInterface\Css\ICssCanSelect.cs" /> - <Compile Include="UserInterface\Css\ICssPropertyFromText.cs" /> + <Compile Include="UserInterface\Css\Properties\ICssPropertyFromText.cs" /> <Compile Include="UserInterface\Css\Layout\CssBox.cs" /> <Compile Include="UserInterface\Css\Layout\CssBoxModel.cs" /> <Compile Include="UserInterface\Css\Layout\CssLayoutEngine.cs" /> @@ -587,7 +588,6 @@ <Compile Include="UserInterface\Widgets\InputMap.cs" /> <Compile Include="UserInterface\Widgets\KeyboardEventArgs.cs" /> <Compile Include="UserInterface\Widgets\Label.cs" /> - <Compile Include="UserInterface\Widgets\Linq\WidgetExtensions.cs" /> <Compile Include="UserInterface\Widgets\Menu.cs" /> <Compile Include="UserInterface\Widgets\MenuItem.cs" /> <Compile Include="UserInterface\Widgets\MouseEventArgs.cs" /> Modified: trunk/AgateLib/Sprites/CollisionRegion.cs =================================================================== --- trunk/AgateLib/Sprites/CollisionRegion.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/Sprites/CollisionRegion.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/Sprites/ISpriteContainer.cs =================================================================== --- trunk/AgateLib/Sprites/ISpriteContainer.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/Sprites/ISpriteContainer.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.Geometry; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; using System; using System.Collections.Generic; Modified: trunk/AgateLib/Sprites/SpriteContainer.cs =================================================================== --- trunk/AgateLib/Sprites/SpriteContainer.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/Sprites/SpriteContainer.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/UnitTesting/AssertThrows.cs =================================================================== --- trunk/AgateLib/UnitTesting/AssertThrows.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UnitTesting/AssertThrows.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/UserInterface/Css/Binders/Binding.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/Binding.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Binders/Binding.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,23 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Properties; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; Modified: trunk/AgateLib/UserInterface/Css/Binders/CssAlias.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/CssAlias.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Binders/CssAlias.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/UserInterface/Css/Binders/CssBindingMapper.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/CssBindingMapper.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Binders/CssBindingMapper.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; Modified: trunk/AgateLib/UserInterface/Css/Binders/CssPropertyMap.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/CssPropertyMap.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Binders/CssPropertyMap.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Binders/CssTypeConverter.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,23 @@ -using AgateLib.Geometry; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; +using AgateLib.UserInterface.Css.Properties; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/UserInterface/Css/Binders/PropertyChain.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/PropertyChain.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Binders/PropertyChain.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; Modified: trunk/AgateLib/UserInterface/Css/Binders/ReflectionPropertyBinder.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Binders/ReflectionPropertyBinder.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Binders/ReflectionPropertyBinder.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.Geometry; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; using AgateLib.UserInterface.Css.Parser; using System; using System.Collections.Generic; Modified: trunk/AgateLib/UserInterface/Css/Cache/StyleCache.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Cache/StyleCache.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Cache/StyleCache.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/UserInterface/Css/CssAdapter.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssAdapter.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssAdapter.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,6 +1,25 @@ -using AgateLib.DisplayLib; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.DisplayLib; using AgateLib.UserInterface.Css.Layout; using AgateLib.UserInterface.Css.Layout.Defaults; +using AgateLib.UserInterface.Css.Properties; using AgateLib.UserInterface.Css.Selectors; using AgateLib.UserInterface.Widgets; using System; Deleted: trunk/AgateLib/UserInterface/Css/CssBackground.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssBackground.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssBackground.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,86 +0,0 @@ -using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Parser; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; - -namespace AgateLib.UserInterface.Css -{ - public class CssBackground : ICssPropertyFromText - { - public CssBackground() - { - Initialize(); - } - - private void Initialize() - { - Color = Color.FromArgb(0, 0, 0, 0); - Image = null; - Repeat = 0; - Position = new CssBackgroundPosition(); - Clip = 0; - } - - public Color Color { get; set; } - public string Image { get; set; } - public CssBackgroundRepeat Repeat { get; set; } - public CssBackgroundClip Clip { get; set; } - public CssBackgroundPosition Position { get; set; } - - public void SetValueFromText(string value) - { - if (value == "none") - { - Initialize(); - } - else - throw new NotImplementedException(); - } - } - - public class CssBackgroundPosition : ICssPropertyFromText - { - public CssBackgroundPosition() - { - Left = new CssDistance(); - Top = new CssDistance(); - } - - public CssDistance Left; - public CssDistance Top; - - public void SetValueFromText(string value) - { - int index = value.IndexOf(' '); - - if (index >= 0) - { - Left = CssDistance.FromString(value.Substring(0, index)); - Top = CssDistance.FromString(value.Substring(index+1)); - } - else - { - Left = CssDistance.FromString(value); - Top = Left; - } - } - } - public enum CssBackgroundRepeat - { - Repeat, - Repeat_X, - Repeat_Y, - Space, - Round, - No_Repeat, - } - public enum CssBackgroundClip - { - Border_Box, - Padding_Box, - Content_Box, - } -} Deleted: trunk/AgateLib/UserInterface/Css/CssBorder.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssBorder.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssBorder.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,134 +0,0 @@ -using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Parser; -using AgateLib.UserInterface.Css.Binders; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel; - -namespace AgateLib.UserInterface.Css -{ - public class CssBorder : ICssPropertyFromText, ICssBoxComponent - { - public CssBorder() - { - Top = new CssBorderData(); - Left = new CssBorderData(); - Right = new CssBorderData(); - Bottom = new CssBorderData(); - - Image = new CssBorderImage(); - } - - public CssBorderData Top { get; set; } - public CssBorderData Right { get; set; } - public CssBorderData Bottom { get; set; } - public CssBorderData Left { get; set; } - - [CssPromoteProperties(prefix: "image")] - public CssBorderImage Image { get; set; } - - IEnumerable<CssBorderData> AllBorders - { - get - { - yield return Top; - yield return Right; - yield return Bottom; - yield return Left; - } - } - - public void SetValueFromText(string value) - { - foreach (var b in AllBorders) - { - b.SetValueFromText(value); - } - } - - CssDistance ICssBoxComponent.Bottom - { - get { return Bottom.Width; } - set { Bottom.Width = value; } - } - - CssDistance ICssBoxComponent.Left - { - get { return Left.Width; } - set { Left.Width = value; } - } - - CssDistance ICssBoxComponent.Right - { - get { return Right.Width; } - set { Right.Width = value; } - } - - CssDistance ICssBoxComponent.Top - { - get { return Top.Width; } - set { Top.Width = value; } - } - } - - public class CssBorderData : ICssPropertyFromText - { - public CssBorderData() - { - Initialize(); - } - - private void Initialize() - { - Style = CssBorderStyle.None; - Width = new CssDistance(); - Color = Color.FromArgb(0, 0, 0, 0); - } - - public CssBorderStyle Style { get; set; } - - public CssDistance Width { get; set; } - - public Color Color { get; set; } - - public void SetValueFromText(string value) - { - if (value == "none") - { - Initialize(); - return; - } - - string[] values = value.Split(Extensions.WhiteSpace); - - foreach (var v in values) - { - Color clr; - CssBorderStyle stl; - - if (v[0] >= '0' && v[0] <= '9') - { - Width = CssDistance.FromString(v); - } - if (Enum.TryParse(v, out stl)) - { - Style = stl; - } - if (CssTypeConverter.TryParseColor(v, out clr)) - { - Color = clr; - } - } - } - - } - - public enum CssBorderStyle - { - None, - Single, - Double, - } -} Deleted: trunk/AgateLib/UserInterface/Css/CssBorderImage.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssBorderImage.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssBorderImage.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public class CssBorderImage : ICssPropertyFromText - { - public CssBorderImage() - { - Initialize(); - } - - private void Initialize() - { - Source = string.Empty; - Slice = new CssBorderImageComponent(); - Width = new CssBorderImageComponent(); - Outset = new CssBorderImageComponent(); - Repeat = CssBorderImageRepeat.Initial; - } - - public string Source { get; set; } - public CssBorderImageComponent Slice { get; set; } - public CssBorderImageComponent Width { get; set; } - public CssBorderImageComponent Outset { get; set; } - public CssBorderImageRepeat Repeat { get; set; } - - public void SetValueFromText(string value) - { - if (value == "none") - { - Initialize(); - } - else - { - throw new NotImplementedException(); - } - } - } - - public class CssBorderImageComponent : CssBoxComponent - { - - } - - public enum CssBorderImageRepeat - { - Initial, - Inherit, - Stretch, - Repeat, - Round, - } -} Deleted: trunk/AgateLib/UserInterface/Css/CssBoxComponent.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssBoxComponent.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssBoxComponent.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,39 +0,0 @@ -using AgateLib.UserInterface.Css.Parser; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public class CssBoxComponent : ICssPropertyFromText, AgateLib.UserInterface.Css.ICssBoxComponent - { - public CssDistance Top { get; set; } - public CssDistance Bottom { get; set; } - public CssDistance Left { get; set; } - public CssDistance Right { get; set; } - - public CssBoxComponent() - { - Top = new CssDistance(false); - Bottom = new CssDistance(false); - Right = new CssDistance(false); - Left = new CssDistance(false); - } - - static char[] sep = new char[] { '\t', '\n', '\r', ' ' }; - static int[,] indices = new int[4, 4] { { 0, 0, 0, 0 }, {0, 1, 0, 1}, {0, 1, 2, 1}, {0, 1, 2, 3} }; - - public void SetValueFromText(string value) - { - string[] values = value.Split(sep, StringSplitOptions.RemoveEmptyEntries); - - Top = CssDistance.FromString(values[indices[values.Length-1, 0]]); - Right = CssDistance.FromString(values[indices[values.Length-1, 1]]); - Bottom = CssDistance.FromString(values[indices[values.Length-1, 2]]); - Left = CssDistance.FromString(values[indices[values.Length-1, 3]]); - } - } -} Deleted: trunk/AgateLib/UserInterface/Css/CssDisplay.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssDisplay.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssDisplay.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public enum CssDisplay - { - Initial, - None, - } -} Deleted: trunk/AgateLib/UserInterface/Css/CssDistance.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssDistance.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssDistance.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public struct CssDistance : IEquatable<CssDistance> - { - public double Amount { get; set; } - public DistanceUnit DistanceUnit { get; set; } - public bool Automatic { get; set; } - - static Dictionary<string, DistanceUnit> UnitMap = new Dictionary<string, DistanceUnit>(); - - static CssDistance() - { - UnitMap.Add("px", DistanceUnit.Pixels); - UnitMap.Add("%", DistanceUnit.Percent); - UnitMap.Add("em", DistanceUnit.FontHeight); - UnitMap.Add("ex", DistanceUnit.FontAverageWidth); - UnitMap.Add("ch", DistanceUnit.FontNumericWidth); - UnitMap.Add("vw", DistanceUnit.ViewportWidthFrac); - UnitMap.Add("vh", DistanceUnit.ViewportHeightFrac); - UnitMap.Add("vmin", DistanceUnit.ViewportMinFrac); - UnitMap.Add("vmax", DistanceUnit.ViewportMaxFrac); - } - public static CssDistance FromString(string value) - { - int numberLength = 0; - int start = 0; - - if (value.Equals("auto", StringComparison.OrdinalIgnoreCase)) - { - return new CssDistance(true); - } - - if ("+-".Contains(value[0].ToString())) - start++; - - for (int i = start; i < value.Length; i++, numberLength++) - { - if ("0123456789.".Contains(value[i].ToString()) == false) - break; - } - - CssDistance retval = new CssDistance(false); - - retval.Amount = double.Parse(value.Substring(0, numberLength)); - - if (value.Length > numberLength) - { - string unit = value.Substring(numberLength); - if (UnitMap.ContainsKey(unit)) - retval.DistanceUnit = UnitMap[unit]; - } - - return retval; - } - - public override string ToString() - { - if (Automatic) - return "auto"; - - if (Amount == 0) - return "0"; - - return string.Format("{0}{1}", Amount, UnitMap.FindKeyByValue(DistanceUnit)); - } - - /// <summary> - /// Creates a new CssDistance object - /// </summary> - public CssDistance(bool automatic = false) : this() - { - Automatic = automatic; - } - - #region --- Comparison operators --- - - public bool Equals(CssDistance other) - { - if (other == null) - return false; - - if (Automatic && other.Automatic) - return true; - - if (Amount != other.Amount) - return false; - if (DistanceUnit != other.DistanceUnit) - return false; - - return true; - } - - public override bool Equals(object obj) - { - if (obj == null) return false; - if (obj is CssDistance == false) return false; - - return Equals((CssDistance)obj); - } - public static bool operator == (CssDistance a, CssDistance b) - { - bool anull = object.ReferenceEquals(a, null); - bool bnull = object.ReferenceEquals(b, null); - - if (object.ReferenceEquals(a, b)) return true; - if (anull || bnull) return false; - - return a.Equals(b); - } - public static bool operator != (CssDistance a, CssDistance b) - { - return !a.Equals(b); - } - - public override int GetHashCode() - { - return Amount.GetHashCode() ^ DistanceUnit.GetHashCode() ^ Automatic.GetHashCode(); - } - - #endregion - } - - public enum DistanceUnit - { - Pixels, - Percent, - FontHeight, - FontAverageWidth, - FontNumericWidth, - ViewportWidthFrac, - ViewportHeightFrac, - ViewportMinFrac, - ViewportMaxFrac, - } -} Modified: trunk/AgateLib/UserInterface/Css/CssDocument.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssDocument.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssDocument.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.UserInterface.Css.Binders; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Binders; using System; using System.Collections.Generic; using System.Linq; Deleted: trunk/AgateLib/UserInterface/Css/CssFont.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssFont.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssFont.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,28 +0,0 @@ -using AgateLib.Geometry; -using AgateLib.UserInterface.Css.Binders; -using AgateLib.UserInterface.Css.Parser; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; - -namespace AgateLib.UserInterface.Css -{ - public class CssFont - { - public CssFont() - { - Color = Color.Black; - } - - [CssAlias("font-family")] - public string Family { get; set; } - - [CssAlias("font-size")] - public CssDistance Size { get; set; } - - public Color Color { get; set; } - - } -} Deleted: trunk/AgateLib/UserInterface/Css/CssLayout.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssLayout.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssLayout.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,48 +0,0 @@ -using AgateLib.UserInterface.Css.Binders; -using AgateLib.UserInterface.Css.Parser; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public class CssLayout : ICssPropertyFromText - { - [CssAlias("layout-kind")] - public CssLayoutKind Kind { get; set; } - - [CssAlias("layout-grid-columns")] - public int GridColumns { get; set; } - - public void SetValueFromText(string value) - { - string[] values = value.Split(' '); - - foreach(var v in values) - { - CssLayoutKind result; - int columns; - - if (Enum.TryParse<CssLayoutKind>(v, true, out result)) - { - Kind = result; - } - else if (int.TryParse(v, out columns)) - { - GridColumns = columns; - } - } - } - } - - public enum CssLayoutKind - { - Flow, - Column, - Row, - Grid, - } -} Modified: trunk/AgateLib/UserInterface/Css/CssMedia.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssMedia.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssMedia.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.UserInterface.Css.Selectors; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Selectors; using System; using System.Collections.Generic; using System.Linq; Modified: trunk/AgateLib/UserInterface/Css/CssPseudoClass.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssPseudoClass.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssPseudoClass.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Deleted: trunk/AgateLib/UserInterface/Css/CssRectangle.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssRectangle.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssRectangle.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,54 +0,0 @@ -using AgateLib.UserInterface.Css.Binders; -using AgateLib.UserInterface.Css.Parser; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public class CssRectangle : ICssPropertyFromText - { - public CssDistance Top { get; set; } - public CssDistance Left { get; set; } - public CssDistance Right { get; set; } - public CssDistance Bottom { get; set; } - - public CssDistance Width { get; set; } - public CssDistance Height { get; set; } - - [CssAlias("min-width")] - public CssDistance MinWidth { get; set; } - [CssAlias("min-height")] - public CssDistance MinHeight { get; set; } - - [CssAlias("max-width")] - public CssDistance MaxWidth { get; set; } - [CssAlias("max-height")] - public CssDistance MaxHeight { get; set; } - - public CssRectangle() - { - Top = new CssDistance(true); - Left = new CssDistance(true); - Right = new CssDistance(true); - Bottom = new CssDistance(true); - - Width = new CssDistance(true); - Height = new CssDistance(true); - - MinWidth = new CssDistance(true); - MinHeight = new CssDistance(true); - - MaxWidth = new CssDistance(true); - MaxHeight = new CssDistance(true); - } - - public void SetValueFromText(string value) - { - - } - } -} Modified: trunk/AgateLib/UserInterface/Css/CssRuleBlock.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssRuleBlock.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssRuleBlock.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.UserInterface.Css.Binders; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Binders; using AgateLib.UserInterface.Css.Selectors; using System; using System.Collections.Generic; Modified: trunk/AgateLib/UserInterface/Css/CssStyle.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssStyle.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssStyle.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.UserInterface.Css.Cache; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Cache; using AgateLib.UserInterface.Css.Layout; using AgateLib.UserInterface.Css.Rendering; using AgateLib.UserInterface.Widgets; Modified: trunk/AgateLib/UserInterface/Css/CssStyleData.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssStyleData.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssStyleData.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,5 +1,24 @@ -using AgateLib.Geometry; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.Geometry; using AgateLib.UserInterface.Css.Parser; +using AgateLib.UserInterface.Css.Properties; using AgateLib.UserInterface.Css.Selectors; using System; using System.Collections.Generic; Deleted: trunk/AgateLib/UserInterface/Css/CssTransition.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssTransition.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/CssTransition.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; - -namespace AgateLib.UserInterface.Css -{ - public class CssTransition : ICssPropertyFromText - { - public CssTransition() - { - Clear(); - } - - public void SetValueFromText(string value) - { - var values = value.Split(' '); - - foreach(var v in values) - { - CssTransitionType type; - CssTransitionDirection dir; - double time; - - if (double.TryParse(v, out time)) - Time = time; - else if (Enum.TryParse(v, true, out type)) - Type = type; - else if (Enum.TryParse(v, true, out dir)) - Direction = dir; - } - } - - public void Clear() - { - Type = CssTransitionType.None; - Time = 0.5; - } - - public CssTransitionType Type { get; set; } - public CssTransitionDirection Direction { get; set; } - public double Time { get; set; } - } - - public enum CssTransitionType - { - None, - Slide, - } - public enum CssTransitionDirection - { - Left, - Right, - Top, - Bottom, - } -} Modified: trunk/AgateLib/UserInterface/Css/Extensions.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Extensions.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Extensions.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.UserInterface.Css.Selectors; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Selectors; using System; using System.Collections.Generic; using System.Linq; Deleted: trunk/AgateLib/UserInterface/Css/ICssBoxComponent.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/ICssBoxComponent.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/ICssBoxComponent.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,11 +0,0 @@ -using System; -namespace AgateLib.UserInterface.Css -{ - public interface ICssBoxComponent - { - CssDistance Bottom { get; set; } - CssDistance Left { get; set; } - CssDistance Right { get; set; } - CssDistance Top { get; set; } - } -} Modified: trunk/AgateLib/UserInterface/Css/ICssCanSelect.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/ICssCanSelect.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/ICssCanSelect.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.UserInterface.Css.Selectors; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.UserInterface.Css.Selectors; using System; using System.Collections.Generic; using System.Linq; Deleted: trunk/AgateLib/UserInterface/Css/ICssPropertyFromText.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/ICssPropertyFromText.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/ICssPropertyFromText.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AgateLib.UserInterface.Css -{ - public interface ICssPropertyFromText - { - void SetValueFromText(string value); - } -} Modified: trunk/AgateLib/UserInterface/Css/Layout/CssBox.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/CssBox.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Layout/CssBox.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; Modified: trunk/AgateLib/UserInterface/Css/Layout/CssBoxModel.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/CssBoxModel.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Layout/CssBoxModel.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,5 +1,24 @@ -using AgateLib.DisplayLib; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using AgateLib.DisplayLib; using AgateLib.Geometry; +using AgateLib.UserInterface.Css.Properties; using AgateLib.UserInterface.Widgets; using System; using System.Collections.Generic; Modified: trunk/AgateLib/UserInterface/Css/Layout/Defaults/BlankDefaultStyle.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/Defaults/BlankDefaultStyle.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Layout/Defaults/BlankDefaultStyle.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using System; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is AgateLib. +// +// The Initial Developer of the Original Code is Erik Ylvisaker. +// Portions created by Erik Ylvisaker are Copyright (C) 2006-2014. +// All Rights Reserved. +// +// Contributor(s): Erik Ylvisaker +// +using System; using System.Collections.Generic; using System.Linq; using System.Text; Modified: trunk/AgateLib/UserInterface/Css/Layout/Defaults/DefaultStyleCollection.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/Defaults/DefaultStyleCollection.cs 2014-08-17 22:08:19 UTC (rev 1466) +++ trunk/AgateLib/UserInterface/Css/Layout/Defaults/DefaultStyleCollection.cs 2014-08-19 06:16:00 UTC (rev 1467) @@ -1,4 +1,22 @@ -using AgateLib.UserInterface.Widgets; +// The contents of this file are subject to the Mozilla Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Soft... [truncated message content] |
From: <ka...@us...> - 2014-08-17 22:08:29
|
Revision: 1466 http://sourceforge.net/p/agate/code/1466 Author: kanato Date: 2014-08-17 22:08:19 +0000 (Sun, 17 Aug 2014) Log Message: ----------- Update mouse processing events for newer event system. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/DisplayLib/FrameBuffer.cs trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs trunk/AgateLib/InputLib/AgateInputEventArgs.cs trunk/AgateLib/InputLib/Legacy/Mouse.cs trunk/AgateLib/UserInterface/Widgets/MenuItem.cs trunk/AgateLib/UserInterface/Widgets/WidgetList.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs trunk/UnitTests/Fakes/FakeDisplayWindow.cs trunk/UnitTests/UnitTests.csproj Added Paths: ----------- trunk/AgateLib/UserInterface/Widgets/WidgetEventArgs.cs trunk/UnitTests/Display/DisplayWindowTest.cs Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib/AgateLib.csproj 2014-08-17 22:08:19 UTC (rev 1466) @@ -594,6 +594,7 @@ <Compile Include="UserInterface\Widgets\Panel.cs" /> <Compile Include="UserInterface\Widgets\ProgressBar.cs" /> <Compile Include="UserInterface\Widgets\Widget.cs" /> + <Compile Include="UserInterface\Widgets\WidgetEventArgs.cs" /> <Compile Include="UserInterface\Widgets\WidgetList.cs" /> <Compile Include="UserInterface\Widgets\Window.cs" /> <Compile Include="UserInterface\WindowTransition.cs" /> Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -36,7 +36,6 @@ { FrameBufferImpl impl; Surface mRenderTarget; - Rectangle mCoordinateSystem; /// <summary> /// Constructs a frame buffer to be used as a render target. FrameBuffers constructed @@ -161,11 +160,8 @@ /// </summary> public Rectangle CoordinateSystem { - get { return mCoordinateSystem; } - set - { - mCoordinateSystem = value; - } + get { return Impl.CoordinateSystem; } + set { Impl.CoordinateSystem = value; } } } } Modified: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -161,5 +161,42 @@ /// </summary> public event CancelEventHandler Closing; + /// <summary> + /// Converts a pixel location on screen to the logical coordinate system used by AgateLib. + /// This function is primarily for supporting input mouse and touch events. + /// </summary> + /// <param name="point"></param> + /// <returns></returns> + public Point PixelToLogicalCoords(Point point) + { + double x = point.X / (double)Width; + double y = point.Y / (double)Height; + + Point retval = new Point( + (int)(x * FrameBuffer.CoordinateSystem.Width), + (int)(y * FrameBuffer.CoordinateSystem.Height)); + + retval.X += FrameBuffer.CoordinateSystem.X; + retval.Y += FrameBuffer.CoordinateSystem.Y; + + return retval; + } + /// <summary> + /// Converts a logical coordinate to actual pixel coordinates. + /// </summary> + /// <param name="point"></param> + /// <returns></returns> + public Point LogicalToPixelCoords(Point point) + { + point.X -= FrameBuffer.CoordinateSystem.X; + point.Y -= FrameBuffer.CoordinateSystem.Y; + + double x = point.X / (double)FrameBuffer.CoordinateSystem.Width; + double y = point.Y / (double)FrameBuffer.CoordinateSystem.Height; + + return new Point( + (int)(x * Width), + (int)(y * Height)); + } } } \ No newline at end of file Modified: trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs =================================================================== --- trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -87,5 +87,10 @@ /// if this FrameBuffer is not attached to any window. /// </summary> public abstract DisplayWindow AttachedWindow { get; } + + /// <summary> + /// Gets or sets the coordinate system that is used to map 2d coordinates to pixels in the render target. + /// </summary> + public virtual Rectangle CoordinateSystem { get; set; } } } Modified: trunk/AgateLib/InputLib/AgateInputEventArgs.cs =================================================================== --- trunk/AgateLib/InputLib/AgateInputEventArgs.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib/InputLib/AgateInputEventArgs.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -22,6 +22,32 @@ public MouseButton MouseButton { get; set; } public int MouseWheelDelta { get; set; } + public static AgateInputEventArgs MouseDown(object sender, Point mousePosition, MouseButton button) + { + return new AgateInputEventArgs + { + InputEventType = InputEventType.MouseDown, + MousePosition = mousePosition, + MouseButton = button, + }; + } + public static AgateInputEventArgs MouseUp(object sender, Point mousePosition, MouseButton button) + { + return new AgateInputEventArgs + { + InputEventType = InputEventType.MouseUp, + MousePosition = mousePosition, + MouseButton = button, + }; + } + public static AgateInputEventArgs MouseMove(object sender, Point mousePosition) + { + return new AgateInputEventArgs + { + InputEventType = InputEventType.MouseMove, + MousePosition = mousePosition, + }; + } public static AgateInputEventArgs KeyDown(KeyCode code, KeyModifiers modifiers) { @@ -33,7 +59,6 @@ KeyModifiers = modifiers, }; } - public static AgateInputEventArgs KeyUp(KeyCode code, KeyModifiers modifiers) { return new AgateInputEventArgs Modified: trunk/AgateLib/InputLib/Legacy/Mouse.cs =================================================================== --- trunk/AgateLib/InputLib/Legacy/Mouse.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib/InputLib/Legacy/Mouse.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -268,22 +268,23 @@ internal static void OnMouseDown(AgateInputEventArgs args) { - throw new NotImplementedException(); + Buttons[args.MouseButton] = true; } internal static void OnMouseUp(AgateInputEventArgs args) { - throw new NotImplementedException(); + Buttons[args.MouseButton] = false; + } internal static void OnMouseWheel(AgateInputEventArgs args) { - throw new NotImplementedException(); + OnMouseWheel(args.MouseWheelDelta); } internal static void OnMouseMove(AgateInputEventArgs args) { - throw new NotImplementedException(); + Position = args.MousePosition; } } Modified: trunk/AgateLib/UserInterface/Widgets/MenuItem.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/MenuItem.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib/UserInterface/Widgets/MenuItem.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -10,7 +10,10 @@ { public MenuItem() { + Children.WidgetAdded += Children_WidgetAdded; + Children.WidgetRemoved += Children_WidgetRemoved; } + public MenuItem(params Widget[] children) : this() { Children.AddRange(children); @@ -22,17 +25,17 @@ } [Obsolete("Use static MenuItem.OfLabel method instead.")] - public MenuItem(string name, string text) + public MenuItem(string name, string text) : this() { Name = name; Children.Add(new Label(text)); } - public MenuItem(Widget child) + public MenuItem(Widget child) : this() { Children.Add(child); } - public MenuItem(string name, Widget child) + public MenuItem(string name, Widget child) : this() { Name = name; @@ -62,6 +65,72 @@ public event EventHandler PressMenu; public event EventHandler Select; + void Children_WidgetAdded(object sender, WidgetEventArgs e) + { + var widget = e.Widget; + ListenToEventsIn(widget); + } + void Children_WidgetRemoved(object sender, WidgetEventArgs e) + { + var widget = e.Widget; + IgnoreEventsIn(widget); + } + + private void ListenToEventsIn(Widget widget) + { + var container = widget as Container; + + if (container != null) + { + container.Children.WidgetAdded += Children_WidgetAdded; + container.Children.WidgetRemoved += Children_WidgetRemoved; + + foreach (var c in container.Children) + ListenToEventsIn(c); + } + + widget.MouseDown += widget_MouseDown; + widget.MouseMove += widget_MouseMove; + widget.MouseUp += widget_MouseUp; + } + + private void IgnoreEventsIn(Widget widget) + { + var container = widget as Container; + + if (container != null) + { + container.Children.WidgetAdded -= Children_WidgetAdded; + container.Children.WidgetRemoved -= Children_WidgetRemoved; + + foreach (var c in container.Children) + IgnoreEventsIn(c); + } + + widget.MouseDown -= widget_MouseDown; + widget.MouseUp -= widget_MouseUp; + } + + bool mouseDown; + void widget_MouseDown(object sender, MouseEventArgs e) + { + mouseDown = true; + } + void widget_MouseUp(object sender, MouseEventArgs e) + { + if (mouseDown) + { + OnPressAccept(); + } + + mouseDown = false; + } + void widget_MouseMove(object sender, MouseEventArgs e) + { + OnSelect(); + } + + internal void OnSelect() { if (Select != null) Added: trunk/AgateLib/UserInterface/Widgets/WidgetEventArgs.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/WidgetEventArgs.cs (rev 0) +++ trunk/AgateLib/UserInterface/Widgets/WidgetEventArgs.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.UserInterface.Widgets +{ + public class WidgetEventArgs : EventArgs + { + public WidgetEventArgs(Widget widget) + { + this.Widget = widget; + } + + public Widget Widget { get; private set; } + } +} Modified: trunk/AgateLib/UserInterface/Widgets/WidgetList.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/WidgetList.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib/UserInterface/Widgets/WidgetList.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -37,11 +37,13 @@ mItems.Insert(index, item); item.Parent = mParent; + OnWidgetAdded(item); } public void RemoveAt(int index) { mItems[index].Parent = null; + OnWidgetRemoved(mItems[index]); mItems.RemoveAt(index); } @@ -59,9 +61,11 @@ ValidateItem(value); mItems[index].Parent = null; + OnWidgetRemoved(mItems[index]); + value.Parent = mParent; - mItems[index] = value; + OnWidgetAdded(value); } } @@ -71,21 +75,26 @@ mItems.Add(item); item.Parent = mParent; + + OnWidgetAdded(item); } public void AddRange(IEnumerable<Widget> items) { if (items == null) throw new ArgumentNullException("item"); - mItems.AddRange(items); - foreach (var item in items) - item.Parent = mParent; + { + Add(item); + } } public void Clear() { foreach (var item in mItems) + { item.Parent = null; + OnWidgetRemoved(item); + } mItems.Clear(); } @@ -115,7 +124,10 @@ if (item == null) throw new ArgumentNullException("item"); if (mItems.Contains(item)) + { item.Parent = null; + OnWidgetRemoved(item); + } return mItems.Remove(item); } @@ -152,6 +164,19 @@ return retval; } + + protected virtual void OnWidgetAdded(Widget widget) + { + if (WidgetAdded != null) + WidgetAdded(this, new WidgetEventArgs(widget)); + } + protected virtual void OnWidgetRemoved(Widget widget) + { + if (WidgetRemoved != null) + WidgetRemoved(this, new WidgetEventArgs(widget)); + } + public event EventHandler<WidgetEventArgs> WidgetAdded; + public event EventHandler<WidgetEventArgs> WidgetRemoved; } public class WidgetListOf<T> : WidgetList where T : Widget Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_DisplayControl.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -421,7 +421,6 @@ form.KeyUp -= new System.Windows.Forms.KeyEventHandler(form_KeyUp); form.FormClosing -= new FormClosingEventHandler(form_FormClosing); form.FormClosed -= new FormClosedEventHandler(form_FormClosed); - } void form_FormClosed(object sender, FormClosedEventArgs e) @@ -480,17 +479,24 @@ { var btn = GetButtons(e.Button); - Mouse.Buttons[btn] = false; + //Mouse.Buttons[btn] = false; + + Input.QueueInputEvent(AgateInputEventArgs.MouseUp( + this, PixelToLogicalCoords(new Point(e.X, e.Y)), btn)); } void pct_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { var btn = GetButtons(e.Button); - Mouse.Buttons[btn] = true; + //Mouse.Buttons[btn] = true; + Input.QueueInputEvent(AgateInputEventArgs.MouseDown( + this, PixelToLogicalCoords(new Point(e.X, e.Y)), btn)); } void pct_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { SetInternalMousePosition(Interop.Convert(e.Location)); + Input.QueueInputEvent(AgateInputEventArgs.MouseMove( + this, PixelToLogicalCoords(new Point(e.X, e.Y)))); } void renderTarget_Disposed(object sender, EventArgs e) { Modified: trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/AgateLib.Platform.WindowsForms/DisplayImplementation/GL_GameWindow.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -261,12 +261,19 @@ void Mouse_ButtonUp(object sender, OpenTK.Input.MouseButtonEventArgs e) { var agatebutton = TransformButton(e.Button); - Mouse.Buttons[agatebutton] = false; + //Mouse.Buttons[agatebutton] = false; + + Input.QueueInputEvent(AgateInputEventArgs.MouseUp( + this, PixelToLogicalCoords(new Point(e.X, e.Y)), agatebutton)); } void Mouse_ButtonDown(object sender, OpenTK.Input.MouseButtonEventArgs e) { var agatebutton = TransformButton(e.Button); - Mouse.Buttons[agatebutton] = true; + + Input.QueueInputEvent(AgateInputEventArgs.MouseDown( + this, PixelToLogicalCoords(new Point(e.X, e.Y)), agatebutton)); + + //Mouse.Buttons[agatebutton] = true; } void Mouse_Move(object sender, OpenTK.Input.MouseMoveEventArgs e) { Added: trunk/UnitTests/Display/DisplayWindowTest.cs =================================================================== --- trunk/UnitTests/Display/DisplayWindowTest.cs (rev 0) +++ trunk/UnitTests/Display/DisplayWindowTest.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -0,0 +1,46 @@ +using AgateLib.Geometry; +using AgateLib.UnitTests.Fakes; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AgateLib.UnitTests.Display +{ + [TestClass] + public class DisplayWindowTest + { + FakeDisplayWindow wind; + + [TestInitialize] + public void Initialize() + { + wind = new FakeDisplayWindow(new Size(500, 500)); + + wind.FrameBuffer.CoordinateSystem = new Geometry.Rectangle(50, 50, 1000, 1000); + } + + [TestMethod] + public void XCoordinateSystemRoundTrip() + { + for (int j = -50; j < 1000; j += 250) + { + for (int i = -50; i < 1000; i += 250) + { + Point p = new Point(i, j); + + Assert.AreEqual(p, wind.PixelToLogicalCoords(wind.LogicalToPixelCoords(p))); + } + } + } + + [TestMethod] + public void XCoordinateSystem() + { + Assert.AreEqual(new Point(50, 50), wind.PixelToLogicalCoords(Point.Empty)); + Assert.AreEqual(new Point(1050, 1050), wind.PixelToLogicalCoords(new Point(500, 500))); + } + } +} Modified: trunk/UnitTests/Fakes/FakeDisplayWindow.cs =================================================================== --- trunk/UnitTests/Fakes/FakeDisplayWindow.cs 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/UnitTests/Fakes/FakeDisplayWindow.cs 2014-08-17 22:08:19 UTC (rev 1466) @@ -1,5 +1,6 @@ using AgateLib.DisplayLib; using AgateLib.DisplayLib.ImplementationBase; +using AgateLib.Geometry; using System; using System.Collections.Generic; using System.Linq; @@ -11,10 +12,18 @@ class FakeDisplayWindow : DisplayWindowImpl { private DisplayWindow owner; - private CreateWindowParams windowParams; + private FrameBufferImpl frameBuffer; + private bool isDisposed; + public FakeDisplayWindow(Size size) + { + frameBuffer = new FakeFrameBuffer(this); + + this.Size = size; + } public FakeDisplayWindow(DisplayWindow owner, CreateWindowParams windowParams) + :this(windowParams.Size) { // TODO: Complete member initialization this.owner = owner; @@ -28,72 +37,41 @@ } public override void Dispose() { + isDisposed = true; } public override bool IsClosed { - get { throw new NotImplementedException(); } + get { return isDisposed; } } public override bool IsFullScreen { - get { throw new NotImplementedException(); } + get { return false; } } public override FrameBufferImpl FrameBuffer { - get { return new FakeFrameBuffer(this); } + get { return frameBuffer; } } public override void SetWindowed() { throw new NotImplementedException(); } - public override void SetFullScreen() { throw new NotImplementedException(); } - public override void SetFullScreen(int width, int height, int bpp) { throw new NotImplementedException(); } - public override Geometry.Size Size - { - get - { - throw new NotImplementedException(); - } - set - { - throw new NotImplementedException(); - } - } + public override Size Size { get;set;} - public override string Title - { - get - { - throw new NotImplementedException(); - } - set - { - throw new NotImplementedException(); - } - } + public override string Title { get;set;} - public override Geometry.Point MousePosition - { - get - { - throw new NotImplementedException(); - } - set - { - throw new NotImplementedException(); - } - } + public override Point MousePosition { get;set;} } } Modified: trunk/UnitTests/UnitTests.csproj =================================================================== --- trunk/UnitTests/UnitTests.csproj 2014-08-17 05:36:22 UTC (rev 1465) +++ trunk/UnitTests/UnitTests.csproj 2014-08-17 22:08:19 UTC (rev 1466) @@ -93,6 +93,7 @@ <Compile Include="ApplicationModels\CoordinateSystemTest.cs" /> <Compile Include="Core\ConsoleTests.cs" /> <Compile Include="Display\DisplayTests.cs" /> + <Compile Include="Display\DisplayWindowTest.cs" /> <Compile Include="Display\FontTests.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Fakes\FakeAgateFactory.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-17 05:36:27
|
Revision: 1465 http://sourceforge.net/p/agate/code/1465 Author: kanato Date: 2014-08-17 05:36:22 +0000 (Sun, 17 Aug 2014) Log Message: ----------- Update layout unit test. Modified Paths: -------------- trunk/UnitTests/UserInterface/Css/LayoutTest.cs Modified: trunk/UnitTests/UserInterface/Css/LayoutTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-17 05:35:48 UTC (rev 1464) +++ trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-17 05:36:22 UTC (rev 1465) @@ -40,7 +40,8 @@ CssDocument doc = CssDocument.FromText( "window { layout: column; margin: 6px; padding: 8px;} label { margin-left: 4px; } " + - "window.fixed { position: fixed; right: 4px; bottom: 8px; margin: 0px; padding: 0px;} "); + "window.fixed { position: fixed; right: 4px; bottom: 8px; margin: 14px; padding: 9px; border: 2px; } "+ + "window.fixedleft { position: fixed; left: 4px; top: 8px; margin: 14px; padding: 9px; border: 2px; }"); adapter = new CssAdapter(doc, ff); engine = new CssLayoutEngine(adapter); @@ -92,16 +93,28 @@ [TestMethod] - public void FixedPosition() + public void FixedRightBottom() { Window wind = new Window() { Style = "fixed" }; gui.Desktop.Children.Add(wind); RedoLayout(); - Assert.AreEqual(1000 - 4, wind.WidgetRect.Right); - Assert.AreEqual(1000 - 8, wind.WidgetRect.Bottom); + Assert.AreEqual(1000 - 18, wind.WidgetRect.Right); + Assert.AreEqual(1000 -22, wind.WidgetRect.Bottom); } + + [TestMethod] + public void FixedTopLeft() + { + Window wind = new Window() { Style = "fixedleft" }; + gui.Desktop.Children.Add(wind); + + RedoLayout(); + + Assert.AreEqual(18, wind.WidgetRect.Left); + Assert.AreEqual(22, wind.WidgetRect.Top); + } } [Obsolete] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-17 05:35:53
|
Revision: 1464 http://sourceforge.net/p/agate/code/1464 Author: kanato Date: 2014-08-17 05:35:48 +0000 (Sun, 17 Aug 2014) Log Message: ----------- Some fixes for fixed layouts. Fix NaturalCoordinates bug. Modified Paths: -------------- trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs trunk/AgateLib/DisplayLib/FrameBuffer.cs trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs trunk/AgateLib/UserInterface/Widgets/Gui.cs Modified: trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs =================================================================== --- trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs 2014-08-16 17:24:43 UTC (rev 1463) +++ trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs 2014-08-17 05:35:48 UTC (rev 1464) @@ -19,7 +19,7 @@ if (MaxSize != null) { retval.Width = Math.Min(retval.Width, MaxSize.Value.Width); - retval.Height = Math.Max(retval.Height, MaxSize.Value.Height); + retval.Height = Math.Min(retval.Height, MaxSize.Value.Height); } return retval; Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs =================================================================== --- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-08-16 17:24:43 UTC (rev 1463) +++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2014-08-17 05:35:48 UTC (rev 1464) @@ -36,6 +36,7 @@ { FrameBufferImpl impl; Surface mRenderTarget; + Rectangle mCoordinateSystem; /// <summary> /// Constructs a frame buffer to be used as a render target. FrameBuffers constructed @@ -158,6 +159,13 @@ /// framebuffer as a render target, this coordinate system is automatically /// loaded. /// </summary> - public Rectangle CoordinateSystem { get; set; } + public Rectangle CoordinateSystem + { + get { return mCoordinateSystem; } + set + { + mCoordinateSystem = value; + } + } } } Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-16 17:24:43 UTC (rev 1463) +++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-17 05:35:48 UTC (rev 1464) @@ -19,7 +19,7 @@ } public void RedoLayout(Gui gui) { - RedoLayout(gui, Display.RenderTarget.Size); + RedoLayout(gui, Display.RenderTarget.CoordinateSystem.Size); } public void RedoLayout(Gui gui, Size renderTargetSize) { @@ -57,7 +57,41 @@ } } } + private void SetFixedCoordinates(CssStyle style, CssBoxModel box, Size sz) + { + var anim = style.Animator; + var position = style.Data.PositionData; + var parentStyle = mAdapter.GetStyle(style.Animator.ParentCoordinateSystem); + if (position.Left.Automatic == false) + { + var targetLeft = ConvertDistance(style.Widget, position.Left, true, false).Value; + + anim.ClientRect.X = targetLeft + box.Left; + } + if (position.Right.Automatic == false) + { + int targetRight = ConvertDistance(style.Widget, position.Right, true, false).Value; + targetRight = parentStyle.Animator.WidgetSize.Width - targetRight; + + anim.ClientRect.X = targetRight - anim.ClientRect.Width - box.Right; + } + if (position.Top.Automatic == false) + { + int targetTop = ConvertDistance(style.Widget, position.Top, false, false).Value; + + anim.ClientRect.Y = targetTop + box.Top; + } + if (position.Bottom.Automatic == false) + { + int targetBottom = ConvertDistance(style.Widget, position.Bottom, false, false).Value; + targetBottom = parentStyle.Animator.WidgetSize.Height - targetBottom; + + anim.ClientRect.Y = targetBottom - anim.ClientRect.Height - box.Bottom; + } + } + + private void RedoLayout(Container container) { var containerStyle = mAdapter.GetStyle(container); @@ -196,36 +230,6 @@ } - private void SetFixedCoordinates(CssStyle style, CssBoxModel box, Size sz) - { - var anim = style.Animator; - var position = style.Data.PositionData; - var parentStyle = mAdapter.GetStyle(style.Widget.Parent); - - if (position.Left.Automatic == false) - { - anim.ClientRect.X = ConvertDistance(style.Widget, position.Left, true, false).Value; - } - if (position.Right.Automatic == false) - { - int targetRight = ConvertDistance(style.Widget, position.Right, true, false).Value; - targetRight = parentStyle.Animator.WidgetSize.Width - targetRight; - - anim.ClientRect.X = targetRight - anim.ClientRect.Width; - } - if (position.Top.Automatic == false) - { - anim.ClientRect.Y = ConvertDistance(style.Widget, position.Top, false, false).Value; - } - if (position.Bottom.Automatic == false) - { - int targetBottom = ConvertDistance(style.Widget, position.Bottom, false, false).Value; - targetBottom = parentStyle.Animator.WidgetSize.Height - targetBottom; - - anim.ClientRect.Y = targetBottom - anim.ClientRect.Height; - } - } - private Widget TopLevelWidget(Widget child) { return TopLevelWidget(child, x => true); Modified: trunk/AgateLib/UserInterface/Widgets/Gui.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Gui.cs 2014-08-16 17:24:43 UTC (rev 1463) +++ trunk/AgateLib/UserInterface/Widgets/Gui.cs 2014-08-17 05:35:48 UTC (rev 1464) @@ -90,6 +90,20 @@ #region --- Event Handling --- + public bool ForwardUnhandledEvents { get; set; } + + public void ProcessEvent(AgateInputEventArgs args) + { + switch (args.InputEventType) + { + case InputEventType.KeyDown: OnKeyDown(args); break; + case InputEventType.KeyUp: OnKeyUp(args); break; + case InputEventType.MouseDown: OnMouseDown(args); break; + case InputEventType.MouseUp: OnMouseUp(args); break; + case InputEventType.MouseMove: OnMouseMove(args); break; + } + } + public void OnKeyDown(AgateInputEventArgs args) { bool handled = false; @@ -265,7 +279,6 @@ } public void Draw() { - mLayout.RedoLayout(this); mRenderer.Draw(this); } @@ -341,19 +354,6 @@ internal AgateLib.UserInterface.Css.CssDocument CssDocument { get; set; } - public void ProcessEvent(AgateInputEventArgs args) - { - switch(args.InputEventType) - { - case InputEventType.KeyDown: OnKeyDown(args); break; - case InputEventType.KeyUp: OnKeyUp(args); break; - case InputEventType.MouseDown: OnMouseDown(args); break; - case InputEventType.MouseUp: OnMouseUp(args); break; - case InputEventType.MouseMove: OnMouseMove(args); break; - } - } - - public bool ForwardUnhandledEvents { get;set;} } class WindowList : IList<Window> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2014-08-16 17:24:54
|
Revision: 1463 http://sourceforge.net/p/agate/code/1463 Author: kanato Date: 2014-08-16 17:24:43 +0000 (Sat, 16 Aug 2014) Log Message: ----------- Add maximum value to NaturalCoordinates. Some fixes to GUI. Begin implementation of fixed/absolute CSS positioning. Modified Paths: -------------- trunk/AgateLib/AgateLib.csproj trunk/AgateLib/IO/SubDirectoryProvider.cs trunk/AgateLib/UserInterface/Css/CssBackground.cs trunk/AgateLib/UserInterface/Css/CssBorder.cs trunk/AgateLib/UserInterface/Css/CssBorderImage.cs trunk/AgateLib/UserInterface/Css/CssFont.cs trunk/AgateLib/UserInterface/Css/CssLayout.cs trunk/AgateLib/UserInterface/Css/CssStyle.cs trunk/AgateLib/UserInterface/Css/CssStyleData.cs trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs trunk/AgateLib/UserInterface/Css/Rendering/CssDefaultImageProvider.cs trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs trunk/AgateLib/UserInterface/Widgets/Container.cs trunk/AgateLib/UserInterface/Widgets/Gui.cs trunk/AgateLib/UserInterface/Widgets/Linq/WidgetExtensions.cs trunk/AgateLib/UserInterface/Widgets/Widget.cs trunk/AgateLib/UserInterface/Widgets/Window.cs trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FileSystemProvider.cs trunk/Tests/UserInterfaceTests/GuiStuff.cs trunk/UnitTests/UserInterface/Css/AdapterTest.cs trunk/UnitTests/UserInterface/Css/LayoutTest.cs Added Paths: ----------- trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs Removed Paths: ------------- trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs Modified: trunk/AgateLib/AgateLib.csproj =================================================================== --- trunk/AgateLib/AgateLib.csproj 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/AgateLib.csproj 2014-08-16 17:24:43 UTC (rev 1463) @@ -84,6 +84,7 @@ <Compile Include="Algorithms\PathFinding\AStarNode.cs" /> <Compile Include="Algorithms\PathFinding\AStarState.cs" /> <Compile Include="Algorithms\Inverting.cs" /> + <Compile Include="ApplicationModels\CoordinateSystems\NaturalCoordinates.cs" /> <Compile Include="DisplayLib\FontSettings.cs" /> <Compile Include="DisplayLib\FontStyles.cs" /> <Compile Include="Drivers\NullDrivers\NullInputFactory.cs" /> @@ -96,7 +97,6 @@ </Compile> <Compile Include="ApplicationModels\AgateAppModel.cs" /> <Compile Include="ApplicationModels\AssetLocations.cs" /> - <Compile Include="ApplicationModels\CoordinateSystems\NaturalCoordinates.cs" /> <Compile Include="ApplicationModels\CoordinateSystems\FixedAspectRatioCoordinates.cs" /> <Compile Include="ApplicationModels\ICoordinateSystemCreator.cs" /> <Compile Include="ApplicationModels\ModelParameters.cs" /> Deleted: trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs =================================================================== --- trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -1,20 +0,0 @@ -using AgateLib.Geometry; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AgateLib.ApplicationModels.CoordinateSystems -{ - /// <summary> - /// Constructs a coordinate system that provides a one-to-one mapping to the pixels - /// in the display window. - /// </summary> - public class NaturalCoordinates : ICoordinateSystemCreator - { - public Rectangle DetermineCoordinateSystem(Size displayWindowSize) - { - return new Rectangle(0, 0, displayWindowSize.Width, displayWindowSize.Height); - } - } -} Added: trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs =================================================================== --- trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs (rev 0) +++ trunk/AgateLib/ApplicationModels/CoordinateSystems/NaturalCoordinates.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -0,0 +1,30 @@ +using AgateLib.Geometry; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AgateLib.ApplicationModels.CoordinateSystems +{ + /// <summary> + /// Constructs a coordinate system which matches the pixels coordinates of the display window, + /// up to an optional maximum height and width. + /// </summary> + public class NaturalCoordinates : ICoordinateSystemCreator + { + public Rectangle DetermineCoordinateSystem(Size displayWindowSize) + { + Rectangle retval = new Rectangle(Point.Empty, displayWindowSize); + + if (MaxSize != null) + { + retval.Width = Math.Min(retval.Width, MaxSize.Value.Width); + retval.Height = Math.Max(retval.Height, MaxSize.Value.Height); + } + + return retval; + } + + public Size? MaxSize { get; set; } + } +} Modified: trunk/AgateLib/IO/SubDirectoryProvider.cs =================================================================== --- trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/IO/SubDirectoryProvider.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -20,6 +20,10 @@ this.subdir += "/"; } + public override string ToString() + { + return parent.ToString() + subdir; + } public System.IO.Stream OpenRead(string filename) { return parent.OpenRead(subdir + filename); Modified: trunk/AgateLib/UserInterface/Css/CssBackground.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssBackground.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/CssBackground.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -8,12 +8,20 @@ namespace AgateLib.UserInterface.Css { - public class CssBackground + public class CssBackground : ICssPropertyFromText { public CssBackground() { + Initialize(); + } + + private void Initialize() + { Color = Color.FromArgb(0, 0, 0, 0); + Image = null; + Repeat = 0; Position = new CssBackgroundPosition(); + Clip = 0; } public Color Color { get; set; } @@ -21,6 +29,16 @@ public CssBackgroundRepeat Repeat { get; set; } public CssBackgroundClip Clip { get; set; } public CssBackgroundPosition Position { get; set; } + + public void SetValueFromText(string value) + { + if (value == "none") + { + Initialize(); + } + else + throw new NotImplementedException(); + } } public class CssBackgroundPosition : ICssPropertyFromText Modified: trunk/AgateLib/UserInterface/Css/CssBorder.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssBorder.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/CssBorder.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -75,6 +75,18 @@ public class CssBorderData : ICssPropertyFromText { + public CssBorderData() + { + Initialize(); + } + + private void Initialize() + { + Style = CssBorderStyle.None; + Width = new CssDistance(); + Color = Color.FromArgb(0, 0, 0, 0); + } + public CssBorderStyle Style { get; set; } public CssDistance Width { get; set; } @@ -83,6 +95,12 @@ public void SetValueFromText(string value) { + if (value == "none") + { + Initialize(); + return; + } + string[] values = value.Split(Extensions.WhiteSpace); foreach (var v in values) @@ -104,6 +122,7 @@ } } } + } public enum CssBorderStyle Modified: trunk/AgateLib/UserInterface/Css/CssBorderImage.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssBorderImage.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/CssBorderImage.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -11,9 +11,16 @@ { public CssBorderImage() { + Initialize(); + } + + private void Initialize() + { + Source = string.Empty; Slice = new CssBorderImageComponent(); Width = new CssBorderImageComponent(); Outset = new CssBorderImageComponent(); + Repeat = CssBorderImageRepeat.Initial; } public string Source { get; set; } @@ -24,7 +31,14 @@ public void SetValueFromText(string value) { - throw new NotImplementedException(); + if (value == "none") + { + Initialize(); + } + else + { + throw new NotImplementedException(); + } } } Modified: trunk/AgateLib/UserInterface/Css/CssFont.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssFont.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/CssFont.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -11,6 +11,11 @@ { public class CssFont { + public CssFont() + { + Color = Color.Black; + } + [CssAlias("font-family")] public string Family { get; set; } Modified: trunk/AgateLib/UserInterface/Css/CssLayout.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssLayout.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/CssLayout.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -44,6 +44,5 @@ Column, Row, Grid, - } } Modified: trunk/AgateLib/UserInterface/Css/CssStyle.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssStyle.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/CssStyle.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -12,8 +12,8 @@ { public class CssStyle { - string mClassValue; - List<string> mSplitClasses; + string mClassValue = string.Empty; + List<string> mSplitClasses = new List<string>(); public CssStyle(Widget widget) { @@ -39,6 +39,7 @@ get { return mClassValue; } set { + if (value == null) throw new ArgumentNullException(); if (mClassValue.Equals(value, StringComparison.OrdinalIgnoreCase)) return; Modified: trunk/AgateLib/UserInterface/Css/CssStyleData.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/CssStyleData.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/CssStyleData.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -21,7 +21,7 @@ { Selector = ""; - Position = new CssRectangle(); + PositionData = new CssRectangle(); Font = new CssFont(); Background = new CssBackground(); Margin = new CssBoxComponent(); @@ -36,8 +36,10 @@ public CssSelectorGroup Selector { get; set; } [CssPromoteProperties] - public CssRectangle Position { get; set; } + public CssRectangle PositionData { get; set; } + public CssPosition Position { get; set; } + [CssPromoteProperties] public CssFont Font { get; set; } @@ -61,4 +63,13 @@ [CssPromoteProperties(prefix: "transition")] public CssTransition Transition { get; set; } } + + public enum CssPosition + { + Initial, + Static = Initial, + Relative, + Absolute, + Fixed, + } } Modified: trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/Layout/CssLayoutEngine.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -25,10 +25,39 @@ { gui.Desktop.Width = renderTargetSize.Width; gui.Desktop.Height = renderTargetSize.Height; + SetDesktopAnimatorProperties(gui.Desktop); RedoLayout(gui.Desktop); + + RedoFixedLayout(gui.Desktop); } + private void SetDesktopAnimatorProperties(Desktop desktop) + { + var style = mAdapter.GetStyle(desktop); + + style.Animator.ClientRect = new Rectangle(0, 0, desktop.Width, desktop.Height); + style.Animator.WidgetSize = new Size(desktop.Width, desktop.Height); + } + + private void RedoFixedLayout(Desktop desktop) + { + foreach (var child in desktop.Descendants) + { + var style = mAdapter.GetStyle(child); + var sz = style.Animator.ClientRect.Size; + var box = style.BoxModel; + + switch (style.Data.Position) + { + case CssPosition.Absolute: + case CssPosition.Fixed: + SetFixedCoordinates(style, box, sz); + break; + } + } + } + private void RedoLayout(Container container) { var containerStyle = mAdapter.GetStyle(container); @@ -49,8 +78,8 @@ containerAnim.ClientRect.Width = maxWidth; - int? fixedContainerWidth = ConvertDistance(container, containerStyle.Data.Position.Width, true); - int? fixedContainerHeight = ConvertDistance(container, containerStyle.Data.Position.Height, true); + int? fixedContainerWidth = ConvertDistance(container, containerStyle.Data.PositionData.Width, true); + int? fixedContainerHeight = ConvertDistance(container, containerStyle.Data.PositionData.Height, true); if (fixedContainerWidth != null) maxWidth = (int)fixedContainerWidth; @@ -61,8 +90,8 @@ var sz = ComputeSize(child, containerStyle); var box = style.BoxModel; - int? fixedWidth = ConvertDistance(child, style.Data.Position.Width, true); - int? fixedHeight = ConvertDistance(child, style.Data.Position.Height, false); + int? fixedWidth = ConvertDistance(child, style.Data.PositionData.Width, true); + int? fixedHeight = ConvertDistance(child, style.Data.PositionData.Height, false); if (fixedWidth != null) sz.Width = (int)fixedWidth; if (fixedHeight != null) sz.Height = (int)fixedHeight; @@ -79,6 +108,8 @@ break; } + bool includeInLayout = true; + var anim = style.Animator; anim.ClientRect.X = nextPos.X + box.Left; @@ -86,6 +117,19 @@ anim.ClientRect.Width = sz.Width; anim.ClientRect.Height = sz.Height; + switch (style.Data.Position) + { + case CssPosition.Absolute: + includeInLayout = false; + anim.ParentCoordinateSystem = TopLevelWidget(child, x => mAdapter.GetStyle(x).Data.Position == CssPosition.Relative); + break; + + case CssPosition.Fixed: + includeInLayout = false; + anim.ParentCoordinateSystem = TopLevelWidget(child); + break; + } + anim.ClientWidgetOffset = new Point( box.Padding.Left + box.Border.Left, box.Padding.Top + box.Border.Top); @@ -94,22 +138,25 @@ anim.ClientRect.Width + box.Padding.Left + box.Padding.Right + box.Border.Left + box.Border.Right, anim.ClientRect.Height + box.Padding.Top + box.Padding.Bottom + box.Border.Bottom + box.Border.Top); - switch (containerStyle.Data.Layout.Kind) + if (includeInLayout) { - case CssLayoutKind.Flow: - nextPos.X += anim.ClientRect.Width + box.Left + box.Right; - largestWidth = Math.Max(largestWidth, nextPos.X); - break; + switch (containerStyle.Data.Layout.Kind) + { + case CssLayoutKind.Flow: + nextPos.X += anim.ClientRect.Width + box.Left + box.Right; + largestWidth = Math.Max(largestWidth, nextPos.X); + break; - case CssLayoutKind.Column: - nextPos.X = 0; - nextPos.Y += anim.ClientRect.Height + box.Top + box.Bottom; - largestWidth = Math.Max(largestWidth, anim.ClientRect.Width + box.Right + box.Left); - break; + case CssLayoutKind.Column: + nextPos.X = 0; + nextPos.Y += anim.ClientRect.Height + box.Top + box.Bottom; + largestWidth = Math.Max(largestWidth, anim.ClientRect.Width + box.Right + box.Left); + break; + } + + maxHeight = Math.Max(maxHeight, anim.ClientRect.Height + box.Top + box.Bottom); + bottom = Math.Max(bottom, anim.ClientRect.Y + anim.ClientRect.Height + box.Bottom); // only add box.Bottom here, because box.Top is taken into account in child.Y. } - - maxHeight = Math.Max(maxHeight, anim.ClientRect.Height + box.Top + box.Bottom); - bottom = Math.Max(bottom, anim.ClientRect.Y + anim.ClientRect.Height + box.Bottom); // only add box.Bottom here, because box.Top is taken into account in child.Y. } containerAnim.ClientRect.Width = Math.Min(largestWidth, maxWidth); @@ -130,14 +177,14 @@ var box = style.BoxModel; int width = containerAnim.ClientRect.Width - box.Left - box.Right; - if (style.Data.Position.MinWidth.Automatic == false) + if (style.Data.PositionData.MinWidth.Automatic == false) { - int minwidth = mAdapter.CssDistanceToPixels(containerStyle, style.Data.Position.MinWidth, true); + int minwidth = mAdapter.CssDistanceToPixels(containerStyle, style.Data.PositionData.MinWidth, true); width = Math.Max(width, minwidth); } - if (style.Data.Position.MaxWidth.Automatic == false) + if (style.Data.PositionData.MaxWidth.Automatic == false) { - int maxwidth = mAdapter.CssDistanceToPixels(containerStyle, style.Data.Position.MaxWidth, true); + int maxwidth = mAdapter.CssDistanceToPixels(containerStyle, style.Data.PositionData.MaxWidth, true); width = Math.Min(width, maxwidth); } @@ -145,8 +192,57 @@ } break; } + + } + private void SetFixedCoordinates(CssStyle style, CssBoxModel box, Size sz) + { + var anim = style.Animator; + var position = style.Data.PositionData; + var parentStyle = mAdapter.GetStyle(style.Widget.Parent); + + if (position.Left.Automatic == false) + { + anim.ClientRect.X = ConvertDistance(style.Widget, position.Left, true, false).Value; + } + if (position.Right.Automatic == false) + { + int targetRight = ConvertDistance(style.Widget, position.Right, true, false).Value; + targetRight = parentStyle.Animator.WidgetSize.Width - targetRight; + + anim.ClientRect.X = targetRight - anim.ClientRect.Width; + } + if (position.Top.Automatic == false) + { + anim.ClientRect.Y = ConvertDistance(style.Widget, position.Top, false, false).Value; + } + if (position.Bottom.Automatic == false) + { + int targetBottom = ConvertDistance(style.Widget, position.Bottom, false, false).Value; + targetBottom = parentStyle.Animator.WidgetSize.Height - targetBottom; + + anim.ClientRect.Y = targetBottom - anim.ClientRect.Height; + } + } + + private Widget TopLevelWidget(Widget child) + { + return TopLevelWidget(child, x => true); + } + private Widget TopLevelWidget(Widget child, Func<Widget, bool> continueToParent) + { + var retval = child.Parent; + + if (retval == null) + return child; + + if (continueToParent(retval) == false) + return retval; + + return TopLevelWidget(retval, continueToParent); + } + private int ComputeMaxWidthForContainer(CssStyle style) { Container container = (Container)style.Widget; @@ -159,11 +255,11 @@ int availableWidth = parentStyle.Animator.ClientRect.Width - container.X; - if (styleData.Position.MaxWidth.Automatic) + if (styleData.PositionData.MaxWidth.Automatic) return availableWidth; else { - int maxWidth = mAdapter.CssDistanceToPixels(style, styleData.Position.MaxWidth, true); + int maxWidth = mAdapter.CssDistanceToPixels(style, styleData.PositionData.MaxWidth, true); return Math.Min(availableWidth, maxWidth); } @@ -181,10 +277,10 @@ var style = mAdapter.GetStyle(control); return control.ComputeSize( - ConvertDistance(control, style.Data.Position.MinWidth, true), - ConvertDistance(control, style.Data.Position.MinHeight, false), - ConvertDistance(control, style.Data.Position.MaxWidth, true), - ConvertDistance(control, style.Data.Position.MaxHeight, false)); + ConvertDistance(control, style.Data.PositionData.MinWidth, true), + ConvertDistance(control, style.Data.PositionData.MinHeight, false), + ConvertDistance(control, style.Data.PositionData.MaxWidth, true), + ConvertDistance(control, style.Data.PositionData.MaxHeight, false)); } private int? ConvertDistance(Widget control, CssDistance cssDistance, bool width, bool autoIsNull = true) Modified: trunk/AgateLib/UserInterface/Css/Rendering/CssDefaultImageProvider.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Rendering/CssDefaultImageProvider.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/Rendering/CssDefaultImageProvider.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -18,7 +18,7 @@ file = file.Substring(4, file.Length - 5); if (mSurfaces.ContainsKey(file) == false) - mSurfaces.Add(file, new Surface(file)); + mSurfaces.Add(file, new Surface(file, AgateLib.IO.FileProvider.UserInterfaceAssets)); return mSurfaces[file]; } Modified: trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/Rendering/CssRenderer.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -31,7 +31,7 @@ public void Update(Gui gui, double deltaTime) { - foreach (var widget in gui.Desktop.Descendants()) + foreach (var widget in gui.Desktop.Descendants) { var style = mAdapter.GetStyle(widget); Modified: trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs =================================================================== --- trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Css/Rendering/WidgetAnimator.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -45,5 +45,7 @@ Transition.Update(deltaTime); } } + + public Widgets.Widget ParentCoordinateSystem { get; set; } } } Modified: trunk/AgateLib/UserInterface/Widgets/Container.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Container.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Widgets/Container.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -19,6 +19,26 @@ public WidgetList Children { get; protected set; } + /// <summary> + /// Enumerates all descendants of this container. + /// </summary> + public IEnumerable<Widget> Descendants + { + get + { + foreach (var w in Children) + { + yield return w; + } + + foreach (var w in Children.OfType<Container>()) + { + foreach (var ww in ((Container)w).Descendants) + yield return ww; + } + } + } + public bool ChildHasMouseIn { get Modified: trunk/AgateLib/UserInterface/Widgets/Gui.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Gui.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Widgets/Gui.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -10,7 +10,7 @@ namespace AgateLib.UserInterface.Widgets { - public class Gui + public class Gui : IInputHandler { Desktop mDesktop; IAudioPlayer mAudioPlayer; @@ -28,6 +28,8 @@ mDesktop = new Desktop(this); InputMap = InputMap.CreateDefaultMapping(); + + ForwardUnhandledEvents = true; } public InputMap InputMap { get ; set; } @@ -53,8 +55,43 @@ set { mFocusWidget = value; } } - public void OnKeyDown(InputEventArgs args) + private void FindFocusWidget() { + foreach (var window in mDesktop.Windows.Reverse()) + { + mFocusWidget = window.FindFocusWidget(); + + if (mFocusWidget != null) + return; + } + } + + private Widget WidgetAt(Point point) + { + return WidgetAt(Desktop, point); + } + private Widget WidgetAt(Container container, Point point) + { + foreach (var child in container.Children) + { + if (child.WidgetRect.Contains(point)) + { + if (child is Container) + { + return WidgetAt((Container)child, child.ParentToClient(point)); + } + else + return child; + } + } + + return container; + } + + #region --- Event Handling --- + + public void OnKeyDown(AgateInputEventArgs args) + { bool handled = false; GuiInput input = InputMap.MapKey(args.KeyCode); @@ -74,7 +111,7 @@ DispatchEvent(window => { window.OnInputButtonDown(args.KeyCode, ref handled); return handled; }); } } - public void OnKeyUp(InputEventArgs args) + public void OnKeyUp(AgateInputEventArgs args) { bool handled = false; @@ -91,39 +128,89 @@ } } - private void FindFocusWidget() + public void OnMouseMove(AgateInputEventArgs e) { - foreach (var window in mDesktop.Windows.Reverse()) + Widget targetWidget = mMouseEventWidget; + + if (targetWidget == null) + targetWidget = WidgetAt(e.MousePosition); + + if (mHoverWidget != targetWidget) { - mFocusWidget = window.FindFocusWidget(); + if (mHoverWidget != null) + { + mHoverWidget.MouseIn = false; + mHoverWidget.OnMouseLeave(); + } - if (mFocusWidget != null) - return; + targetWidget.MouseIn = true; + targetWidget.OnMouseEnter(); + + mHoverWidget = targetWidget; } + + targetWidget.OnMouseMove(targetWidget.ScreenToClient(e.MousePosition)); } + public void OnMouseDown(AgateInputEventArgs e) + { + var targetWidget = WidgetAt(e.MousePosition); - private Widget WidgetAt(Point point) + mMouseEventWidget = targetWidget; + + targetWidget.OnMouseDown(e.MouseButton, targetWidget.ScreenToClient(e.MousePosition)); + } + public void OnMouseUp(AgateInputEventArgs e) { - return WidgetAt(Desktop, point); + Widget targetWidget = mMouseEventWidget; + + if (targetWidget == null) + targetWidget = WidgetAt(e.MousePosition); + + mMouseEventWidget = null; + targetWidget.OnMouseUp(e.MouseButton, targetWidget.ScreenToClient(e.MousePosition)); } - private Widget WidgetAt(Container container, Point point) + + [Obsolete] + public void OnKeyDown(InputEventArgs args) { - foreach (var child in container.Children) + bool handled = false; + GuiInput input = InputMap.MapKey(args.KeyCode); + + if (mFocusWidget == null) + FindFocusWidget(); + + if (mFocusWidget != null) { - if (child.WidgetRect.Contains(point)) + mFocusWidget.OnKeyDown(args.KeyCode, args.KeyString); + if (input != GuiInput.None) { - if (child is Container) - { - return WidgetAt((Container)child, child.ParentToClient(point)); - } - else - return child; + mFocusWidget.OnGuiInput(input, ref handled); } } + else + { + DispatchEvent(window => { window.OnInputButtonDown(args.KeyCode, ref handled); return handled; }); + } + } + [Obsolete] + public void OnKeyUp(InputEventArgs args) + { + bool handled = false; - return container; + if (mFocusWidget == null) + FindFocusWidget(); + + if (mFocusWidget != null) + { + mFocusWidget.OnKeyUp(args.KeyCode, args.KeyString); + } + else + { + DispatchEvent(window => { window.OnInputButtonUp(args.KeyCode, ref handled); return handled; }); + } } + [Obsolete] public void OnMouseMove(InputEventArgs e) { Widget targetWidget = mMouseEventWidget; @@ -147,6 +234,7 @@ targetWidget.OnMouseMove(targetWidget.ScreenToClient(e.MousePosition)); } + [Obsolete] public void OnMouseDown(InputEventArgs e) { var targetWidget = WidgetAt(e.MousePosition); @@ -155,7 +243,7 @@ targetWidget.OnMouseDown(e.MouseButtons, targetWidget.ScreenToClient(e.MousePosition)); } - public void OnMouseUp(InputEventArgs e) + [Obsolete] public void OnMouseUp(InputEventArgs e) { Widget targetWidget = mMouseEventWidget; @@ -166,6 +254,8 @@ targetWidget.OnMouseUp(e.MouseButtons, targetWidget.ScreenToClient(e.MousePosition)); } + #endregion + public void OnUpdate(double delta_t, bool processInput) { mLayout.RedoLayout(this); @@ -251,7 +341,19 @@ internal AgateLib.UserInterface.Css.CssDocument CssDocument { get; set; } + public void ProcessEvent(AgateInputEventArgs args) + { + switch(args.InputEventType) + { + case InputEventType.KeyDown: OnKeyDown(args); break; + case InputEventType.KeyUp: OnKeyUp(args); break; + case InputEventType.MouseDown: OnMouseDown(args); break; + case InputEventType.MouseUp: OnMouseUp(args); break; + case InputEventType.MouseMove: OnMouseMove(args); break; + } + } + public bool ForwardUnhandledEvents { get;set;} } class WindowList : IList<Window> Modified: trunk/AgateLib/UserInterface/Widgets/Linq/WidgetExtensions.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Linq/WidgetExtensions.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Widgets/Linq/WidgetExtensions.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -8,18 +8,5 @@ { public static class WidgetExtensions { - public static IEnumerable<Widget> Descendants(this Container container) - { - foreach (var w in container.Children) - { - yield return w; - } - - foreach (var w in container.Children.OfType<Container>()) - { - foreach (var ww in ((Container)w).Descendants()) - yield return ww; - } - } } } Modified: trunk/AgateLib/UserInterface/Widgets/Widget.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Widget.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Widgets/Widget.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -18,6 +18,7 @@ private Font mFont; private Color? mFontColor; private bool mEnabled = true; + string mStyle = string.Empty; public Widget() { @@ -243,8 +244,18 @@ public virtual bool Visible { get; set; } - public string Style { get; set; } + public string Style + { + get { return mStyle; } + set + { + if (value == null) + throw new ArgumentNullException(); + mStyle = value; + } + } + public virtual bool LayoutDirty { get; set; } protected virtual Gui MyGui Modified: trunk/AgateLib/UserInterface/Widgets/Window.cs =================================================================== --- trunk/AgateLib/UserInterface/Widgets/Window.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib/UserInterface/Widgets/Window.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -17,6 +17,7 @@ } public Window(string name) { + Name = name; } public Window(params Widget[] contents) : base(contents) Modified: trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FileSystemProvider.cs =================================================================== --- trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FileSystemProvider.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/AgateLib.Platform.WindowsForms/PlatformImplementation/FileSystemProvider.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -82,7 +82,7 @@ var result = FindFileName(filename); if (result == null) - throw new FileNotFoundException(filename); + throw new FileNotFoundException(filename); return result; } Modified: trunk/Tests/UserInterfaceTests/GuiStuff.cs =================================================================== --- trunk/Tests/UserInterfaceTests/GuiStuff.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/Tests/UserInterfaceTests/GuiStuff.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -68,7 +68,7 @@ } - foreach (var ctrl in gui.Desktop.Descendants()) + foreach (var ctrl in gui.Desktop.Descendants) ctrl.MouseDown += ctrl_MouseDown; } Modified: trunk/UnitTests/UserInterface/Css/AdapterTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/AdapterTest.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/UnitTests/UserInterface/Css/AdapterTest.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -22,7 +22,7 @@ var style = adapter.GetStyle(window); Assert.AreEqual(Color.Red, style.Data.Font.Color); - DistanceAssert(false, 20, DistanceUnit.FontHeight, style.Data.Position.Left); + DistanceAssert(false, 20, DistanceUnit.FontHeight, style.Data.PositionData.Left); DistanceAssert(false, 4, DistanceUnit.Pixels, style.Data.Padding.Left); DistanceAssert(false, 4, DistanceUnit.Pixels, style.Data.Padding.Right); DistanceAssert(false, 4, DistanceUnit.Pixels, style.Data.Padding.Top); Modified: trunk/UnitTests/UserInterface/Css/LayoutTest.cs =================================================================== --- trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-15 19:27:26 UTC (rev 1462) +++ trunk/UnitTests/UserInterface/Css/LayoutTest.cs 2014-08-16 17:24:43 UTC (rev 1463) @@ -1,22 +1,17 @@ -using AgateLib; -using AgateLib.DisplayLib; +using AgateLib.DisplayLib; +using AgateLib.DisplayLib.ImplementationBase; using AgateLib.Geometry; +using AgateLib.Platform.WindowsForms.ApplicationModels; +using AgateLib.UnitTests.Fakes; using AgateLib.UserInterface.Css.Layout; using AgateLib.UserInterface.Widgets; using AgateLib.UserInterface.Widgets.Tests; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace AgateLib.UserInterface.Css.Tests { - using AgateLib.DisplayLib.ImplementationBase; - using AgateLib.Platform.WindowsForms.ApplicationModels; - using Widgets.Linq; - [TestClass] public class LayoutTest : CssTestBase { @@ -43,14 +38,28 @@ ff.AddFont(new FontSettings(10, FontStyles.Bold), FontSurface.FromImpl(new FakeFontSurface { Height = 8 })); - CssDocument doc = CssDocument.FromText("window { layout: column; margin: 8px; } label { margin-left: 4px; }"); + CssDocument doc = CssDocument.FromText( + "window { layout: column; margin: 6px; padding: 8px;} label { margin-left: 4px; } " + + "window.fixed { position: fixed; right: 4px; bottom: 8px; margin: 0px; padding: 0px;} "); adapter = new CssAdapter(doc, ff); engine = new CssLayoutEngine(adapter); gui = new Gui(new FakeRenderer(), engine); + + Core.Initialize(new FakeAgateFactory()); } + private void RedoLayout() + { + engine.RedoLayout(gui, new Size(1000, 1000)); + foreach (var d in gui.Desktop.Descendants) + { + var style = adapter.GetStyle(d); + style.Animator.Update(1000); + } + } + [TestMethod] public void BoxModel() { @@ -62,7 +71,7 @@ Assert.AreEqual(35, style.BoxModel.Left); } - /* + [TestMethod] public void ColumnLayout() { @@ -74,19 +83,25 @@ wind.Children.Add(new Label("label 3")); gui.Desktop.Children.Add(wind); + RedoLayout(); - engine.RedoLayout(gui); + Assert.AreEqual(new Point(14, 14), wind.ClientRect.Location); + Assert.AreEqual(new Point(18, 14), wind.Children[0].ClientToScreen(Point.Empty)); + Assert.AreEqual(new Point(18, 14 + fh), wind.Children[1].ClientToScreen(Point.Empty)); + } - foreach (var d in wind.Descendants()) - { - var style = adapter.GetStyle(d); - style.Animator.Update(1000); - } - Assert.AreEqual(new Point(8,8), wind.ClientRect.Location); - Assert.AreEqual(new Point(12, 8), wind.Children[0].ClientToScreen(wind.Children[0].ClientRect.Location)); - Assert.AreEqual(new Point(12, 16 + fh), wind.Children[1].ClientToScreen(wind.Children[1].ClientRect.Location)); - }*/ + [TestMethod] + public void FixedPosition() + { + Window wind = new Window() { Style = "fixed" }; + gui.Desktop.Children.Add(wind); + + RedoLayout(); + + Assert.AreEqual(1000 - 4, wind.WidgetRect.Right); + Assert.AreEqual(1000 - 8, wind.WidgetRect.Bottom); + } } [Obsolete] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |