From c7e86d467b28f2878683e209cd566e37abe15c8c Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Tue, 12 May 2015 21:11:27 +0100 Subject: [PATCH] Fixed MINIMAL and NO_SYSDRAWING compilation --- Documentation/Build.Docs.csproj | 12 ++ Installers/Nsis/Build.Installer.Nsis.csproj | 14 +- Installers/Nuget/Build.Installer.Nuget.csproj | 14 +- Installers/Zip/Build.Installer.Zip.csproj | 14 +- OpenTK.sln | 125 ++++++++++++------ Source/Bind/Generator.Bind.csproj | 29 ++++ .../Build.UpdateVersion.csproj | 16 ++- .../Compatibility/OpenTK.Compatibility.csproj | 36 ++++- Source/Converter/Generator.Convert.csproj | 30 +++++ Source/Examples/OpenTK.Examples.csproj | 34 ++++- Source/GLControl/GLControl.cs | 4 +- Source/GLControl/OpenTK.GLControl.csproj | 35 ++++- .../Generator.Rewrite.csproj | 23 +++- Source/OpenTK/INativeWindow.cs | 2 + Source/OpenTK/Input/MouseEventArgs.cs | 2 + Source/OpenTK/Math/Point.cs | 3 +- Source/OpenTK/Math/Rectangle.cs | 32 ++++- Source/OpenTK/Math/Size.cs | 4 +- Source/OpenTK/Minimal.cs | 40 ++++++ Source/OpenTK/OpenTK.csproj | 46 ++++++- .../Platform/Linux/LinuxDisplayDriver.cs | 7 +- Source/OpenTK/Platform/Linux/LinuxInput.cs | 2 + .../Platform/Linux/LinuxNativeWindow.cs | 2 + Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs | 5 +- Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs | 2 + .../Platform/MacOS/CocoaNativeWindow.cs | 20 +-- Source/OpenTK/Platform/NativeWindowBase.cs | 2 + .../Platform/SDL2/Sdl2DisplayDeviceDriver.cs | 2 + Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs | 2 + .../OpenTK/Platform/SDL2/Sdl2NativeWindow.cs | 2 + Source/OpenTK/Platform/Windows/WinGLNative.cs | 5 +- Source/OpenTK/Platform/X11/Functions.cs | 2 + .../Test.API.Desktop/Test.API.Desktop.csproj | 20 +++ 33 files changed, 518 insertions(+), 70 deletions(-) diff --git a/Documentation/Build.Docs.csproj b/Documentation/Build.Docs.csproj index fd011c16..44a182ab 100644 --- a/Documentation/Build.Docs.csproj +++ b/Documentation/Build.Docs.csproj @@ -53,6 +53,18 @@ Source 4 + + none + false + Source + 4 + + + none + false + Source + 4 + diff --git a/Installers/Nsis/Build.Installer.Nsis.csproj b/Installers/Nsis/Build.Installer.Nsis.csproj index 756f4692..d1ed896a 100644 --- a/Installers/Nsis/Build.Installer.Nsis.csproj +++ b/Installers/Nsis/Build.Installer.Nsis.csproj @@ -19,7 +19,7 @@ v2.0 Debug AnyCPU - 10.0.0 + 8.0.30703 2.0 Exe Build.Installer.Nsis @@ -44,6 +44,18 @@ False 4 + + none + false + . + 4 + + + none + false + . + 4 + diff --git a/Installers/Nuget/Build.Installer.Nuget.csproj b/Installers/Nuget/Build.Installer.Nuget.csproj index da07d76e..14b84b38 100644 --- a/Installers/Nuget/Build.Installer.Nuget.csproj +++ b/Installers/Nuget/Build.Installer.Nuget.csproj @@ -18,7 +18,7 @@ .\obj\ Debug AnyCPU - 10.0.0 + 8.0.30703 2.0 Exe Build.Installer.Nuget @@ -47,6 +47,18 @@ obj\ 4 + + none + false + obj\ + 4 + + + none + false + obj\ + 4 + diff --git a/Installers/Zip/Build.Installer.Zip.csproj b/Installers/Zip/Build.Installer.Zip.csproj index ba325bef..44693159 100644 --- a/Installers/Zip/Build.Installer.Zip.csproj +++ b/Installers/Zip/Build.Installer.Zip.csproj @@ -18,7 +18,7 @@ .\opentk\ Debug AnyCPU - 10.0.0 + 8.0.30703 2.0 Exe Build.Installer.Zip @@ -47,6 +47,18 @@ opentk\ 4 + + none + false + opentk\ + 4 + + + none + false + opentk\ + 4 + diff --git a/OpenTK.sln b/OpenTK.sln index 91151b38..a7ef0161 100644 --- a/OpenTK.sln +++ b/OpenTK.sln @@ -1,5 +1,6 @@ + Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2012 +# Visual Studio 2010 VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK", "Source\OpenTK\OpenTK.csproj", "{A37A7E14-0000-0000-0000-000000000000}" @@ -85,92 +86,138 @@ Global Documentation|Any CPU = Documentation|Any CPU Nsis|Any CPU = Nsis|Any CPU Release|Any CPU = Release|Any CPU + DebugMinimal|Any CPU = DebugMinimal|Any CPU + ReleaseMinimal|Any CPU = ReleaseMinimal|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A37A7E14-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A37A7E14-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A37A7E14-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {A37A7E14-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {A37A7E14-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {A37A7E14-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A37A7E14-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {A625BE88-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A625BE88-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A625BE88-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {A625BE88-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {A625BE88-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {A625BE88-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A625BE88-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {ADC34399-7613-44D2-90B2-19250F06FE7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ADC34399-7613-44D2-90B2-19250F06FE7A}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {ADC34399-7613-44D2-90B2-19250F06FE7A}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {ADC34399-7613-44D2-90B2-19250F06FE7A}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {ADC34399-7613-44D2-90B2-19250F06FE7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {650C6F3D-33B5-4216-9536-956AB42C0624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {650C6F3D-33B5-4216-9536-956AB42C0624}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {650C6F3D-33B5-4216-9536-956AB42C0624}.Documentation|Any CPU.Build.0 = Documentation|Any CPU - {650C6F3D-33B5-4216-9536-956AB42C0624}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {650C6F3D-33B5-4216-9536-956AB42C0624}.Release|Any CPU.ActiveCfg = Release|Any CPU {31D19132-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {31D19132-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31D19132-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU + {31D19132-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {31D19132-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {31D19132-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {31D19132-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {31D19132-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU {31D19132-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {31D19132-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {31D19132-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU {5FDFF4B6-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5FDFF4B6-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {5FDFF4B6-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {5FDFF4B6-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {5FDFF4B6-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {5FDFF4B6-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU {5FDFF4B6-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.DebugMinimal|Any CPU.ActiveCfg = DebugMinimal|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.Documentation|Any CPU.Build.0 = Documentation|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.Release|Any CPU.ActiveCfg = Release|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Release|Any CPU.ActiveCfg = Release|Any CPU {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Release|Any CPU.Build.0 = Release|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {868E37B3-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU + {868E37B3-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {868E37B3-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {868E37B3-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = DebugMinimal|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = DebugMinimal|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {A37A7E14-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU + {A625BE88-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A625BE88-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A625BE88-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU + {A625BE88-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU + {A625BE88-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {A625BE88-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {A625BE88-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {A625BE88-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A625BE88-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {A625BE88-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {A625BE88-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7A}.DebugMinimal|Any CPU.ActiveCfg = DebugMinimal|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7A}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7A}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7A}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7A}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7B}.DebugMinimal|Any CPU.ActiveCfg = DebugMinimal|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADC34399-7613-44D2-90B2-19250F06FE7B}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU {ADC34399-7613-44D2-90B2-19250F12FE7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADC34399-7613-44D2-90B2-19250F12FE7B}.DebugMinimal|Any CPU.ActiveCfg = DebugMinimal|Any CPU {ADC34399-7613-44D2-90B2-19250F12FE7B}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {ADC34399-7613-44D2-90B2-19250F12FE7B}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {ADC34399-7613-44D2-90B2-19250F12FE7B}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {ADC34399-7613-44D2-90B2-19250F12FE7B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADC34399-7613-44D2-90B2-19250F12FE7B}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU + {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.Nsis|Any CPU.ActiveCfg = Release|Any CPU {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.Nsis|Any CPU.Build.0 = Release|Any CPU {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.Release|Any CPU.ActiveCfg = Release|Any CPU {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.Release|Any CPU.Build.0 = Release|Any CPU + {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {C426C9D1-8857-4E52-BAC7-4C05EE6070AB}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU + {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Documentation|Any CPU.Build.0 = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Nsis|Any CPU.ActiveCfg = Release|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Nsis|Any CPU.Build.0 = Release|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Release|Any CPU.ActiveCfg = Release|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Release|Any CPU.Build.0 = Release|Any CPU + {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU + {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Source/Bind/Generator.Bind.csproj b/Source/Bind/Generator.Bind.csproj index 9c1e0c13..3b5ceab5 100644 --- a/Source/Bind/Generator.Bind.csproj +++ b/Source/Bind/Generator.Bind.csproj @@ -268,6 +268,35 @@ + + true + full + false + ..\..\Binaries\Tools\Debug\ + DEBUG;TRACE; + 4 + AllRules.ruleset + False + False + 4096 + 285212672 + + + + + none + true + ..\..\Binaries\Tools\Release\ + TRACE; + 4 + AllRules.ruleset + False + False + 4096 + 285212672 + + + diff --git a/Source/Build.UpdateVersion/Build.UpdateVersion.csproj b/Source/Build.UpdateVersion/Build.UpdateVersion.csproj index 2c2a275d..5bfe1958 100644 --- a/Source/Build.UpdateVersion/Build.UpdateVersion.csproj +++ b/Source/Build.UpdateVersion/Build.UpdateVersion.csproj @@ -8,7 +8,7 @@ v2.0 Debug AnyCPU - 10.0.0 + 8.0.30703 2.0 @@ -50,6 +50,20 @@ + + true + full + false + ..\..\Binaries\Tools\Debug\ + TRACE;DEBUG + 4 + + + true + ..\..\Binaries\Tools\Release\ + TRACE + 4 + diff --git a/Source/Compatibility/OpenTK.Compatibility.csproj b/Source/Compatibility/OpenTK.Compatibility.csproj index 2bd5ca0c..034ac72c 100644 --- a/Source/Compatibility/OpenTK.Compatibility.csproj +++ b/Source/Compatibility/OpenTK.Compatibility.csproj @@ -2,7 +2,7 @@ Local - 8.0.50727 + 8.0.30703 2.0 {62C0DB35-0000-0000-0000-000000000000} Debug @@ -481,4 +481,38 @@ + + true + full + false + ..\..\Binaries\OpenTK\Debug\ + DEBUG;TRACE; + 4 + AllRules.ruleset + 0219, 0414, 0612, 0618, 1591, 3005, 3006 + true + False + 285212672 + + + False + 4096 + + + true + pdbonly + true + ..\..\Binaries\OpenTK\Release\ + TRACE; + 4 + AllRules.ruleset + 0219, 0414, 0612, 0618, 1591, 3005, 3006 + true + False + 285212672 + + + False + 4096 + \ No newline at end of file diff --git a/Source/Converter/Generator.Convert.csproj b/Source/Converter/Generator.Convert.csproj index 67d55f21..aae98927 100644 --- a/Source/Converter/Generator.Convert.csproj +++ b/Source/Converter/Generator.Convert.csproj @@ -143,4 +143,34 @@ + + true + full + false + ..\..\Binaries\Tools\Debug\ + DEBUG;TRACE; + 4 + -p:gl -v:4.5 -t:xml -o:../../../Source/Bind/Specifications/GL2/signatures.xml https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml + AllRules.ruleset + False + False + + + 4096 + 285212672 + + + none + true + ..\..\Binaries\Tools\Release\ + TRACE; + 4 + AllRules.ruleset + False + False + 4096 + 285212672 + + + \ No newline at end of file diff --git a/Source/Examples/OpenTK.Examples.csproj b/Source/Examples/OpenTK.Examples.csproj index cca433b0..aed28743 100644 --- a/Source/Examples/OpenTK.Examples.csproj +++ b/Source/Examples/OpenTK.Examples.csproj @@ -2,7 +2,7 @@ Local - 8.0.50727 + 8.0.30703 2.0 {868E37B3-0000-0000-0000-000000000000} Debug @@ -640,4 +640,36 @@ + + true + full + false + ..\..\Binaries\OpenTK\Debug\ + DEBUG;TRACE; + 4 + true + AllRules.ruleset + False + 285212672 + 4096 + False + + + + + true + pdbonly + true + ..\..\Binaries\OpenTK\Release\ + TRACE; + 4 + true + AllRules.ruleset + False + 285212672 + 4096 + False + + + \ No newline at end of file diff --git a/Source/GLControl/GLControl.cs b/Source/GLControl/GLControl.cs index faba119d..b5073312 100644 --- a/Source/GLControl/GLControl.cs +++ b/Source/GLControl/GLControl.cs @@ -500,6 +500,7 @@ namespace OpenTK ValidateContext("GrabScreenshot()"); Bitmap bmp = new Bitmap(this.ClientSize.Width, this.ClientSize.Height); + /* System.Drawing.Imaging.BitmapData data = bmp.LockBits(this.ClientRectangle, System.Drawing.Imaging.ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format24bppRgb); @@ -507,7 +508,8 @@ namespace OpenTK data.Scan0); bmp.UnlockBits(data); bmp.RotateFlip(RotateFlipType.RotateNoneFlipY); - return bmp; +*/ + return bmp; } #endregion diff --git a/Source/GLControl/OpenTK.GLControl.csproj b/Source/GLControl/OpenTK.GLControl.csproj index b9753496..40bcd96f 100644 --- a/Source/GLControl/OpenTK.GLControl.csproj +++ b/Source/GLControl/OpenTK.GLControl.csproj @@ -2,7 +2,7 @@ Local - 8.0.50727 + 8.0.30703 2.0 {A625BE88-0000-0000-0000-000000000000} Debug @@ -191,4 +191,37 @@ + + true + full + false + ..\..\Binaries\OpenTK\Debug\ + DEBUG;TRACE; + 4 + ..\..\Binaries\OpenTK\Debug\OpenTK.GLControl.xml + AllRules.ruleset + true + False + 285212672 + + + False + 4096 + + + none + true + ..\..\Binaries\OpenTK\Release\ + TRACE; + 4 + ..\..\Binaries\OpenTK\Release\OpenTK.GLControl.xml + AllRules.ruleset + true + False + 285212672 + + + False + 4096 + \ No newline at end of file diff --git a/Source/Generator.Rewrite/Generator.Rewrite.csproj b/Source/Generator.Rewrite/Generator.Rewrite.csproj index bd14a051..e24553a2 100644 --- a/Source/Generator.Rewrite/Generator.Rewrite.csproj +++ b/Source/Generator.Rewrite/Generator.Rewrite.csproj @@ -11,7 +11,7 @@ Rewrite v3.5 512 - 12.0.0 + 8.0.30703 2.0 @@ -41,6 +41,27 @@ ..\..\OpenTK.snk + + true + full + false + ..\..\Binaries\Tools\Debug\ + DEBUG;TRACE + prompt + 4 + ../../OpenTK/Debug/OpenTK.dll ../../../OpenTK.snk -debug + AnyCPU + + + pdbonly + true + ..\..\Binaries\Tools\Release\ + TRACE + prompt + 4 + ../../OpenTK/Release/OpenTK.dll ../../../OpenTK.snk + AnyCPU + ..\..\Dependencies\managed\Mono.Cecil.dll diff --git a/Source/OpenTK/INativeWindow.cs b/Source/OpenTK/INativeWindow.cs index 4535c60e..765ba672 100644 --- a/Source/OpenTK/INativeWindow.cs +++ b/Source/OpenTK/INativeWindow.cs @@ -28,7 +28,9 @@ using System; using System.Collections.Generic; using System.ComponentModel; +#if !NO_SYSDRAWING using System.Drawing; +#endif using System.Text; using OpenTK.Platform; diff --git a/Source/OpenTK/Input/MouseEventArgs.cs b/Source/OpenTK/Input/MouseEventArgs.cs index a8a9137c..274d05df 100644 --- a/Source/OpenTK/Input/MouseEventArgs.cs +++ b/Source/OpenTK/Input/MouseEventArgs.cs @@ -28,7 +28,9 @@ #endregion using System; +#if !NO_SYSDRAWING using System.Drawing; +#endif namespace OpenTK.Input { diff --git a/Source/OpenTK/Math/Point.cs b/Source/OpenTK/Math/Point.cs index 3fad9e1e..682bd02d 100644 --- a/Source/OpenTK/Math/Point.cs +++ b/Source/OpenTK/Math/Point.cs @@ -142,6 +142,7 @@ namespace OpenTK return !left.Equals(right); } +#if !NO_SYSDRAWING /// /// Converts an OpenTK.Point instance to a System.Drawing.Point. /// @@ -183,7 +184,7 @@ namespace OpenTK { return new System.Drawing.PointF(point.X, point.Y); } - +#endif /// /// Indicates whether this instance is equal to the specified object. /// diff --git a/Source/OpenTK/Math/Rectangle.cs b/Source/OpenTK/Math/Rectangle.cs index b414b535..afc4269b 100644 --- a/Source/OpenTK/Math/Rectangle.cs +++ b/Source/OpenTK/Math/Rectangle.cs @@ -181,6 +181,20 @@ namespace OpenTK return new Rectangle(new Point(left, top), new Size(right - left, bottom - top)); } + /// + /// Tests whether this instance contains the specified x, y coordinates. + /// + /// The x coordinate to test. + /// The y coordinate to test. + /// True if this instance contains the x, y coordinates; false otherwise. + /// The left and top edges are inclusive. The right and bottom edges + /// are exclusive. + public bool Contains(int x, int y) + { + return x >= Left && x < Right && + y >= Top && y < Bottom; + } + /// /// Tests whether this instance contains the specified Point. /// @@ -228,6 +242,22 @@ namespace OpenTK return !left.Equals(right); } + /// + /// Union the specified a and b. + /// + /// The alpha component. + /// The blue component. + public static Rectangle Union (Rectangle a, Rectangle b) + { + int x1 = Math.Min(a.X, b.X); + int x2 = Math.Max(a.X + a.Width, b.X + b.Width); + int y1 = Math.Min(a.Y, b.Y); + int y2 = Math.Max(a.Y + a.Height, b.Y + b.Height); + + return new Rectangle(x1, y1, x2 - x1, y2 - y1); + } + +#if !NO_SYSDRAWING /// /// Converts an OpenTK.Rectangle instance to a System.Drawing.Rectangle. /// @@ -269,7 +299,7 @@ namespace OpenTK { return new System.Drawing.RectangleF(rect.Location, rect.Size); } - +#endif /// /// Indicates whether this instance is equal to the specified object. /// diff --git a/Source/OpenTK/Math/Size.cs b/Source/OpenTK/Math/Size.cs index 5b0ef87f..ca552449 100644 --- a/Source/OpenTK/Math/Size.cs +++ b/Source/OpenTK/Math/Size.cs @@ -128,7 +128,7 @@ namespace OpenTK { return !left.Equals(right); } - +#if !NO_SYSDRAWING /// /// Converts an OpenTK.Size instance to a System.Drawing.Size. /// @@ -170,7 +170,7 @@ namespace OpenTK { return new System.Drawing.SizeF(size.Width, size.Height); } - +#endif /// /// Indicates whether this instance is equal to the specified object. /// diff --git a/Source/OpenTK/Minimal.cs b/Source/OpenTK/Minimal.cs index f51ce84d..7ef93022 100644 --- a/Source/OpenTK/Minimal.cs +++ b/Source/OpenTK/Minimal.cs @@ -1,6 +1,8 @@ using System; using System.Collections.Generic; +#if !NO_SYSDRAWING using System.Drawing; +#endif using System.Text; #if IPHONE || ANDROID || MINIMAL @@ -71,6 +73,14 @@ namespace OpenTK return TimeSpan.FromTicks(stop.Ticks - start.Ticks); } } +#if MINIMAL + public static Stopwatch StartNew () + { + var sw = new Stopwatch(); + sw.Start(); + return sw; + } +#endif } // System.Xml.XmlIgnoreAttribute @@ -695,6 +705,11 @@ namespace OpenTK public void Dispose() { } + + internal static Icon ExtractAssociatedIcon (string location) + { + return null; + } } #endregion @@ -704,6 +719,10 @@ namespace OpenTK public abstract class Image : IDisposable { public void Dispose() { } + + internal void Save(System.IO.Stream s, ImageFormat fomat) + { + } } #endregion @@ -724,6 +743,13 @@ namespace OpenTK this.height = height; } + internal Bitmap(int width, int height, int stride, PixelFormat format, IntPtr pixels) + { + // TODO: Complete member initialization + this.width = width; + this.height = height; + } + public int Width { get { return width; } } public int Height { get { return height; } } @@ -740,6 +766,16 @@ namespace OpenTK { return new BitmapData(Width, Height, 0); } + + internal static int GetPixelFormatSize (PixelFormat format) + { + return 0; + } + + internal IntPtr GetHicon () + { + return IntPtr.Zero; + } } #endregion @@ -1641,6 +1677,10 @@ namespace OpenTK Format32bppArgb } + enum ImageFormat { + Png + } + #endregion #region SystemEvents diff --git a/Source/OpenTK/OpenTK.csproj b/Source/OpenTK/OpenTK.csproj index ef234f47..a853306f 100644 --- a/Source/OpenTK/OpenTK.csproj +++ b/Source/OpenTK/OpenTK.csproj @@ -58,6 +58,23 @@ True full + + true + 285212672 + + + DEBUG;TRACE;MINIMAL;NO_SYSDRAWING + ..\..\Binaries\OpenTK\DebugMinimal\OpenTK.xml + 4096 + false + ..\..\Binaries\OpenTK\DebugMinimal\ + False + False + 4 + AllRules.ruleset + True + full + True 285212672 @@ -75,6 +92,23 @@ True pdbonly + + true + 285212672 + + + TRACE;MINIMAL;NO_SYSDRAWING + ..\..\Binaries\OpenTK\ReleaseMinimal\OpenTK.xml + 4096 + true + ..\..\Binaries\OpenTK\ReleaseMinimal\ + False + False + 4 + AllRules.ruleset + True + pdbonly + ..\..\Binaries\OpenTK\Release\ True @@ -117,7 +151,7 @@ System.Data - + System.Drawing @@ -835,9 +869,13 @@ - - - + + + + + + + diff --git a/Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs b/Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs index d347a6aa..459b8ac7 100644 --- a/Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs +++ b/Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs @@ -32,6 +32,9 @@ using System.Collections.Generic; using System.Diagnostics; using OpenTK; using OpenTK.Graphics; +#if !NO_SYSDRAWING +using System.Drawing; +#endif namespace OpenTK.Platform.Linux { @@ -284,7 +287,7 @@ namespace OpenTK.Platform.Linux Debug.Print("Current mode: {0}", current.ToString()); } - System.Drawing.Rectangle GetBounds(DisplayResolution current) + Rectangle GetBounds(DisplayResolution current) { // Note: since we are not running a display manager, we are free // to choose the display layout for multiple displays ourselves. @@ -294,7 +297,7 @@ namespace OpenTK.Platform.Linux 0 : AvailableDevices[AvailableDevices.Count - 1].Bounds.Right; int y = 0; - return new System.Drawing.Rectangle( + return new Rectangle( x, y, current.Width, current.Height); } diff --git a/Source/OpenTK/Platform/Linux/LinuxInput.cs b/Source/OpenTK/Platform/Linux/LinuxInput.cs index ddca85f5..a88d48a0 100644 --- a/Source/OpenTK/Platform/Linux/LinuxInput.cs +++ b/Source/OpenTK/Platform/Linux/LinuxInput.cs @@ -30,7 +30,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; +#if !NO_SYSDRAWING using System.Drawing; +#endif using System.Runtime.InteropServices; using System.Threading; using OpenTK.Input; diff --git a/Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs b/Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs index db8ebd1c..b00cfad7 100644 --- a/Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs +++ b/Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs @@ -29,7 +29,9 @@ using System; using System.Diagnostics; +#if !NO_SYSDRAWING using System.Drawing; +#endif using System.Runtime.InteropServices; using OpenTK.Graphics; using OpenTK.Input; diff --git a/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs b/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs index 8357de3d..93810dc0 100644 --- a/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs +++ b/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs @@ -29,7 +29,10 @@ using System.Runtime.InteropServices; using System; +#if !NO_SYSDRAWING using System.Drawing; +using System.Drawing.Imaging; +#endif namespace OpenTK.Platform.MacOS { @@ -204,7 +207,7 @@ namespace OpenTK.Platform.MacOS { using (System.IO.MemoryStream s = new System.IO.MemoryStream()) { - img.Save(s, System.Drawing.Imaging.ImageFormat.Png); + img.Save(s, ImageFormat.Png); byte[] b = s.ToArray(); fixed (byte* pBytes = b) diff --git a/Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs b/Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs index 84750d62..d702fd04 100644 --- a/Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs +++ b/Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs @@ -28,7 +28,9 @@ #endregion using System; +#if !NO_SYSDRAWING using System.Drawing; +#endif using System.Runtime.InteropServices; namespace OpenTK.Platform.MacOS diff --git a/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs b/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs index 15856d9a..d0f824ab 100644 --- a/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs +++ b/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs @@ -30,7 +30,9 @@ using System; using System.ComponentModel; using System.Diagnostics; +#if !NO_SYSDRAWING using System.Drawing; +#endif using System.Runtime.InteropServices; using System.Threading; using OpenTK.Graphics; @@ -132,7 +134,7 @@ namespace OpenTK.Platform.MacOS private bool disposed = false; private bool exists; private bool cursorVisible = true; - private System.Drawing.Icon icon; + private Icon icon; private WindowBorder windowBorder = WindowBorder.Resizable; private Nullable deferredWindowBorder; private Nullable previousWindowBorder; @@ -197,7 +199,7 @@ namespace OpenTK.Platform.MacOS Cocoa.SendIntPtr(Class.Get("NSScreen"), Selector.Get("screens")), Selector.Get("objectAtIndex:"), 0), Selector.Get("frame")); - var contentRect = new System.Drawing.RectangleF(x, screenRect.Height - height - y, width, height); + var contentRect = new RectangleF(x, screenRect.Height - height - y, width, height); var style = GetStyleMask(windowBorder); var bufferingType = NSBackingStore.Buffered; @@ -727,7 +729,7 @@ namespace OpenTK.Platform.MacOS } } - public override System.Drawing.Point PointToClient(System.Drawing.Point point) + public override Point PointToClient(Point point) { var r = Cocoa.SendRect(windowInfo.ViewHandle, selConvertRectToBacking, @@ -736,7 +738,7 @@ namespace OpenTK.Platform.MacOS return new Point((int)r.X, (int)(Height - r.Y)); } - public override System.Drawing.Point PointToScreen(System.Drawing.Point point) + public override Point PointToScreen(Point point) { var r = Cocoa.SendRect(windowInfo.Handle, selConvertRectToScreen, @@ -745,7 +747,7 @@ namespace OpenTK.Platform.MacOS return new Point((int)r.X, (int)(GetCurrentScreenFrame().Height - r.Y)); } - public override System.Drawing.Icon Icon + public override Icon Icon { get { return icon; } set @@ -975,7 +977,7 @@ namespace OpenTK.Platform.MacOS return (NSWindowStyle)0; } - public override System.Drawing.Rectangle Bounds + public override Rectangle Bounds { get { @@ -998,7 +1000,7 @@ namespace OpenTK.Platform.MacOS } } - private System.Drawing.RectangleF InternalBounds + private RectangleF InternalBounds { get { @@ -1010,7 +1012,7 @@ namespace OpenTK.Platform.MacOS } } - public override System.Drawing.Size ClientSize + public override Size ClientSize { get { @@ -1020,7 +1022,7 @@ namespace OpenTK.Platform.MacOS } set { - var r_scaled = Cocoa.SendRect(windowInfo.Handle, selConvertRectFromBacking, new RectangleF(PointF.Empty, value)); + var r_scaled = Cocoa.SendRect(windowInfo.Handle, selConvertRectFromBacking, new RectangleF(PointF.Empty, new SizeF (value.Width, value.Height))); var r = Cocoa.SendRect(windowInfo.Handle, selFrameRectForContentRect, r_scaled); Size = new Size((int)r.Width, (int)r.Height); } diff --git a/Source/OpenTK/Platform/NativeWindowBase.cs b/Source/OpenTK/Platform/NativeWindowBase.cs index 231d8f32..071c1fca 100644 --- a/Source/OpenTK/Platform/NativeWindowBase.cs +++ b/Source/OpenTK/Platform/NativeWindowBase.cs @@ -30,7 +30,9 @@ using System; using System.ComponentModel; using System.Diagnostics; +#if !NO_SYSDRAWING using System.Drawing; +#endif using OpenTK.Input; namespace OpenTK.Platform diff --git a/Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs b/Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs index 4cf53446..94500bb8 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs @@ -28,7 +28,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; +#if !NO_SYSDRAWING using System.Drawing; +#endif namespace OpenTK.Platform.SDL2 { diff --git a/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs b/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs index b3f8ec45..9fbf5f84 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs @@ -28,7 +28,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; +#if !NO_SYSDRAWING using System.Drawing; +#endif using OpenTK.Input; namespace OpenTK.Platform.SDL2 diff --git a/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs b/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs index e024abd5..f19ed6e2 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs @@ -28,7 +28,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; +#if !NO_SYSDRAWING using System.Drawing; +#endif #if ANDROID || IPHONE || MINIMAL using OpenTK.Minimal; #else diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index 00a61815..1d24322d 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -35,6 +35,7 @@ using System.Collections.Generic; using System.IO; #if !MINIMAL using System.Drawing; +using System.Drawing.Imaging; #endif namespace OpenTK.Platform.Windows @@ -1146,7 +1147,7 @@ namespace OpenTK.Platform.Windows else { var stride = value.Width * - (Bitmap.GetPixelFormatSize(System.Drawing.Imaging.PixelFormat.Format32bppArgb) / 8); + (Bitmap.GetPixelFormatSize(PixelFormat.Format32bppArgb) / 8); Bitmap bmp; unsafe @@ -1154,7 +1155,7 @@ namespace OpenTK.Platform.Windows fixed (byte* pixels = value.Data) { bmp = new Bitmap(value.Width, value.Height, stride, - System.Drawing.Imaging.PixelFormat.Format32bppArgb, + PixelFormat.Format32bppArgb, new IntPtr(pixels)); } } diff --git a/Source/OpenTK/Platform/X11/Functions.cs b/Source/OpenTK/Platform/X11/Functions.cs index eaa6380f..dffaf349 100644 --- a/Source/OpenTK/Platform/X11/Functions.cs +++ b/Source/OpenTK/Platform/X11/Functions.cs @@ -8,7 +8,9 @@ using System; using System.Collections.Generic; +#if !NO_SYSDRAWING using System.Drawing; +#endif #if ANDROID || IPHONE || MINIMAL using OpenTK.Minimal; #else diff --git a/Source/Tests/Test.API.Desktop/Test.API.Desktop.csproj b/Source/Tests/Test.API.Desktop/Test.API.Desktop.csproj index 580939f5..5c6b7eab 100644 --- a/Source/Tests/Test.API.Desktop/Test.API.Desktop.csproj +++ b/Source/Tests/Test.API.Desktop/Test.API.Desktop.csproj @@ -31,6 +31,26 @@ false true + + true + full + false + ..\..\..\Binaries\Tests\Debug + DEBUG; + prompt + 4 + false + true + + + full + true + ..\..\..\Binaries\Tests\Release + prompt + 4 + false + true +