Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netstandard ios #22

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3322991
Initial merge
Oct 16, 2017
6576970
Add OpenTK.NS20 project to the sln
Oct 16, 2017
8f7ac53
Update NS20 project
Oct 16, 2017
7326c3a
Attempt to fix up X11 marshalling
smoogipoo Oct 19, 2017
ee04540
Oops, fix infinite recursion
smoogipoo Oct 19, 2017
9517513
Marshal strings as Unicode from Cocoa, fixing text input
smoogipoo Oct 19, 2017
0f86c6e
Make Generator.Rewrite runnable again
smoogipoo Oct 19, 2017
c16bf08
Merge remote-tracking branch 'origin/develop' into netstandard
smoogipoo Feb 8, 2018
8ec577b
Fixes an issue on macOS where having unprocessed events on the event …
swoolcock Feb 8, 2018
db26931
Make build script not fail
peppy Mar 24, 2018
3ddd579
Add nuget metadata
peppy Mar 24, 2018
80c1545
Remove unnecessary dependencies
peppy Mar 24, 2018
3d9909c
Add project URL
peppy Mar 24, 2018
b5bcfb2
PInvoke bitmap functions
smoogipoo Mar 26, 2018
f87559a
Rewrite/remove most minimal stuff
smoogipoo Mar 26, 2018
bade619
Fix GDI+ still not working
smoogipoo Mar 26, 2018
eefb041
Merge remote-tracking branch 'opentk/develop' into netstandard
smoogipoo Mar 26, 2018
d8338fd
Bump version
smoogipoo Mar 26, 2018
5a83c4e
Fix registry key lookups (fixes raw input)
smoogipoo Mar 26, 2018
c2b97c4
Bump nupkg version
smoogipoo Mar 26, 2018
68dbfcb
Fix incorrect dragdrop string marshalling
smoogipoo Mar 27, 2018
a8817c2
Don't allow bounds to be set when window not present
jai-x Apr 10, 2018
21e3bce
Merge pull request #16 from jai-sharma/patch-1
smoogipoo May 18, 2018
92aa625
Update package version
smoogipoo May 18, 2018
03282db
Merge pull request #18 from smoogipoo/update-pkg
peppy May 18, 2018
1ae4c55
Expose precise scrolling capability (macOS only)
Tom94 Jun 1, 2018
830a7ff
Merge HasPreciseScroll into RawMouseFlags
Tom94 Jun 3, 2018
d25529a
Make NSFloat always be of type double
Tom94 Jun 4, 2018
f8c793c
Merge pull request #19 from Tom94/precise-scrolling
peppy Jun 4, 2018
a82412f
Fix broken hidden cursor on macOS under release builds
Tom94 Jun 4, 2018
542ba1d
Fix broken debug string
Tom94 Jun 4, 2018
466a761
Merge pull request #20 from Tom94/precise-scrolling
peppy Jun 6, 2018
9bba36d
Remove all references to System.Drawing.Color
smoogipoo Jun 27, 2018
98b3f28
Remove iOS platform
smoogipoo Jun 27, 2018
0fd1524
Redirect bindings TEMPORARILY
smoogipoo Jun 27, 2018
6233d50
Fix unmatching preprocessor directives
smoogipoo Jun 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove all references to System.Drawing.Color
  • Loading branch information
smoogipoo committed Jun 27, 2018
commit 9bba36d6d81224504acc7fb26f703f1673d98702
24 changes: 0 additions & 24 deletions src/OpenTK/Graphics/Color4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,30 +122,6 @@ public int ToArgb()
return !left.Equals(right);
}

/// <summary>
/// Converts the specified System.Drawing.Color to a Color4 structure.
/// </summary>
/// <param name="color">The System.Drawing.Color to convert.</param>
/// <returns>A new Color4 structure containing the converted components.</returns>
public static implicit operator Color4(Color color)
{
return new Color4(color.R, color.G, color.B, color.A);
}

/// <summary>
/// Converts the specified Color4 to a System.Drawing.Color structure.
/// </summary>
/// <param name="color">The Color4 to convert.</param>
/// <returns>A new System.Drawing.Color structure containing the converted components.</returns>
public static explicit operator Color(Color4 color)
{
return Color.FromArgb(
(int)(color.A * Byte.MaxValue),
(int)(color.R * Byte.MaxValue),
(int)(color.G * Byte.MaxValue),
(int)(color.B * Byte.MaxValue));
}

