Stefanos A.
78c0c6fd4c
Use unmanaged StdCall calling convention
...
Default results in a managed calling convention which does not generate
unmanaged thunking code for parameter marshaling.
System.Runtime.InteropServices.CallingConvention.Winapi appears to
correspond to StdCall for calli callsites (this might be different for
pinvoke, which supports an unmanaged "platformapi" calling convention.)
Needs more testing to prove this is doing the right thing on non-Windows
platforms.
2013-11-29 19:11:52 +01:00
Stefanos A.
c6d59b1f29
Removed deleted file from project
2013-11-28 23:23:03 +01:00
Stefanos A.
0a39143b3e
Removed unused WGL methods
...
WGL was autogenerated a few years ago but never touched after that.
Since we use a tiny fraction of all available methods, it makes sense to
remove the unused ones. This reduces dll size and improves startup
times.
2013-11-28 23:22:35 +01:00
Stefanos A.
c53c0bc66f
Added GetProcAddress(IntPtr) overloads
...
This might allow us to improve startup performance, by avoiding string
marshaling during extension loading.
2013-11-28 23:21:19 +01:00
Stefanos A.
8b8ea714ee
Fixed wglGetProcAddress entry point
...
A typo would cause extension loading to fail. This is now fixed.
2013-11-28 09:04:08 +01:00
Stefanos A.
7775fa64aa
Removed unused WGL bindings
...
Our WGL bindings contained dozens of methods that OpenTK did not use.
Removing these reduces the dll size and improves startup times.
2013-11-27 19:37:59 +01:00
Stefanos A.
9c7e5201db
Fixed entry point validity check
2013-11-27 19:36:42 +01:00
Stefanos A.
fb99c7d7a1
Enable InitLocals to make peverify happy
2013-11-27 09:16:23 +01:00
Stefanos A.
e48a624003
Fixed convenience return type implementation
2013-11-27 09:09:33 +01:00
Stefanos A.
ec67232e88
Corrected RewrittenAttribute definition
2013-11-27 08:45:28 +01:00
Stefanos A.
f5b33b6487
Build 3.5 profile with Visual Studio
2013-11-27 08:28:39 +01:00
Stefanos A.
6bde1beb91
Rewrite nested types
...
Fixes zero-RVA exception for OpenGL extensions (e.g. GL.Ext etc)
2013-11-27 08:28:22 +01:00
Stefanos A.
c369bfc75e
Use [AutoGenerated] only for generated methods
...
The rewriter will patch the body of methods marked with [AutoGenerated].
Methods that are implemented manually (e.g. various math helper
overloads) should avoid this attribute.
2013-11-27 08:27:52 +01:00
Stefanos A
daf5b828c9
Implemented string return types
2013-11-27 01:40:12 +01:00
Stefanos A
ac65eb7b09
Added MonoDevelop artifacts
2013-11-27 00:05:26 +01:00
Stefanos A
da4de365e8
Regenerated bindings
2013-11-27 00:03:21 +01:00
Stefanos A
4f58348502
Implemented convenience wrapper types
2013-11-27 00:03:03 +01:00
Stefanos A
82b0b477da
Emit native signatures
...
The patcher uses those signatures to implement wrapper functionality
for the various wrapper types that exist in OpenTK.
2013-11-27 00:02:26 +01:00
Stefanos A
bb7980b6a9
Update to latest version from git
2013-11-26 19:07:01 +01:00
Stefanos A
83868b45c6
Protect against multiple runs; optimize il
2013-11-26 19:06:39 +01:00
Stefanos A
4149cdfa88
Do not emit method bodies.
2013-11-26 01:31:29 +01:00
Stefanos A
40f992b5bd
Rewrite support for [Slot] attribute
2013-11-26 01:31:10 +01:00
Stefanos A.
84a1e5a739
Initial work on Pin<> statements (WIP)
2013-11-25 20:00:22 +01:00
Stefanos A.
bb15844deb
Fixed build on Visual Studio
2013-11-25 10:06:10 +01:00
Stefanos A
27d5e7a43e
Applied MonoDevelop project style
2013-11-25 08:54:15 +01:00
Stefanos A
997f390ec1
Corrected keyfile path
2013-11-25 08:53:44 +01:00
Stefanos A
793dac65e5
Corrected patch for CallReturn<TRet, ...> signatures
...
.Net will happily execute a calli with a generic return type, whereas
Mono will refuse to. Mono is probably doing the right thing here. Fixed
by resolving the generic return into a concrete type.
2013-11-25 08:53:27 +01:00
Stefanos A.
442f8b6131
Added rewrite postbuild event
2013-11-25 00:58:39 +01:00
Stefanos A.
0f609f6e22
Fixed calling convention for non-Windows platforms
2013-11-25 00:58:09 +01:00
Stefanos A.
e65f206554
Fixed core loading on Windows
...
On Windows, entry points for OpenGL 1.0 and 1.1 are not exposed by
wglGetProcAddress. We fall back to LoadLibrary+GetProcAddress when
wglProcAddress fails.
2013-11-25 00:26:20 +01:00
Stefanos A.
c92c232910
Added OpenTK.Rewrite project
2013-11-25 00:20:55 +01:00
Stefanos A.
0434f623e1
Added InteropHelper file
2013-11-25 00:20:22 +01:00
Stefanos A.
1868b5e3db
Implemented dll rewriter using Mono.Cecil
2013-11-25 00:19:54 +01:00
Stefanos A.
74159da199
Regenerated bindings
2013-11-25 00:19:18 +01:00
Stefanos A.
c8e753d2da
Moved address parameter to last place
...
This way, it is the last item on the evaluation stack before calling the
unmanaged function pointer. This simplifies the calli rewrite procedure.
2013-11-25 00:18:43 +01:00
Stefanos A.
1e6a819b07
Removed GLObsolete.cs helper
...
This file must be recreated using the new loading mechanism.
2013-11-24 13:59:15 +01:00
Stefanos A.
811b04e880
Regenerated bindings with new loading mechanism
2013-11-24 13:58:54 +01:00
Stefanos A.
fec958c8dc
Hooked up new loading mechanism
2013-11-24 13:58:30 +01:00
Stefanos A.
657c447737
Hooked up new loading mechanism
2013-11-24 13:58:12 +01:00
Stefanos A.
825ed3621f
Implemented new loading mechanism
2013-11-24 13:57:43 +01:00
Stefanos A.
7a57c9c3d2
Clarified GetAddress documentation
2013-11-24 13:57:23 +01:00
Stefanos A.
475e7ea797
Allow overriding of loading methods
2013-11-24 13:57:08 +01:00
Stefanos A.
1e71ca9122
Removed delegates and DllImports
2013-11-24 13:56:35 +01:00
Stefanos A.
2045f3e98e
Add slots into entry point table
2013-11-24 13:55:13 +01:00
Stefanos A.
7b93a87bb0
Generate entry point tables
2013-11-24 13:54:52 +01:00
Stefanos A
8ee2152709
Moved delegate loaders to the Delegates class
2013-11-23 17:23:26 +01:00
Stefanos A
03a26ed12f
Regenerated bindings with lazy loading
2013-11-22 20:07:01 +01:00
Stefanos A
0fea0a19b7
Added support for lazy binding loading
2013-11-22 20:06:49 +01:00
Stefanos A
5d0e7a4acf
Moved GetExtensionDelegate to the correct position
2013-11-22 20:06:28 +01:00
Stefanos A
ffe934fa5d
Added static GetExtensionDelegate implementation
2013-11-22 20:06:04 +01:00