Skip to content

Commit

Permalink
Removed NO_SYSDRAWING in favour of just MINUMAL
Browse files Browse the repository at this point in the history
Reverted changes to GLControl.cs
Updated sln to not build OpenTK.GLControl in MINIMAL mode
  • Loading branch information
dellis1972 committed Aug 12, 2015
1 parent c7e86d4 commit 69e2f36
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 157 deletions.
11 changes: 0 additions & 11 deletions OpenTK.sln
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,12 @@ Global
{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
Expand All @@ -144,14 +142,12 @@ Global
{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
Expand All @@ -166,14 +162,12 @@ Global
{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
Expand Down Expand Up @@ -209,20 +203,15 @@ Global
{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
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Source\Examples\OpenTK.Examples.csproj
EndGlobalSection
EndGlobal
2 changes: 0 additions & 2 deletions Source/GLControl/GLControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,15 +500,13 @@ public Bitmap GrabScreenshot()
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);
GL.ReadPixels(0, 0, this.ClientSize.Width, this.ClientSize.Height, PixelFormat.Bgr, PixelType.UnsignedByte,
data.Scan0);
bmp.UnlockBits(data);
bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);
*/
return bmp;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/INativeWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
using System.Text;
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Input/MouseEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#endregion

using System;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif

Expand Down
43 changes: 0 additions & 43 deletions Source/OpenTK/Math/Point.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,49 +142,6 @@ public Point(int x, int y)
return !left.Equals(right);
}

#if !NO_SYSDRAWING
/// <summary>
/// Converts an OpenTK.Point instance to a System.Drawing.Point.
/// </summary>
/// <param name="point">
/// The <see cref="Point"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="System.Drawing.Point"/> instance equivalent to point.
/// </returns>
public static implicit operator System.Drawing.Point(Point point)
{
return new System.Drawing.Point(point.X, point.Y);
}

/// <summary>
/// Converts a System.Drawing.Point instance to an OpenTK.Point.
/// </summary>
/// <param name="point">
/// The <see cref="System.Drawing.Point"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="Point"/> instance equivalent to point.
/// </returns>
public static implicit operator Point(System.Drawing.Point point)
{
return new Point(point.X, point.Y);
}

/// <summary>
/// Converts an OpenTK.Point instance to a System.Drawing.PointF.
/// </summary>
/// <param name="point">
/// The <see cref="Point"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="System.Drawing.PointF"/> instance equivalent to point.
/// </returns>
public static implicit operator System.Drawing.PointF(Point point)
{
return new System.Drawing.PointF(point.X, point.Y);
}
#endif
/// <summary>
/// Indicates whether this instance is equal to the specified object.
/// </summary>
Expand Down
45 changes: 1 addition & 44 deletions Source/OpenTK/Math/Rectangle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

namespace OpenTK
{
#if MINIMAL
#if MINIMAL
/// <summary>
/// Represents a rectangular region on a two-dimensional plane.
/// </summary>
Expand Down Expand Up @@ -257,49 +257,6 @@ public static Rectangle Union (Rectangle a, Rectangle b)
return new Rectangle(x1, y1, x2 - x1, y2 - y1);
}

#if !NO_SYSDRAWING
/// <summary>
/// Converts an OpenTK.Rectangle instance to a System.Drawing.Rectangle.
/// </summary>
/// <param name="rect">
/// The <see cref="Rectangle"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="System.Drawing.Rectangle"/> instance equivalent to rect.
/// </returns>
public static implicit operator System.Drawing.Rectangle(Rectangle rect)
{
return new System.Drawing.Rectangle(rect.Location, rect.Size);
}

/// <summary>
/// Converts a System.Drawing.Rectangle instance to an OpenTK.Rectangle.
/// </summary>
/// <param name="rect">
/// The <see cref="System.Drawing.Rectangle"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="Rectangle"/> instance equivalent to point.
/// </returns>
public static implicit operator Rectangle(System.Drawing.Rectangle rect)
{
return new Rectangle(rect.Location, rect.Size);
}

/// <summary>
/// Converts an OpenTK.Rectangle instance to a System.Drawing.RectangleF.
/// </summary>
/// <param name="rect">
/// The <see cref="Rectangle"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="System.Drawing.RectangleF"/> instance equivalent to rect.
/// </returns>
public static implicit operator System.Drawing.RectangleF(Rectangle rect)
{
return new System.Drawing.RectangleF(rect.Location, rect.Size);
}
#endif
/// <summary>
/// Indicates whether this instance is equal to the specified object.
/// </summary>
Expand Down
42 changes: 0 additions & 42 deletions Source/OpenTK/Math/Size.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,49 +128,7 @@ public bool IsEmpty
{
return !left.Equals(right);
}
#if !NO_SYSDRAWING
/// <summary>
/// Converts an OpenTK.Size instance to a System.Drawing.Size.
/// </summary>
/// <param name="size">
/// The <see cref="Size"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="System.Drawing.Size"/> instance equivalent to size.
/// </returns>
public static implicit operator System.Drawing.Size(Size size)
{
return new System.Drawing.Size(size.Width, size.Height);
}

/// <summary>
/// Converts a System.Drawing.Size instance to an OpenTK.Size.
/// </summary>
/// <param name="size">
/// The <see cref="System.Drawing.Size"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="Size"/> instance equivalent to size.
/// </returns>
public static implicit operator Size(System.Drawing.Size size)
{
return new Size(size.Width, size.Height);
}

/// <summary>
/// Converts an OpenTK.Point instance to a System.Drawing.SizeF.
/// </summary>
/// <param name="size">
/// The <see cref="Size"/> instance to convert.
/// </param>
/// <returns>
/// A <see cref="System.Drawing.SizeF"/> instance equivalent to size.
/// </returns>
public static implicit operator System.Drawing.SizeF(Size size)
{
return new System.Drawing.SizeF(size.Width, size.Height);
}
#endif
/// <summary>
/// Indicates whether this instance is equal to the specified object.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions Source/OpenTK/Minimal.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
using System.Text;
Expand Down Expand Up @@ -706,7 +706,7 @@ public Bitmap ToBitmap()
public void Dispose()
{ }

internal static Icon ExtractAssociatedIcon (string location)
public static Icon ExtractAssociatedIcon (string location)
{
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
using System.Diagnostics;
using OpenTK;
using OpenTK.Graphics;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif

Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/Linux/LinuxInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
using System.Runtime.InteropServices;
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using System;
using System.Diagnostics;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
using System.Runtime.InteropServices;
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using System.Runtime.InteropServices;
using System;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
using System.Drawing.Imaging;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#endregion

using System;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
using System.Runtime.InteropServices;
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
using System.Runtime.InteropServices;
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/NativeWindowBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
using OpenTK.Input;
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif

Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
using OpenTK.Input;
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
#if ANDROID || IPHONE || MINIMAL
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenTK/Platform/X11/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using System;
using System.Collections.Generic;
#if !NO_SYSDRAWING
#if !MINIMAL
using System.Drawing;
#endif
#if ANDROID || IPHONE || MINIMAL
Expand Down

0 comments on commit 69e2f36

Please sign in to comment.