We can use DllImports for OpenGL functions <= v1.1 on all platforms,
including Windows. This allows us to reduce the number of required
GetProcAddress calls by 474, reducing startup time and memory
consumption.
This setting can be turned off through Settings.Legacy.UseDllImports
and UseWindowsCompatibleGL.
CSharpSpecWriter now correctly outputs doc summaries on ARB_imaging
functions that do not have a version/deprecation string. Additionally,
it no longer warns about documentation parameter mismatches for
parameters matching C# keywords.
eglGetProcAddress cannot be used to retrieve
entry points of core functions. Instead, we
use [DllImport] for core functions and function
pointers for extension functions.
Squashed commit of the following:
commit 0b84aa6ef78dfa3600b81fc412eb192f2a87e40c
Author: thefiddler <stapostol@gmail.com>
Date: Sat Mar 15 02:24:58 2014 +0100
[Examples] Rolled back changes to Example browser
commit 1acfbaac3d17184debdbbe872c58ac07d1b37c0a
Author: thefiddler <stapostol@gmail.com>
Date: Sat Mar 15 02:20:57 2014 +0100
[Examples] Rolled back WinForms example
commit 835d9d6035a890bd3426566929fbfd25c493eca0
Author: thefiddler <stapostol@gmail.com>
Date: Sat Mar 15 01:15:01 2014 +0100
[Examples] Rolled back erroneous GLControl mods
commit 056418014f0e835e83fb85b54b8749519a555364
Author: thefiddler <stapostol@gmail.com>
Date: Fri Mar 14 23:11:11 2014 +0100
[Rewrite] Remove calli prototypes
When a function is called indirectly via a function pointer, its
prototype is not required (the prototype is added as a callsite at the
calli invocation.) Removing these prototypes reduces binary size by
roughly 400KB.
commit 353a16ec2836c597150d2fab28581e7c264b2b39
Author: thefiddler <stapostol@gmail.com>
Date: Fri Mar 14 22:31:25 2014 +0100
[Rewrite] Call DllImports directly
When a function does not have an allocated slot (i.e. slot = -1), then
we will call its DllImport signature directly.
commit 9a5313e4b7afb10b698d255e4b5637887bf71cf3
Author: thefiddler <stapostol@gmail.com>
Date: Fri Mar 14 22:30:04 2014 +0100
[Bind] Do not allocate slots for DllImports
commit 6ac5342409363cac0e59f9dc669948b319bd20a9
Author: thefiddler <stapostol@gmail.com>
Date: Fri Mar 14 22:29:07 2014 +0100
[Bind] Added option to use DllImports
This is necessary for the core functionality of OpenGL ES, where
eglGetProcAddress returns null or garbage (the latter on Android.)
* Main.cs: Removed unused comments. Improved parameter handling. Added -o:keep_untyped_parameters option.
* Settings.cs: Added KeepUntypedEnums compatibility setting.
* Structures/Delegate.cs: Removed stale comments. Refactored CreateWrappers() method to support untyped enum overload generation and simplified method implementation. Replaced CurrentType translations with QualifiedType.
* Structures/Function.cs: Removed stale code. Fixed copy constructors to copy all necessary fields. Use QualifiedType instead of CurrentType in WrapReturnType and CreateBody methods. Made Body statement lists static to improve performance. Added hack to modify callstring casts in keep_untyped_enums wrappers. Generate call string from the Function CreateBody was called on, rather than the current Function (solves issues with invalid casts in specific cases).
* Structures/Parameter.cs: Use fully qualified type instead of current type in several caeses.
* Structures/Type.cs: Added explicit support for fully qualified types.
* Settings.cs: Changed default output directory to fit with the current OpenTK project structure.
* GL2/Generator.cs: Suppressed documentation warnings in the generated bindings.
Improved the output for the doc processor: MathML equations are replaced by their textual representation and whitespace better matches function declarations.
Added new configuration settings for the doc processor and the license.
Removed stale debugging code.
License.txt is now a file, not a resource.
Fixed GL.Ext.CheckFramebufferStatus (was CheckFramebufferStat before)
Moved default namespace to OpenTK.Graphics.OpenGL.
Moved OpenTK.Graphics.OpenGL.Enums to OpenTK.Graphics.OpenGL.
Minor cleanup. Added code to turn ALL_CAPS enums into .Net CamelCase enums - must take care of the extensions before enabling this.
Added a couple new commandline options, and fixed a misspelling (NestedEnumsClass was NestedEunmsClass, ugh!)
Updated the ExampleLauncher to not process exceptions. Updated the IExample interface to contain the Launch method. Updated examples and the ExampleLauncher according to the IExample interface.
Synced with gl3 branch.