From a905b3ce249c0174c7b9c1f2f2e48b7542752f81 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 12 Aug 2009 10:58:23 +0000 Subject: [PATCH] * Egl.cs: Added workaround for gmcs 2.4.2 bug #530270 (https://bugzilla.novell.com/show_bug.cgi?id=530270). --- Source/OpenTK/Platform/Egl/Egl.cs | 53 +++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/Source/OpenTK/Platform/Egl/Egl.cs b/Source/OpenTK/Platform/Egl/Egl.cs index cc8df314..5deaed4a 100644 --- a/Source/OpenTK/Platform/Egl/Egl.cs +++ b/Source/OpenTK/Platform/Egl/Egl.cs @@ -32,13 +32,20 @@ using System.Text; namespace OpenTK.Platform.Egl { + // Note: the Workaround structs declared in each type below work around + // gmcs 2.4.2 bug #530270 (https://bugzilla.novell.com/show_bug.cgi?id=530270). + // They don't cause any change in functionality other than make the compiler happy. + struct EGLNativeDisplayType { - public readonly Compute.Handle Handle; + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public struct Workaround { } + + public readonly Compute.Handle Handle; public EGLNativeDisplayType(IntPtr handle) { - Handle = new Compute.Handle(handle); + Handle = new Compute.Handle(handle); } public static readonly EGLNativeDisplayType Default = new EGLNativeDisplayType(); @@ -46,31 +53,40 @@ namespace OpenTK.Platform.Egl struct EGLNativePixmapType { - public readonly Compute.Handle Handle; + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public struct Workaround { } + + public readonly Compute.Handle Handle; public EGLNativePixmapType(IntPtr handle) { - Handle = new Compute.Handle(handle); + Handle = new Compute.Handle(handle); } } struct EGLConfig { - public readonly Compute.Handle Handle; + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public struct Workaround { } + + public readonly Compute.Handle Handle; public EGLConfig(IntPtr handle) { - Handle = new Compute.Handle(handle); + Handle = new Compute.Handle(handle); } } struct EGLContext { - public readonly Compute.Handle Handle; + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public struct Workaround { } + + public readonly Compute.Handle Handle; public EGLContext(IntPtr handle) { - Handle = new Compute.Handle(handle); + Handle = new Compute.Handle(handle); } public static readonly EGLContext None; @@ -78,11 +94,14 @@ namespace OpenTK.Platform.Egl struct EGLDisplay { - public readonly Compute.Handle Handle; + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public struct Workaround { } + + public readonly Compute.Handle Handle; public EGLDisplay(IntPtr handle) { - Handle = new Compute.Handle(handle); + Handle = new Compute.Handle(handle); } public static readonly EGLDisplay Null; @@ -90,11 +109,14 @@ namespace OpenTK.Platform.Egl struct EGLSurface { - public readonly Compute.Handle Handle; + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public struct Workaround { } + + public readonly Compute.Handle Handle; public EGLSurface(IntPtr handle) { - Handle = new Compute.Handle(handle); + Handle = new Compute.Handle(handle); } public static readonly EGLSurface None; @@ -102,11 +124,14 @@ namespace OpenTK.Platform.Egl struct EGLClientBuffer { - public readonly Compute.Handle Handle; + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public struct Workaround { } + + public readonly Compute.Handle Handle; public EGLClientBuffer(IntPtr handle) { - Handle = new Compute.Handle(handle); + Handle = new Compute.Handle(handle); } }