/// <summary>
/// Compares whether this Color4 structure is equal to the specified object.
/// </summary>
Expand Down
10 changes: 0 additions & 10 deletions src/OpenTK/Graphics/ES20/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,11 @@ protected override object SyncRoot
// Note: Mono 1.9.1 truncates StringBuilder results (for 'out string' parameters).
// We work around this issue by doubling the StringBuilder capacity.

public static void ClearColor(Color color)
{
GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
}

public static void ClearColor(Color4 color)
{
GL.ClearColor(color.R, color.G, color.B, color.A);
}

public static void BlendColor(Color color)
{
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
}

public static void BlendColor(Color4 color)
{
GL.BlendColor(color.R, color.G, color.B, color.A);
Expand Down
10 changes: 0 additions & 10 deletions src/OpenTK/Graphics/ES30/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,11 @@ protected override object SyncRoot
// Note: Mono 1.9.1 truncates StringBuilder results (for 'out string' parameters).
// We work around this issue by doubling the StringBuilder capacity.

public static void ClearColor(Color color)
{
GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
}

public static void ClearColor(Color4 color)
{
GL.ClearColor(color.R, color.G, color.B, color.A);
}

public static void BlendColor(Color color)
{
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
}

public static void BlendColor(Color4 color)
{
GL.BlendColor(color.R, color.G, color.B, color.A);
Expand Down
145 changes: 40 additions & 105 deletions src/OpenTK/Graphics/OpenGL/GLHelper.cs

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions src/OpenTK/Graphics/OpenGL4/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,11 @@ protected override object SyncRoot
// Note: Mono 1.9.1 truncates StringBuilder results (for 'out string' parameters).
// We work around this issue by doubling the StringBuilder capacity.

public static void ClearColor(Color color)
{
GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
}

public static void ClearColor(Color4 color)
{
GL.ClearColor(color.R, color.G, color.B, color.A);
}

public static void BlendColor(Color color)
{
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
}

public static void BlendColor(Color4 color)
{
GL.BlendColor(color.R, color.G, color.B, color.A);
Expand Down
15 changes: 5 additions & 10 deletions src/OpenTK/Minimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal class Registry
{
public static readonly RegistryKey LocalMachine = new RegistryKey();
}

internal sealed class SystemEvents
{
public static event EventHandler DisplaySettingsChanged;
Expand Down Expand Up @@ -103,11 +103,6 @@ internal Bitmap(int width, int height, int stride, PixelFormat format, IntPtr pi
public int Width { get { return width; } }
public int Height { get { return height; } }

public Color GetPixel(int x, int y)
{
return new Color();
}

internal void UnlockBits(BitmapData data)
{
}
Expand All @@ -134,20 +129,20 @@ internal BitmapData(int width, int height, int stride)
public int Height { get; private set; }
public int Stride { get; private set; }
}

internal enum ImageLockMode
{
ReadOnly,
WriteOnly,
ReadWrite,
UserInputBuffer
}

internal enum PixelFormat
{
Format32bppArgb = 2498570
}

internal enum ImageFormat
{
Png
Expand All @@ -158,7 +153,7 @@ internal enum ImageFormat
namespace OpenTK.Minimal
{
using System.Drawing;

internal sealed class Graphics : IDisposable
{
public static Graphics FromImage(Image img)
Expand Down
7 changes: 1 addition & 6 deletions src/OpenTK/Platform/X11/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static IntPtr XOpenDisplay(IntPtr display)

[DllImport("libX11", EntryPoint = "XCreateWindow")]
public extern static IntPtr XCreateWindow(IntPtr display, IntPtr parent, int x, int y, int width, int height, int border_width, int depth, int xclass, IntPtr visual, IntPtr valuemask, ref XSetWindowAttributes attributes);

[DllImport("libX11", EntryPoint = "XCreateWindow")]
public unsafe extern static IntPtr XCreateWindow(IntPtr display, IntPtr parent, int x, int y, int width, int height, int border_width, int depth, int xclass, IntPtr visual, IntPtr valuemask, XSetWindowAttributes* attributes);

Expand Down Expand Up @@ -600,11 +600,6 @@ public static IntPtr CreateMaskFromImage(Display display, Bitmap image)
{
byte bit = (byte)(1 << (msbfirst ? (7 - (x & 7)) : (x & 7)));
int offset = y * stride + (x >> 3);

if (image.GetPixel(x, y).A >= 128)
{
mask[offset] |= bit;
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/OpenTK/Platform/X11/X11GLNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,6 @@ public override Icon Icon
for (int y = 0; y < bitmap.Height; y++)
for (int x = 0; x < bitmap.Width; x++)
{
data[index++] = (IntPtr)bitmap.GetPixel(x, y).ToArgb();
}

using (new XLock(window.Display))
Expand Down