Commit graph

606 commits

Author SHA1 Message Date
thefiddler
2a84104262 Merge pull request #157 from thefiddler/warnfix
Fix all build warnings on VS2013 and Mono 3.4.0
2014-07-21 18:05:20 +02:00
thefiddler
093dd1d1ca [Bind] Fixed an issue where CLS-compliance was incorrectly overriden 2014-07-21 16:53:02 +02:00
thefiddler
6d1149cccd [GL] BufferObjects and TextureUnit are not obsolete 2014-07-21 16:34:21 +02:00
thefiddler
c046584aaf [Bind] Implemented CLS-compliant checks for Enums 2014-07-21 16:25:21 +02:00
thefiddler
bf65005e7b [Bind] Added Enum.Obsolete property 2014-07-21 16:02:56 +02:00
thefiddler
33c9fe5025 [ES] Marked obsolete enums as such 2014-07-21 16:02:32 +02:00
thefiddler
cab9e85386 [Bind] Enums can now be marked as obsolete 2014-07-21 16:02:18 +02:00
thefiddler
5cac37a4f5 [GL] Synced with the July 2014 Khronos spec
This version fixes various issues in the OES_byte_coordinates extension
and improves the documentation on parameter lengths.
2014-07-21 09:19:29 +02:00
thefiddler
28746e85cc [ES][GL] Synced with June 2014 specifications
This introduces support for the following extensions:
- EXT_geometry_point_size
- EXT_primitive_bounding_box
- EXT_texture_array
- EXT_tessellation_point_size
2014-06-19 16:24:40 +02:00
thefiddler
c0f6d4bc79 [Bind] Fixed a System.FormatException 2014-06-08 09:57:48 +02:00
thefiddler
92efb5957f [Bind] Use byte for GLboolean return types
GLboolean is typedefed as an unsigned char.  It appears that `[return:
MarshalAs(UnmanagedType.U1)]` is ignored in calli p/invokes, so we need
to take care of this ourselves by emitting byte instead of bool for the
p/invoke signature. The public API remains unchanged.

Fixes issue #129.
2014-06-08 09:52:12 +02:00
thefiddler
a6bdd2840c [Graphics] Synced with May 2014 Khronos spec 2014-05-19 23:03:39 +02:00
thefiddler
bfaff0bd66 [GL] Added generic RenderbufferStorage depth-stencil formats
According to the OpenGL 4.4 specification, RenderbufferStorage accepts
both generic and sized depth-stencil formats (DepthComponent and
DepthStencil). See sections 9.2.4, 9.2.5 and 9.4.
2014-05-07 23:21:24 +02:00
thefiddler
168713aecf [GL] Added GetPName.Max*ImageUniforms
These tokens were introduced in OpenGL 4.2 and 4.3.
2014-04-27 22:47:04 +02:00
thefiddler
6186373df1 [ES][GL] Synced with April Khronos specification 2014-04-27 09:53:22 +02:00
thefiddler
bd339523ab [Bind] Do not generate DllImports
These break dynamic loading of OpenGL ES and bloat OpenTK.dll with
duplicated strings. The new extension loading mechanism is now fast
enough to make DllImports unnecessary.
2014-04-26 14:22:37 +02:00
thefiddler
6257858d54 [Bind][ES][GL] Output entry points as byte[]
Moving from string[] to byte[] reduces startup memory allocations
tremendously (up to 70% lower memory use on Windows!)
2014-04-25 17:25:20 +02:00
thefiddler
774ebd1df7 [Bind] Do not generate slots for OpenGL <= v1.1
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.
2014-04-25 12:14:28 +02:00
thefiddler
4ae65c86ff [GL] Added missing GetPName.MaxPatchVertices 2014-04-25 11:11:42 +02:00
thefiddler
bd920a15f2 [Bind] Corrected CSharpSpecWriter output and warning messages
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.
2014-03-31 17:40:15 +02:00
thefiddler
d68c31a561 [Bind] Move documentation generation to DocProcessor class
This de-duplicates a large amount of code that is shared between the
various ISpecWriter implementations.
2014-03-31 17:09:30 +02:00
thefiddler
8001d62599 [Bind] Make documentation output closer to previous xslt implementation 2014-03-31 10:10:56 +02:00
thefiddler
9012101e8c [Bind] Propagate ComputeSize attribute in cloned Parameters 2014-03-31 10:09:33 +02:00
thefiddler
e11b7ca993 [Bind] More aggressive trimming of documentation strings 2014-03-31 09:51:15 +02:00
thefiddler
570d08fff1 [Bind] Add NoIndent option to BindStreamWriter 2014-03-31 09:50:51 +02:00
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