Corrected bug affecting the GL.Load and Wgl.Load functions, where the delegates where not retrieved by the GetFields call.

This commit is contained in:
the_fiddler 2007-08-22 16:13:41 +00:00
parent 0dbf3c04b2
commit b2459933b2
7 changed files with 4520 additions and 46 deletions

View file

@ -707,12 +707,12 @@ namespace Bind.GL2
{
if (!Char.IsDigit(key[0]))
{
sw.WriteLine("public static class {0}", key);
sw.WriteLine("public static partial class {0}", key);
}
else
{
// Identifiers cannot start with a number:
sw.WriteLine("public static class {0}{1}", Settings.FunctionPrefix, key);
sw.WriteLine("public static partial class {0}{1}", Settings.FunctionPrefix, key);
}
sw.WriteLine("{");
sw.Indent();

View file

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.3.9.2")]
[assembly: AssemblyFileVersion("0.3.9.2")]
[assembly: AssemblyVersion("0.3.10.0")]
[assembly: AssemblyFileVersion("0.3.10.0")]

View file

@ -14847,7 +14847,7 @@ namespace OpenTK.OpenGL
unsafe { Delegates.glUniformMatrix4x3fv((Int32)location, (Int32)count, (GL.Enums.Boolean)transpose, (Single*)value); }
}
public static class ARB
public static partial class ARB
{
public static
void ActiveTexture(GL.Enums.ARB_multitexture texture)
@ -22619,7 +22619,7 @@ namespace OpenTK.OpenGL
}
public static class EXT
public static partial class EXT
{
public static
void BlendColor(Single red, Single green, Single blue, Single alpha)
@ -29393,7 +29393,7 @@ namespace OpenTK.OpenGL
}
public static class SGIS
public static partial class SGIS
{
[System.CLSCompliant(false)]
public static
@ -29888,7 +29888,7 @@ namespace OpenTK.OpenGL
}
public static class SGI
public static partial class SGI
{
[System.CLSCompliant(false)]
public static
@ -30070,7 +30070,7 @@ namespace OpenTK.OpenGL
}
public static class SGIX
public static partial class SGIX
{
public static
void PixelTexGen(GL.Enums.SGIX_pixel_texture mode)
@ -31243,7 +31243,7 @@ namespace OpenTK.OpenGL
}
public static class HP
public static partial class HP
{
public static
void ImageTransformParameteri(GL.Enums.HP_image_transform target, GL.Enums.HP_image_transform pname, Int32 param)
@ -31385,7 +31385,7 @@ namespace OpenTK.OpenGL
}
public static class PGI
public static partial class PGI
{
public static
void Hint(GL.Enums.PGI_misc_hints target, Int32 mode)
@ -31395,7 +31395,7 @@ namespace OpenTK.OpenGL
}
public static class INTEL
public static partial class INTEL
{
[System.CLSCompliant(false)]
public static
@ -31491,7 +31491,7 @@ namespace OpenTK.OpenGL
}
public static class SUNX
public static partial class SUNX
{
public static
void FinishTexture()
@ -31501,7 +31501,7 @@ namespace OpenTK.OpenGL
}
public static class SUN
public static partial class SUN
{
[System.CLSCompliant(false)]
public static
@ -51748,7 +51748,7 @@ namespace OpenTK.OpenGL
}
public static class INGR
public static partial class INGR
{
public static
void BlendFuncSeparate(GL.Enums.All sfactorRGB, GL.Enums.All dfactorRGB, GL.Enums.All sfactorAlpha, GL.Enums.All dfactorAlpha)
@ -51758,7 +51758,7 @@ namespace OpenTK.OpenGL
}
public static class NV
public static partial class NV
{
public static
void FlushVertexArrayRange()
@ -61290,7 +61290,7 @@ namespace OpenTK.OpenGL
}
public static class MESA
public static partial class MESA
{
public static
void ResizeBuffers()
@ -61744,7 +61744,7 @@ namespace OpenTK.OpenGL
}
public static class IBM
public static partial class IBM
{
[System.CLSCompliant(false)]
public static
@ -62573,7 +62573,7 @@ namespace OpenTK.OpenGL
}
public static class gl3DFX
public static partial class gl3DFX
{
[System.CLSCompliant(false)]
public static
@ -62590,7 +62590,7 @@ namespace OpenTK.OpenGL
}
public static class ATI
public static partial class ATI
{
[System.CLSCompliant(false)]
public static
@ -64534,7 +64534,7 @@ namespace OpenTK.OpenGL
}
public static class APPLE
public static partial class APPLE
{
[System.CLSCompliant(false)]
public static
@ -65353,7 +65353,7 @@ namespace OpenTK.OpenGL
}
public static class GREMEDY
public static partial class GREMEDY
{
[System.CLSCompliant(false)]
public static

View file

@ -273,7 +273,7 @@ namespace OpenTK.OpenGL
/// </remarks>
public static bool Load(string function)
{
FieldInfo f = delegatesClass.GetField(function);
FieldInfo f = delegatesClass.GetField(function, BindingFlags.Static | BindingFlags.NonPublic);
if (f == null)
return false;
@ -285,7 +285,7 @@ namespace OpenTK.OpenGL
#endregion
#region public static void Color3()
#region public static void Color[34]() overloads
public static void Color4(System.Drawing.Color color)
{

File diff suppressed because it is too large Load diff

View file

@ -94,7 +94,7 @@ namespace OpenTK.Platform.Windows
/// <returns></returns>
public static bool Load(string function)
{
FieldInfo f = delegatesClass.GetField(function);
FieldInfo f = delegatesClass.GetField(function, BindingFlags.Static | BindingFlags.NonPublic);
if (f == null)
return false;
@ -102,14 +102,16 @@ namespace OpenTK.Platform.Windows
return f.GetValue(null) != null;
}
/*
public static partial class ARB
{
/// <summary>
/// Checks if an extension is supported by the given context.
/// </summary>
/// <param name="deviceContext">The device context to check.</param>
/// <param name="ext">The extension to check.</param>
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
public static bool SupportsExtensionARB(IntPtr deviceContext, string ext)
public static bool SupportsExtension(IntPtr deviceContext, string ext)
{
string extension_string = Wgl.ARB.GetExtensionsString(deviceContext);
string[] extensions = extension_string.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
@ -117,6 +119,6 @@ namespace OpenTK.Platform.Windows
Array.Sort(extensions);
return Array.BinarySearch(extensions, ext) != -1;
}
*/
}
}
}

View file

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.3.10.1")]
[assembly: AssemblyFileVersion("0.3.10.1")]
[assembly: AssemblyVersion("0.3.10.2")]
[assembly: AssemblyFileVersion("0.3.10.2")]