Commit graph

581 commits

Author SHA1 Message Date
thefiddler
61791c91db [Bind] Do not skip parameters in documentation
Multiple parameters may share a single description. The DocProcessor
will now correctly generate DocumentationParameters for each of them.
2014-03-30 19:16:30 +02:00
thefiddler
21b328992a [Bind] Remove xmlns to simplify xpath processing 2014-03-30 11:01:03 +02:00
thefiddler
243f41b83f [Bind] Use DocumentationParameter instead of KeyValuePair 2014-03-30 10:43:30 +02:00
thefiddler
bd9f760f4b [Bind] Merge GL2 and GL4 documentation into one 2014-03-30 10:29:50 +02:00
thefiddler
033e0b7155 [Bind] Concatenate multiline documentation 2014-03-30 10:29:11 +02:00
thefiddler
67b0ead68b [Bind] Process documentation from subdirectories
Instead of using xslt, we now process the documentation in code. This
allows us to fix mismatches from e.g. invalid parameter names that
sometimes creep in the specs.
2014-03-28 20:08:38 +01:00
thefiddler
22a706e44f [Bind] Added documentation files for OpenGL ES 2014-03-28 20:06:55 +01:00
thefiddler
db913ca3f4 [GL] Added missing [Rgba]16Snorm texture formats
See https://www.opengl.org/sdk/docs/man4/html/glTexImage2D.xhtml or the
4.4 spec, section 8.5, table "Sized internal color formats".
2014-03-18 12:08:02 +01:00
thefiddler
02bf55ad7e [ES] Fixed loading of OpenGL ES core API
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.)
2014-03-16 19:40:49 +01:00
thefiddler
d12bd18158 Merge branch 'gl_Mar2014' into develop 2014-03-13 19:39:37 +01:00
thefiddler
d7614f5718 [Bind] Clean up BindStreamWriter implementation
Instead of inheriting and overriding StreamWriter methods, it now
forwards its parameters to an internal StreamWriter, after applying the
necessary formatting changes.

This shields us from the StreamWriter implementation differences
between .Net and Mono.
2014-03-13 18:44:36 +01:00
thefiddler
cf728a631e [Bind] Added overloads for backwards compatibility 2014-03-13 18:42:37 +01:00
thefiddler
a7516dc9b9 [Graphics] Improve compatibility with Feb2014 release (WIP) 2014-03-13 11:56:21 +01:00
thefiddler
13e80a7c06 Fix discrepancies between mono and .net 2014-03-12 18:13:05 +01:00
thefiddler
1c6cfc390b Updated OpenGL definitions 2014-03-12 18:12:38 +01:00
Fraser Waters
641225a312 Add length helper text to params.
If a param has ComputeSize text add [length: {0}] helper text to the documentation.
2014-03-10 22:13:53 +00:00
Fraser Waters
0c89435add Store count attribue in ComputeSize.
Also remove the COMPSIZE() text if present.
2014-03-10 22:13:26 +00:00
Fraser Waters
7cdd880759 Add string ComputeSize to Parameter. 2014-03-10 21:40:26 +00:00
thefiddler
30571f7532 Merge pull request #58 from Frassle/develop
Replace non-breaking space.
2014-02-11 23:54:47 +01:00
Fraser Waters
a18fb1ebaa Remove non-breaking space.
Causes the build on Ubuntu to fail.
2014-02-11 16:36:31 +00:00
thefiddler
d8eda71a2c [GL] Added missing ActiveUniformType.FloatMat3x2 token 2014-02-04 14:26:52 +01:00
Stefanos A
39a216f1ac Added overloads for compatibility with svn r3127
Several projects are still using the last svn revision from the
sourceforge repository (r3127). These overloads provide an upgrade path
from r3127 to OpenTK 1.1.
2013-12-16 01:55:05 +01:00
Stefanos A
78acd27c4c Updated OpenGL documentation to Khronos r24522 2013-12-15 22:32:32 +01:00
Stefanos A
aeb7a72d79 Eliminated CLS-compliance warnings in the bindings 2013-12-15 22:01:45 +01:00
parallels
b31e0e8474 Compatibility fixes for Mono 2.10
The Mono 2.10 compiler fails when compiling extern methods that are not
marked as DllImport. We fix that by adding a method body that throws a
NotImplementedException instead.

Additionally, MonoDevelop 2.8 cannot open sln files with ToolsVersion 12.
The fix is to change ToolsVersion to 11.
2013-12-15 18:27:24 +01:00
Stefanos A
dfd683ef49 Merge master into no-reflect 2013-12-15 16:36:37 +01:00
Stefanos A.
a4f59f7384 Split binaries for library and supporting tools
Tools now go to the Binaries/Tools/[Debug|Release] directory. OpenTK
remains at BInaries/OpenTK/[Debug|Release].

Mono.Cecil and IKVM now reside under the Dependencies/managed/
directory.
2013-12-05 18:43:47 +01:00
Stefanos A
e59405dab3 Implemented manual marshaling of string parameters 2013-12-04 22:32:56 +01:00
Stefanos A
e2801c8c6c Convert string[] callsites to IntPtr
This fixes the signature mismatch between the new marshaling code and
the callsites.
2013-12-04 21:22:33 +01:00
Stefanos A
4286b47d6f Clean up wrapper generation
We can now apply multiple WrapperTypes values to a single parameter.
2013-12-03 09:10:36 +01:00
Stefanos A
e178f306eb Update WrapperTypes values for [Flags] 2013-12-03 09:09:19 +01:00
Stefanos A
78c0c0d16e Removed unused code 2013-12-02 16:30:14 +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
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
ac65eb7b09 Added MonoDevelop artifacts 2013-11-27 00:05:26 +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
4149cdfa88 Do not emit method bodies. 2013-11-26 01:31:29 +01:00
Stefanos A.
84a1e5a739 Initial work on Pin<> statements (WIP) 2013-11-25 20:00:22 +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.
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
0fea0a19b7 Added support for lazy binding loading 2013-11-22 20:06:49 +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
02120f429f Do not trim 's' from Groups 2013-11-20 08:16:06 +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
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