Commit graph

5017 commits

Author SHA1 Message Date
Stefanos A. d215075bff High-resolution mode is enabled by default 2013-12-02 22:34:39 +01:00
Stefanos A. 1475b3d427 Made DPI-awareness configurable (issue #6)
It is now possible to indicate that an application is not DPI-aware. In
that case, OpenTK will let the operating system handle DPI scaling. This
results in worse visuals (pixel doubling) but allows non DPI-aware
applications to continue working.
2013-12-02 22:18:16 +01:00
Stefanos A 78c0c0d16e Removed unused code 2013-12-02 16:30:14 +01:00
Stefanos A 48efbed1e3 Added MonoDevelop project policy 2013-12-02 12:00:11 +01:00
Stefanos A d5137d6057 Initial implementation of manual StringBuilder marshaling (WIP)
The implementation is based on Marshal.AllocHGlobal and
Marshal.FreeHGlobal. This is not working correctly yet.
2013-12-02 11:59:40 +01:00
Stefanos A 45cdc2c1cd Added manual marshaling for StringBuilder
Mono fails to marshal StringBuilder arguments in unmanaged callsites
invoked through calli. We need to implement the marshaling code
ourselves.
2013-12-02 11:58:41 +01:00
Stefanos A 6ccab1784f Use StdCall calling convention by default
It appears that calli callsites cannot be decorated with the
“platformapi” calling convention like DllImport signatures can. This is
problematic since Windows uses stdcall by default and most other
platforms use cdecl.

There are three approaches to this issue, without going back to
delegate calls: (a) generate an unmanaged thunk that cleans up the
stack after a GL call; (b) use libFFI; (c) use cdecl *or* stdcall
everywhere and hope that the runtime can cope.

.Net 2.0 can detect and fix stdcall functions invoked through a cdecl
callsite. .Net 4.0 adds a configuration option to enable or disable
this fixup (faster p/invoke if disabled) and raise a MDA exception when
this condition is detected. (This affects x86 only.)

Mono appears to be able to cope with cdecl functions invoked through a
stdcall callsite.

More testing is required.
2013-12-01 21:25:03 +01:00
Stefanos A 438f83c8d9 Mark slots with [DllImport]; remove "core" and "delegates" generation
We should be able to use static pinvokes on platforms that do not
provide or require extensions and calli instructions on platforms with
extension APIs. This dinstiction will be implemented as a parameter in
the rewriter.
2013-12-01 21:17:15 +01:00
Stefanos A d6bf7c0d78 Regenerated bindings 2013-12-01 18:28:25 +01:00
Stefanos A 12c9c14133 Enabled symbol generation; minor code cleanup 2013-12-01 18:28:11 +01:00
Stefanos A 2290e06cbd Use untyped int for enums in unmanaged callsites
By using untyped integers instead of typed integers in the unmanaged
callsites, we allow monolinker to keep the exact set of enums that are
used by the user. Without this, we’d have to keep every single enum in
place to avoid missing type exceptions.

This does not affect the public signatures or the generated code in any
way.
2013-12-01 18:26:01 +01:00
Stefanos A 6f535ec095 Load system types from referenced mscorlib 2013-11-30 02:32:10 +01:00
Stefanos A. 76f0782fb1 Use C calling convention even on Windows 2013-11-30 02:16:34 +01:00
Stefanos A. 31d14cebff Corrected the handling of arrays
This includes arrays of primitives and arrays of generics. Our code is
similar to the code generated by the Mono C# compiler for the "fixed"
construct. The .Net compiler produces slightly different code (two local
variables instead of one) - more research is required.
2013-11-30 02:00:07 +01:00
Stefanos A. 0d9df5ad72 Refactored il emitters into methods 2013-11-29 19:24:38 +01:00
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. 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
Stefanos A. 32a5e0fc50 Add test for new text input events 2013-11-22 18:25:30 +01:00
Elias Holzer 6ee04b2ff9 Implemented KeyPress event for Sdl2NativeWindow. 2013-11-22 18:05:11 +01:00
Elias Holzer f851d8887c Implemented KeyDown and KeyUp events for Sdl2NativeWindow. 2013-11-22 18:04:53 +01:00
Elias Holzer 38532804ec Enabled KeyDown and KeyUp events in NativeWindow. 2013-11-22 18:03:17 +01:00
Stefanos A 2ace001203 Implemented direct binding loading
OpenTK normally uses reflection to load bindings, instead of generating
huge constructors. Although reflection is faster on first load (thanks
to reduced JIT overhead), it fails to work correctly with monolinker.
This branch explores the performance of a direct binding.
2013-11-22 17:32:17 +01:00
Stefanos A. e2404d2cfc Fix "CursorVisible bugs"
When we enter the modal resize loop on Windows with ClipCursor set, we
cause a feedback loop where every resize causes the cursor to move and
every move causes a new resize. To fix this, we need to ungrab the
cursor when we are enter the modal loop.
2013-11-22 14:10:21 +01:00
Stefanos A. b7af883cff Fix exceptions on reused OpenGL context handles
Implementations may reuse OpenGL context handles that have been
destroyed. If a context is finalized but not Disposed, then OpenTK may
keep a reference to the old context handle, causing a crash when the
same handle is returned for a new context. To fix that, new context
handles will now replace old handles in case of a clash.
2013-11-21 09:34:06 +01:00
Stefanos A. 08701d318c Destroy SDL window when finalized
SDL_DestroyWindow must be called on the main thread. If the window is
finalized, the finalizer will push a CLOSE event to the event loop
(thread-safe) and the window will be destroyed on the main thread.
2013-11-21 09:31:32 +01:00
Stefanos A. 75d4f3d07c Fixed #5
We need to release the cursor before closing a GameWindow, otherwise
subsequent GameWindows may fail to receive mouse events.
2013-11-20 18:05:45 +01:00
Stefanos A. 486130c01e Toolkit.Init() now returns a concrete class
This gives us room for expansion in the future, if necessary.
2013-11-20 13:12:42 +01:00
Stefanos A. 1d19a80b53 Removed incorrect comment 2013-11-20 13:05:49 +01:00
Stefanos A. 48803bb4d6 Fixed #4
Sdl2InputDriver.Dispose() would call SDL_DelEventWatch with a different
"user_data" parameter than SDL_AdEventWatch. This caused the EventFilter
to remain registered and subsequently crash when closing and reopening a
window.
2013-11-20 09:10:12 +01:00
Stefanos A 255f4e9083 Completed compatibility overloads for OpenTK 1.0 2013-11-20 08:16:07 +01:00
Stefanos A 02120f429f Do not trim 's' from Groups 2013-11-20 08:16:06 +01:00
Stefanos A. 8c5887e996 Aligned GL core and compat enums 2013-11-18 18:51:38 +01:00
Stefanos A. a34407f440 Removed stale QuickStart project
Instead of QuickStart.sln, we should provide proper templates.
2013-11-18 18:38:03 +01:00
Stefanos A. 32828ecd8a Do not call SDL.GetVersion unless requested 2013-11-18 18:35:23 +01:00
Stefanos A 635bb85313 Reverted 'h' suffix detection
This causes too many breaking changes in the NV namespace.
2013-11-18 18:32:36 +01:00
Stefanos A ac0fab7760 More compatibility overloads for OpenGL 2013-11-18 18:32:36 +01:00
Stefanos A 5d4c42672f Improved suffix detection. Support index-based parameter overloading. 2013-11-18 18:32:34 +01:00
Stefanos A. e7f70330b2 Implemented IEquatable<ColorFormat>
This eliminates memory allocations when storing and comparing
ColorFormat structures.
2013-11-18 13:49:06 +01:00
Stefanos A 3d50554903 Added OpenGL overloads for OpenTK-1.0 compatibility 2013-11-18 13:28:44 +01:00
Stefanos A e572f418af Added compatibility overloads for ES 2.0 2013-11-18 01:10:01 +01:00
Stefanos A 01d40c551a Aligned FBO API with desktop OpenGL 2013-11-17 23:57:38 +01:00
Stefanos A 0865b0f200 Allow overriding of function names 2013-11-17 23:56:51 +01:00
Stefanos A fbcae3b2fe Removed debugging code 2013-11-17 21:27:22 +01:00
Stefanos A b652145977 Handle overloads with different element counts 2013-11-17 21:27:09 +01:00
Stefanos A c175a486fc Improved and documented IEquatable vs IComparable 2013-11-17 21:26:28 +01:00
Stefanos A 358bcd4f88 Regenerated bindings 2013-11-17 01:49:10 +01:00
Stefanos A 13d3bdb47f OpenGL overrides for compatibility
Added overrides to maintain backwards compatibility with
OpenTK.Graphics.OpenGL.GL. These were generated
through the apitest tool.
2013-11-17 01:49:07 +01:00
Stefanos A f8a81f396e Cleaned up ending trim regex
Trim regex will now correctly match GetInteger64 and other functions
ending in "64". It also uses a correct ending anchor to avoid matches
in the middle of a function name.
2013-11-17 01:49:07 +01:00
Stefanos A fd910e6a6c Added int/uint to the c# typemap 2013-11-17 01:49:07 +01:00
Stefanos A afd076a83d Speed up enum code generator
Scan through the list of wrappers once, instead of multiple times, in
order to find out which functions use which enums. This speeds up enum
generation tremendously.
2013-11-17 01:49:07 +01:00
Stefanos A. d9afed2d10 Setup correct class style for OpenGL
On Windows, we need to have a CS_OWNDC class style on windows with
OpenGL contexts attached. In Windows.Forms, we can set this via the
Control.CreateParams property. See
https://www.opengl.org/wiki/Creating_an_OpenGL_Context_(WGL)
2013-11-16 22:38:17 +01:00
Stefanos A f9deeaead7 Improved compatibility with OpenTK 1.0
Added overloads for enumerations with name changes. Reduced differences
between ES and GL APIs.
2013-11-15 01:59:50 +01:00
Stefanos A cdd6259fee Removed debug leftovers 2013-11-14 23:38:17 +01:00
Stefanos A 431202d830 Corrected convenience wrappers for Get* and Delete*
GetBoolean, GetInteger6, GetFixedvOES and Delete* are now matched in
the convenience wrapper generator. Methods returning vectors of fixed
size (e.g. 4 ints) are no longer matched.
2013-11-14 17:40:06 +01:00
Stefanos A. 0ee72856e4 Added workaround for wglMakeCurrent error 6
On some drivers and virtual machines, wglMakeCurrent may fail with a
code 6 when first called. The suggested workaround is to call it in a
loop until it succeeds. See
https://www.opengl.org/discussion_boards/showthread.php/171058-nVidia-wglMakeCurrent()-multiple-threads
2013-11-14 17:37:39 +01:00
Stefanos A 2e14ca59b2 AMD_performance_monitors is not const-correct
Workaround fo  bug in rhe specification of AMD_performance_monitors.
Upstream bug report here:
https://www.khronos.org/bugzilla/show_bug.cgi?id=1035
2013-11-14 16:17:20 +01:00
Stefanos A 4fd6347de7 Mark untyped overloads as obsolete 2013-11-14 14:10:19 +01:00
Stefanos A 11070bb52a Added support for obsolete attribute
Functions marked with the obsolete attribute will now add [Obsolete] to
the generated output.
2013-11-14 13:46:42 +01:00
Stefanos A b975eccd45 Regenerated bindings 2013-11-14 11:35:32 +01:00
Stefanos A 5b4d3edf39 ES11 compatibility overloads (WIP1) 2013-11-14 11:34:46 +01:00
Stefanos A c5591e9968 Clear qualifier path when changing type
This fixes a bug where overriding an enum parameter with a non-enum
parameter would result in the wrong qualifier path.
2013-11-14 11:33:52 +01:00
Stefanos A ce7a7c7cf3 New Add() methods analogous to FunctionCollection 2013-11-14 11:32:25 +01:00
Stefanos A 5f7008d746 Improved override/overload lookup
The lookup for function overrides and overloads now tries to work
around extension case mismatches (e.g. IBM vs Ibm). This fixes a few
specific cases of missing overrides.
2013-11-14 11:31:36 +01:00
Stefanos A d28c428e99 Correctly set generator mode. 2013-11-14 09:28:27 +01:00
Stefanos A. 21069ee34c Do not scale in normal-dpi modes 2013-11-14 09:25:53 +01:00
Stefanos A. 7c8cc5f746 Scale window size on hi-dpi mode
Follow high-dpi guidelines for scaling a window on high-dpi modes.
2013-11-14 09:02:47 +01:00
Stefanos A. 94e2649704 Cleaned up context profile selection
Added support for WGL_create_context profiles and added methods for the
selection of context flags and profile.
2013-11-14 08:30:11 +01:00
Stefanos A. 803c575201 Corrected core profile selection
According to GLX_create_context, the correct flag for a core profile is
GLX_CONTEXT_CORE_PROFILE_BIT_ARB.
2013-11-14 08:29:06 +01:00
Stefanos A. f142dbdfc3 Improved WinGLContext initialization
Cleaned up and added debugging information to the temporary context
construction in WinGLContext. Simplified WinGraphicsMode constructor.
2013-11-14 08:05:08 +01:00
Stefanos A. 5d6ca5c7da Added GetDeviceCaps (windows platform)
We will use this method to read out the logical DPI of the monitor and
scale window elements accordingly.
2013-11-14 01:43:40 +01:00
Stefanos A. f9fdddea64 Re-added WindowHandle property
There are projects that use reflection to access
*WindowInfo.WindowHandle directly. This change ensures we don't break
them.
2013-11-13 18:25:49 +01:00
Stefanos A. 4fd5cc30d5 Corrected option parsing 2013-11-13 14:29:06 +01:00
thefiddler 1792f7bf29 Added Version20 overload to StencilFuncSeparate
Compatibility fix for OpenTK 1.0
2013-11-12 23:39:43 +01:00
thefiddler 4f6c2ac2b4 Support multiple overloads
It is now possible to specify multiple overloads for the same function.
This is helpful for maintaining backwards compatibility with previous
releases.
2013-11-12 23:38:09 +01:00
Stefanos A. 52a8653f52 Hack for GLControl support
Added a hack to allow GLControl examples to run even if SDL is
installed.
2013-11-12 20:38:02 +01:00
Stefanos A. ab58d41353 GLControl requires native backend
SDL does not currently support embedding into Windows Forms (this is an
upstream limitation.) To ensure that existing WinForms applications
continue to function even if SDL is installed, GLControl will now try to
initialize OpenTK with a native backend. The user can still override
this behavior using OpenTK.Toolkit.Init(ToolkitOptions), as normal.
2013-11-12 20:37:23 +01:00
Stefanos A. b9fcf7c3c3 Cleaner startup sequence
OpenTK.Toolkit will now initialize OpenTK.Configuration and
OpenTK.Platform.Factory explicitly. It can also receive an optional
ToolkitOptions parameter to influence the OpenTK.Platform implementation
that will be chosen. Finally, it explicitly implements IDisposable to
clean up after itself.
2013-11-12 20:34:53 +01:00
Stefanos A. 663864f083 Refactored environment config detection
This significantly cleans up the startup sequence on all platforms:
- X11 is not detected on non-Linux platforms unless the user explicitly
requests it
- Supports selection of platform abstractions (SDL) vs native
implementations.
- Returns correct flags on Android and iOS.

This contains a semantic change: OpenTK.Configuration will not return
correct values until OpenTK.Toolkit.Init() has been called, either
directly or indirectly (e.g. by creating a window.)
2013-11-12 20:32:31 +01:00
Stefanos A. 7503a87b3f Added ToolkitOptions class
ToolkitOptions allows the user to influence the implementation of
OpenTK.Platform at runtime.
2013-11-12 20:22:08 +01:00
Stefanos A 25f3305f3e Merge branch 'modes' 2013-11-11 11:45:15 +01:00
Stefanos A. 873f8fb6eb Cleaned up test code committed by mistake. 2013-11-11 11:44:21 +01:00
Stefanos A. 12005e0792 Try to create Embedded context first
By mistake, this code would always create a desktop context. The correct
approach is to create an embedded (EGL) context and only fallback to
desktop if that doesn't work.
2013-11-11 11:43:15 +01:00
Stefanos A. 0d0f578788 Enabled SAMPLE_BUFFERS EGL attribute
This attribute is required for multisampling support.
2013-11-11 11:42:30 +01:00
thefiddler 8360b7a2ba Generate overloads without strong enums for 1.0 compat
OpenTK 1.0 and Xamarin Android/iOS do not use strongly-typed enums for
OpenGL ES. Generate overloads with the "All" enum in order to maintain
compatibility.
2013-11-11 10:03:24 +01:00
thefiddler 4d717dcdda Allow '+' and '-' cmdline options for compatibility settings 2013-11-11 10:02:08 +01:00
thefiddler 8e9a9355b0 Allow overriding of Settings.Compatibility 2013-11-11 10:01:30 +01:00
thefiddler 0fcf3a2f40 Minor code cleanup 2013-11-11 10:01:15 +01:00
thefiddler af16be42d5 Corrected Parameter.IsEnum property 2013-11-11 10:00:54 +01:00
thefiddler dde7c645c4 Removed unused code 2013-11-11 10:00:32 +01:00
thefiddler 2c9d574b08 Merge branch 'modes' of https://github.com/thefiddler/opentk 2013-11-10 19:11:05 +01:00
Stefanos A. c66b22a1f3 Updated convenience overloads 2013-11-10 19:04:18 +01:00
Stefanos A. d0e025b86d Restrict convenience overloads
Only Get*, Gen*, Delete* and New* functions get convenience overloads.
This avoids issues with functions such as Rect() that have similar
signatures but cannot use such overloads.

This restriction will be relaxed in the future.
2013-11-10 19:03:49 +01:00
Stefanos A. 293c020151 Added WrapperTypes.ConvenienceArrayType
These are convenience parameters for function receiving a size and an
array parameter, like DeleteTextures(int n, int[] ids). The generator
will now add overloads taking a single parameter, such as
DeleteTexture(int id).
2013-11-10 18:29:53 +01:00
Stefanos A. 8003d06315 Move convenience overloads to generator
The generator now handles the creation of convenience overloads. These
must be removed from the helper classes to avoid redefinition errors.
2013-11-10 15:36:53 +01:00
Stefanos A. af7fdea449 Return types must be cls-compliant
CreateCLSCompliantWrappers must always change return types into
cls-compliant types. The reason is that we cannot overload on return
type alone, so we should always choose the compliant version.
2013-11-10 15:35:47 +01:00
Stefanos A. 6098fa05ce Plural name to singular in convenience overloads 2013-11-10 10:16:47 +01:00
Stefanos A. 11c1071625 Corrected declarations in convenience overloads 2013-11-10 10:08:04 +01:00
Stefanos A. 089c108ea0 Corrected indentation 2013-11-10 09:20:54 +01:00
Stefanos A. 5aad11f6ee Generate bindings for testing (WIP2) 2013-11-10 09:18:15 +01:00
Stefanos A. 06ad3bf1dc Generate bindings for testing (WIP) 2013-11-10 09:14:30 +01:00
Stefanos A. c1cb70d215 Improve indentation for doc comments
Doc comments are now split at their source, as a first step in
normalizing their indentation between VS and MD.
2013-11-10 09:12:42 +01:00
thefiddler d126d25215 Add helper overload generation
Functions returning a value or array via an 'out' parameter will now get a convenience overload that returns the result via a return statement. In the case of arrays, only single-valued arrays will be supported. For example:

void GetIntegerv(enum pname, out int value)

will be get an overload of

int GetIntegerv(enum pname)

This will reduce the amount of helper overloads that must be maintained manually in GLHelpers.cs.
2013-11-10 08:28:58 +01:00
thefiddler 0d73706c88 Added new WrapperTypes; removed unused code
New WrapperTypes for convenience functions: ConvenienceReturnType to
replace an "out" parameter by a return value, and
ConvenienceArrayReturnType to replace an out array parameter by a
single return value (array count of 1 only).
2013-11-09 19:24:43 +01:00