platform/core/csapi/opentk.git
11 years agoUse paths without apiversion attribute
Stefanos A [Thu, 7 Nov 2013 15:48:11 +0000 (16:48 +0100)]
Use paths without apiversion attribute

Paths that don't define a "version" attribute will now match all
possible versions. This will make it easier to add support for newer
APIs as they are introduced.

11 years agoRemoved non-existent token from OpenGL
Stefanos A [Thu, 7 Nov 2013 15:46:38 +0000 (16:46 +0100)]
Removed non-existent token from OpenGL

COMPRESSED_ALPHA_BPTC_UNORM does not appear to be defined anywhere.
Removed.

11 years agoCorrected ES 2.0 enums
Stefanos A [Thu, 7 Nov 2013 15:25:19 +0000 (16:25 +0100)]
Corrected ES 2.0 enums

After the previous commit, several ES 2.0 functions would refer to
enums found in ES 3.0. These enums have been copied to ES 2.0, either
as core enums or as extensions.

11 years agoMerged ES2.0 and ES3.0 replacements
Stefanos A [Thu, 7 Nov 2013 10:37:51 +0000 (11:37 +0100)]
Merged ES2.0 and ES3.0 replacements

ES 3.0 includes ES 2.0 verbatim. We can significantly reduce
duplication by using the same <replace> node for both APIs. Note that
the enumerations must remain separate, as ES 2.0 and 3.0 support
different tokens.

11 years agoES 3.0 fixed enums for GetIntegeri_v and GetInteger64i_v
Stefanos A [Thu, 7 Nov 2013 09:58:02 +0000 (10:58 +0100)]
ES 3.0 fixed enums for GetIntegeri_v and GetInteger64i_v

These functions have a first parameter named "target", not "pname".
Fixed now.

11 years agoES 3.0 fixed enums for GetInteger64*
Stefanos A [Thu, 7 Nov 2013 09:39:20 +0000 (10:39 +0100)]
ES 3.0 fixed enums for GetInteger64*

GetInteger64v should accept GetPName, while GetInteger64i_v should
accept GetIndexedPName.

11 years agoES 3.0 strong enums for DrawBuffersEXT and NV
Stefanos A [Thu, 7 Nov 2013 09:33:02 +0000 (10:33 +0100)]
ES 3.0 strong enums for DrawBuffersEXT and NV

Relax the extension constraint in DrawBuffers, in order to add strong
enums to the extension varieties of this function.

11 years agoES 3.0 strong enums for DrawArrays*() and Draw*Elements*()
Stefanos A [Thu, 7 Nov 2013 09:17:33 +0000 (10:17 +0100)]
ES 3.0 strong enums for DrawArrays*() and Draw*Elements*()

The strongly-typed enums include core and extension varieties.

11 years agoFixed typo in ES3Generator.cs
Stefanos A [Thu, 7 Nov 2013 09:09:17 +0000 (10:09 +0100)]
Fixed typo in ES3Generator.cs

The DllImports file should be named ES30Core.cs, not ES3Core.cs. Fixed
now.

11 years agoFixed misspelled and missing enums
Stefanos A [Thu, 7 Nov 2013 08:47:27 +0000 (09:47 +0100)]
Fixed misspelled and missing enums

11 years agoFixed enums for (Get)ObjectLabel
Stefanos A [Thu, 7 Nov 2013 08:34:48 +0000 (09:34 +0100)]
Fixed enums for (Get)ObjectLabel

ObjectLabel and GetObjectLabel are part of KHR_debug.

11 years agoFixed enums for GetDebugMessageLog
Stefanos A [Thu, 7 Nov 2013 07:39:57 +0000 (08:39 +0100)]
Fixed enums for GetDebugMessageLog

GetDebugMessageLog was misspelled as GetMessageDebugLog. This is now
fixed.

11 years agoFixed strong-enums for GetDebugMessageLog
Stefanos A [Thu, 7 Nov 2013 07:36:23 +0000 (08:36 +0100)]
Fixed strong-enums for GetDebugMessageLog

GetDebugMessageLog is part of KHR_debug.

11 years agoFixes for ES 3.0 strongly-typed enums
Stefanos A [Thu, 7 Nov 2013 07:33:17 +0000 (08:33 +0100)]
Fixes for ES 3.0 strongly-typed enums

Fixed parameter mismatches in CopyBufferSubData and BlendFuncSeparate.
Implemented KHR_debug extension.

11 years agoMerge branch 'master' of https://github.com/thefiddler/opentk
Stefanos A [Thu, 7 Nov 2013 07:15:18 +0000 (08:15 +0100)]
Merge branch 'master' of https://github.com/thefiddler/opentk

11 years agoStrongly-typed enums for ES 3.0 (complete)
Stefanos A [Thu, 7 Nov 2013 07:14:49 +0000 (08:14 +0100)]
Strongly-typed enums for ES 3.0 (complete)

Implemented sectiosn: Pixel Rectangles. Binding & Managing Framebuffer
Objects, Renderbuffer Objects, Attaching Renderbuffer Images to
Framebuffer, Attaching Texture Images to Framebuffer, Framebuffer
Completeness, Invaildating Framebuffer Contents, Renderbuffer Object
Queries, Simple Queries, String Queries.

11 years agoFixed number of buffers
Stefanos A. [Wed, 6 Nov 2013 00:04:59 +0000 (01:04 +0100)]
Fixed number of buffers

ContextAttribute.DOUBLEBUFFER is a boolean in SDL (false->single
buffering, true->double buffering). We need to adjust the number of
buffers accordingly (single buffering->1 buffer, double buffering->2
buffers).

11 years agoSwitch to EnumDisplayModesEx
Stefanos A [Tue, 5 Nov 2013 22:41:42 +0000 (23:41 +0100)]
Switch to EnumDisplayModesEx

Use EnumDisplayModesEx instead of EnumDisplayModes. This might help
with issue #6.

11 years agoAdded workaround for issue #6
Stefanos A [Tue, 5 Nov 2013 22:21:49 +0000 (23:21 +0100)]
Added workaround for issue #6

The issue is that some display devices report a BitsPerPel value of 0.
It is not clear whether this is a bug in WinDisplayDevice.cs or some
strange windows issue. The implemented workaround adds an entry to the
debug log and hardcodes BitsPerPel to 32 whenever this condition is
encountered. More investigation required.

11 years agoStrongly-typed enums for ES 3.0 (WIP8)
Stefanos A [Tue, 5 Nov 2013 09:23:25 +0000 (10:23 +0100)]
Strongly-typed enums for ES 3.0 (WIP8)

Implemented sections: Hints and Sync Object Quries.
Renamed SyncParameter to SyncParameterName, as per the OpenGL naming
conventions.

11 years agoStrongly-typed enums for ES 3.0 (WIP7)
Stefanos A [Tue, 5 Nov 2013 08:53:34 +0000 (09:53 +0100)]
Strongly-typed enums for ES 3.0 (WIP7)

Implemented section: Sync Objects and Fences [5.2].
Fixed desktop OpenGL wrapper for ClientWaitSync and FenceSync.

11 years agoMoved overload to overrides.xml
Stefanos A [Tue, 5 Nov 2013 08:44:20 +0000 (09:44 +0100)]
Moved overload to overrides.xml

Overloads for backwards compatibility should now be placed in an
<overload> element inside overrides.xml.

11 years agoImplemented support for <overload> element
Stefanos A [Tue, 5 Nov 2013 07:55:52 +0000 (08:55 +0100)]
Implemented support for <overload> element

The <overload> element simplifies the addition of overloads for
backwards compatibility. It is defined similar to the <replace>
element, but instead of replacing the parameters of a function
in-place, it adds a new overload and modifies the overload instead.

11 years agoStrongly-typed enums for ES 3.0 (WIP6)
Stefanos A [Mon, 4 Nov 2013 22:25:02 +0000 (23:25 +0100)]
Strongly-typed enums for ES 3.0 (WIP6)

Implemented strongly-typed enums for sections: Selecting a Buffer for
Writing, Fine Control of Buffer Updates, Clearing the Buffers.

11 years agoStrongly-typed enums for ES 3.0 (WIP5)
Stefanos A [Mon, 4 Nov 2013 22:01:25 +0000 (23:01 +0100)]
Strongly-typed enums for ES 3.0 (WIP5)

Implemented sections: Stencil Test, Depth Buffer Test, Blending.

11 years agoStrongly-typed enums for ES 3.0 (WIP4)
Stefanos A [Mon, 4 Nov 2013 21:27:06 +0000 (22:27 +0100)]
Strongly-typed enums for ES 3.0 (WIP4)

Implemented sections: Texture Image Specification, Alternative Texture
Image Specification, Compressed Texture Images, Texture Parameters,
Manual Mipmap Generation and Enumerated Queries.

11 years agoAdded "reuse" directive for enums
Stefanos A [Mon, 4 Nov 2013 21:26:06 +0000 (22:26 +0100)]
Added "reuse" directive for enums

Sometimes an enum may reuse the tokens of another enum verbatim
(possibly adding a few extra tokens.) The reuse directive simplifies
the handling of this case:
<enum name="Foo">
  <reuse enum="Bar" />
</enum>

11 years agoStrongly-typed enums for ES 3.0 (WIP3)
Stefanos A [Mon, 4 Nov 2013 18:49:25 +0000 (19:49 +0100)]
Strongly-typed enums for ES 3.0 (WIP3)

Implemented sections: Texturing, Sampler Objects, Sampler Queries,
Texture Image Specification.

11 years agoRespect apiversion in overrides
Stefanos A [Mon, 4 Nov 2013 18:32:52 +0000 (19:32 +0100)]
Respect apiversion in overrides

We should not use overrides from foreign apiversions.

11 years agoStrongly-typed enums for ES 3.0 (WIP2)
Stefanos A [Sun, 3 Nov 2013 23:04:09 +0000 (00:04 +0100)]
Strongly-typed enums for ES 3.0 (WIP2)

Added strongly-typed enums for sections: Vertices, Shaders and
Programs. Added a number of missing enums for ES 2.0. Normalized
several APIs between OpenGL and OpenGL ES.

11 years agoStrongly-typed enums for ES 3.0 (WIP)
Stefanos A [Sun, 3 Nov 2013 20:30:25 +0000 (21:30 +0100)]
Strongly-typed enums for ES 3.0 (WIP)

Implemented strongly-typed enums for sections: Buffer Objects,
Asynchronous Queries, Transform Feedback, ReadingandCopying Pixels and
Rasterization.

11 years agoNo extension attribute now matches all extensions
Stefanos A [Sun, 3 Nov 2013 20:28:24 +0000 (21:28 +0100)]
No extension attribute now matches all extensions

This allows us to reduce the amount of clutter in overrides.xml.

11 years agoMerge Delegate.Version
Stefanos A [Sun, 3 Nov 2013 19:41:29 +0000 (20:41 +0100)]
Merge Delegate.Version

When a Delegate is defined multiple times in the spec, we should check
if any of these definitions contains a proper Delegate.Version and
store that. This improves the self-documentation aspect of the bindings.

11 years agoRegenerated the bindings using the latest specs
Stefanos A [Sun, 3 Nov 2013 19:36:22 +0000 (20:36 +0100)]
Regenerated the bindings using the latest specs

11 years agoMore PrimitiveType->BeginMode overrides
Stefanos A [Sun, 3 Nov 2013 19:35:02 +0000 (20:35 +0100)]
More PrimitiveType->BeginMode overrides

11 years agoMino fix in debug output
Stefanos A [Sun, 3 Nov 2013 19:34:18 +0000 (20:34 +0100)]
Mino fix in debug output

ParameterCollection.ToString() adds parentheses around its output, so
Delegate.ToString() should avoid adding a second pair.

11 years agoES 3.0 contains both 2.0 and 3.0 bindings
Stefanos A [Sun, 3 Nov 2013 19:33:14 +0000 (20:33 +0100)]
ES 3.0 contains both 2.0 and 3.0 bindings

This is in accordance to the upstream gl3.h for ES 3.0.

11 years agogles1 API contains both versions 1.0 and 1.1
Stefanos A [Sun, 3 Nov 2013 19:32:47 +0000 (20:32 +0100)]
gles1 API contains both versions 1.0 and 1.1

Khronos no longer distinguishes between ES 1.0 and 1.1.

11 years agoTake api version into account
Stefanos A [Sun, 3 Nov 2013 19:32:10 +0000 (20:32 +0100)]
Take api version into account

XmlSpecReader will now respect version attributes and will avoid
inserting foreign tokens into the generated bindings.

11 years agoMaintain api version information on converted signatures
Stefanos A [Sun, 3 Nov 2013 19:30:43 +0000 (20:30 +0100)]
Maintain api version information on converted signatures

Signatures were split into 4 APIs before (gl, glcore, gles1, gles2).
However, gles2 contains bindings for both version 2.0 and 3.0. The
version information is now maintained, which allows us to cut down on
the number of generated enumerations.

11 years agoImprove debug output
Stefanos A [Sun, 3 Nov 2013 19:28:57 +0000 (20:28 +0100)]
Improve debug output

Function parameters are now displayed during binding generation.

11 years agoMerge categories for redefined functions
Stefanos A. [Sun, 3 Nov 2013 18:13:49 +0000 (19:13 +0100)]
Merge categories for redefined functions

Now that we support function overloads, it is safe to ignore functions
that are defined multiple times. We just merge their Category
properties if they are not identical.

11 years agoImproved detection of deprecated tokens
Stefanos A [Sun, 3 Nov 2013 16:58:28 +0000 (17:58 +0100)]
Improved detection of deprecated tokens

11 years agoAdded PrimitiveType <=> BeginMode overloads
Stefanos A. [Sun, 3 Nov 2013 15:11:39 +0000 (16:11 +0100)]
Added PrimitiveType <=> BeginMode overloads

Khronos renamed BeginMode to PrimitiveType starting with GL 4.4.
OpenTK now has overloads for both flavors.

11 years agoAllow overloads of the same function
Stefanos A. [Sun, 3 Nov 2013 15:09:11 +0000 (16:09 +0100)]
Allow overloads of the same function

It is now possible to define multiple overloads of the same function,
each with different parameters. This is extremely useful for
maintaining backwards compatibility in the face of the changes between
GL 4.3 and 4.4.

11 years agoUpdated to the latest gl4 specs and docs
Stefanos A [Sun, 3 Nov 2013 11:43:50 +0000 (12:43 +0100)]
Updated to the latest gl4 specs and docs

Large code-drop from Khronos upstream.

11 years agoChange debug commandline
Stefanos A [Sun, 3 Nov 2013 11:37:56 +0000 (12:37 +0100)]
Change debug commandline

The default commandline parameters will now automatically download and
convert the upstream gl.xml from the public Khronos repository.

11 years agoBindings for GL4.4, ES1.1, ES2.0 and ES3.0
Stefanos A [Sun, 3 Nov 2013 11:34:19 +0000 (12:34 +0100)]
Bindings for GL4.4, ES1.1, ES2.0 and ES3.0

The new bindings are based on the fresh gl.xml registry by the Khronos
group.

11 years agoAdded DebugProc for KHR_debug
Stefanos A [Sun, 3 Nov 2013 11:33:17 +0000 (12:33 +0100)]
Added DebugProc for KHR_debug

11 years agoUpdated using the latest converter
Stefanos A [Sun, 3 Nov 2013 11:32:54 +0000 (12:32 +0100)]
Updated using the latest converter

Tokens are now sorted according to their value, exactly is in the
upstream gl.xml spec. Additionally, gles1 and gles2 now include the
pre-defined groups in the specification.

11 years agoEnum groups are now added to all APIs
Stefanos A [Sun, 3 Nov 2013 11:19:49 +0000 (12:19 +0100)]
Enum groups are now added to all APIs

Enum groups are also referenced by OpenGL ES commands. They are now
added to all APIs by default.

11 years agoTrim elements when reading them
Stefanos A. [Sun, 3 Nov 2013 11:17:09 +0000 (12:17 +0100)]
Trim elements when reading them

Sometimes elements in overrides.xml contain extra spaces due to typos,
which are quite difficult to track down. The XmlSpecReader can now
cope with that.

11 years agoReplace in-place instead of removing/readding
Stefanos A. [Sun, 3 Nov 2013 11:16:07 +0000 (12:16 +0100)]
Replace in-place instead of removing/readding

There is no reason to remove and readd a Constant in order to replace
it in a ConstantCollection. We can actually do that in-place.

11 years agoEnum tokens are now sorted
Stefanos A. [Sun, 3 Nov 2013 11:15:08 +0000 (12:15 +0100)]
Enum tokens are now sorted

This only affects the in-memory representation - sorted tokens are
easier to debug.

11 years agoUse OpenTK.Graphics.OpenGL4 namespace for GL4.x
Stefanos A. [Sun, 3 Nov 2013 11:14:13 +0000 (12:14 +0100)]
Use OpenTK.Graphics.OpenGL4 namespace for GL4.x

11 years agoDefaultOutputPath now matches OpenTK source tree
Stefanos A. [Sun, 3 Nov 2013 11:13:35 +0000 (12:13 +0100)]
DefaultOutputPath now matches OpenTK source tree

By default, generated bindings are placed in the source tree of
OpenTK. This can be overriden via a commandline switch.

11 years agoImproved debug output on high-order pointers
Stefanos A. [Sun, 3 Nov 2013 11:12:39 +0000 (12:12 +0100)]
Improved debug output on high-order pointers

OpenTK does not currently support generating bindings for pointers of
order 3 or higher. No OpenGL or OpenGL ES API currently uses such
pointers, so we just issue a warning message if such an API is
encountered in the future.

11 years agoAdded missing enums to gles2 profile
Stefanos A. [Sun, 3 Nov 2013 11:10:52 +0000 (12:10 +0100)]
Added missing enums to gles2 profile
Fixed undefined reference in TextureCompareMode.COMPARE_REF_TO_TEXTURE
and added strongly-typed enums for KHR_debug.

11 years agoCorrected ShaderSource for gles2 and ARB
Stefanos A. [Sun, 3 Nov 2013 01:25:15 +0000 (02:25 +0100)]
Corrected ShaderSource for gles2 and ARB
The length parameter should be an array of integers, one for each
string in the shader source. The string parameter does not need to be
translated.

11 years agoAdded doc comment on ColorFormat.Empty.
Stefanos A. [Sun, 3 Nov 2013 00:44:31 +0000 (01:44 +0100)]
Added doc comment on ColorFormat.Empty.

11 years agoAligned release and debug configurations
Stefanos A [Sun, 3 Nov 2013 00:38:38 +0000 (01:38 +0100)]
Aligned release and debug configurations

Now release and debug configurations will build the same projects.

11 years agoAdded generators for ES 2.0 and 3.0
Stefanos A [Sun, 3 Nov 2013 00:29:32 +0000 (01:29 +0100)]
Added generators for ES 2.0 and 3.0

11 years agoUpdated license information
Stefanos A [Sun, 3 Nov 2013 00:28:46 +0000 (01:28 +0100)]
Updated license information

11 years agoCleaned up the generator constructors
Stefanos A [Sun, 3 Nov 2013 00:28:01 +0000 (01:28 +0100)]
Cleaned up the generator constructors

11 years agoAdded missing newline
Stefanos A [Sun, 3 Nov 2013 00:27:33 +0000 (01:27 +0100)]
Added missing newline

Methods are now separated by a single newline.

11 years agoDo not override user defined output files
Stefanos A [Sun, 3 Nov 2013 00:27:10 +0000 (01:27 +0100)]
Do not override user defined output files

The generator will now change the default output files to match its
bindings (e.g. GL vs ES), but the user is now able to override this
option.

11 years agoAdded apiversion support
Stefanos A [Sun, 3 Nov 2013 00:25:47 +0000 (01:25 +0100)]
Added apiversion support

11 years agoAdded support for overriding default output files
Stefanos A [Sun, 3 Nov 2013 00:25:27 +0000 (01:25 +0100)]
Added support for overriding default output files

This makes it possible to generate different output files when using
-mode:all to generate multiple bindings in the same run.

11 years agoAdded gles2; added missing fog groups
Stefanos A [Sun, 3 Nov 2013 00:24:31 +0000 (01:24 +0100)]
Added gles2; added missing fog groups

11 years agoAdded support for distinguishing between api versions
Stefanos A [Sun, 3 Nov 2013 00:24:02 +0000 (01:24 +0100)]
Added support for distinguishing between api versions

The registry reuses the "gles2" apiname for both OpenGL ES 2.0 and 3.0.
The generator will now use the apiversion attribute to distinguish
between the two APIs.

11 years agoConvert "String *" to "String"
Stefanos A [Sun, 3 Nov 2013 00:22:44 +0000 (01:22 +0100)]
Convert "String *" to "String"

As a sideeffect of the group element definition, the parser will
convert a ptype of "const GLubyte *" with a group of "String" to
"String *", which is not the correct result. GLXmlParser will now
detect and fix this condition that affects the GetString function of
families.

11 years agoAdded GetOverridesPath method
Stefanos A [Sun, 3 Nov 2013 00:20:17 +0000 (01:20 +0100)]
Added GetOverridesPath method

GetOverridesPath encapsulates the code that retrieves an override enum
or function from overrides.xml. Additionally, it now supports names and
extensions with multiple values (e.g. extension="Core|Ext").

11 years agoMark signatures.xml version
Stefanos A. [Sat, 2 Nov 2013 22:40:09 +0000 (23:40 +0100)]
Mark signatures.xml version

GLXmlParser now explicitly marks its output with version="2", while
the older .spec parsers produce version="1" signatures. The binding
generator uses the newer API to support multiple apinames in the same
file.

11 years agoRefactor apiname extraction
Stefanos A. [Sat, 2 Nov 2013 22:37:34 +0000 (23:37 +0100)]
Refactor apiname extraction

A dedicated function is now used for getting the apiname of an enum or command element. This reduces code duplication.

11 years agoFixed newline and indentation behavior
Stefanos A. [Fri, 1 Nov 2013 13:00:46 +0000 (14:00 +0100)]
Fixed newline and indentation behavior

Mono and .Net have a few minor differences in their StreamWriter
implementations. Added workarounds to produce identical output on all
platforms.

11 years agoFixed infinite recursion issue.
Stefanos A. [Fri, 1 Nov 2013 10:42:42 +0000 (11:42 +0100)]
Fixed infinite recursion issue.

11 years agoRegenerated bindings with the latest generator
Stefanos A. [Fri, 1 Nov 2013 08:29:42 +0000 (09:29 +0100)]
Regenerated bindings with the latest generator

The new bindings have improved enum documentation and fix an issue with
incorrect overloads in wrappers with generic parameters.

11 years agoAvoid singletons; allow -mode:all
Stefanos A. [Fri, 1 Nov 2013 08:28:54 +0000 (09:28 +0100)]
Avoid singletons; allow -mode:all

Explicit Settings objects are now created for each generator. A new
-mode:all option has been added, which generates bindings for all APIs
in one go (useful for the post-GL4.4 specs, which collect all APIs in a
single file.)

11 years agoAvoid singletons; collect code generation
Stefanos A. [Fri, 1 Nov 2013 08:27:46 +0000 (09:27 +0100)]
Avoid singletons; collect code generation

ISpecWriter implementations must now store explicit references to a
Settings object. Additionally, all code generation is now handled inside
the ISpecWriter implementation (it used to be scattered over all Type,
Parameter, etc classes resulting in unmaintainable spaghetti code.)

11 years agoAvoid singletons
Stefanos A. [Fri, 1 Nov 2013 08:26:13 +0000 (09:26 +0100)]
Avoid singletons

A reference to a Settings instance must now be stored explicitly.

11 years agoUpdated IBind implementations to avoid singletons
Stefanos A. [Fri, 1 Nov 2013 08:25:31 +0000 (09:25 +0100)]
Updated IBind implementations to avoid singletons

IBind implementations must now store explicit references to Settings,
GLTypes and CSTypes instances. This allows us to use multiple
configurations in the same process.

11 years agoAvoid singletons; collect all translation logic
Stefanos A. [Fri, 1 Nov 2013 08:24:18 +0000 (09:24 +0100)]
Avoid singletons; collect all translation logic

FuncProcessor now implements all translation logic for types, parameters
and functions. This used to be scattered in the various classes (Type,
Parameter, etc) resulting in a rather disgusting spaghetti. Code
generation has been removed from FuncProcessor and is now handled by the
various language-specific ISpecWriter backends.

11 years agoAvoid singletons; improve ToString()
Stefanos A. [Fri, 1 Nov 2013 08:21:50 +0000 (09:21 +0100)]
Avoid singletons; improve ToString()

This is part of a long-due series of source cleanup patches. ToString()
is no longer used for code generation (code generation is handled by an
ISpecWriter instance.) Enum is no longer public. EnumCollection now
exposes its backing store through an interface, rather than a concrete
class (simpler to change backing store in the future.)

11 years agoAvoid singletons; improved ToString()
Stefanos A. [Fri, 1 Nov 2013 08:18:53 +0000 (09:18 +0100)]
Avoid singletons; improved ToString()

This is part of a long-due series of source cleanup patches. ToString()
is no longer used for code generation (this is handled by an ISpecWriter
implementation). This class is no longer public.

11 years agoAvoid singletons; logic in FuncProcessor
Stefanos A. [Fri, 1 Nov 2013 08:17:34 +0000 (09:17 +0100)]
Avoid singletons; logic in FuncProcessor

This is part of a long-due series of source cleanup patches. All
translation logic is now part of FuncProcessor. Code generation is now
handled by an ISpecWriter implementation. Minor improvements to
IEquatable and ToString() implementations. Reduced the surface of the
public API.

11 years agoAvoid singletons; Move logic to FuncProcessor
Stefanos A. [Fri, 1 Nov 2013 08:15:02 +0000 (09:15 +0100)]
Avoid singletons; Move logic to FuncProcessor

This is part of a long-due cleanup patch series. All translation logic
is now part of the FuncProcessor. Language-specific code generation is
now part of the ISpecWriter, not the delegate class. Implemented the
IEquatable interface.

11 years agoAvoid singletons; Translate*() in FuncProcessor
Stefanos A. [Fri, 1 Nov 2013 08:13:06 +0000 (09:13 +0100)]
Avoid singletons; Translate*() in FuncProcessor

This is part of a long-due source cleanup series. All Translate*()
methods are now part of the FuncProcessor. Additionally, ToString() has
been improved and the IEquatable interface is now implemented.
ParameterCollection now has better control of when its cache should be
rebuilt.

11 years agoAvoid singletons; Translate*() in FuncProcessor
Stefanos A. [Fri, 1 Nov 2013 08:10:46 +0000 (09:10 +0100)]
Avoid singletons; Translate*() in FuncProcessor

This is part of a long-due source cleanup operation. GLTypes and CSTypes
are no longer global singletons, but must now be accessed through an
IBind instance. All Translate*() methods are now part of the
FuncProcessor. ToString() has been improved and the IEquatable interface
is now explicitly implemented.

11 years agoSettings is no longer a singleton
Stefanos A. [Fri, 1 Nov 2013 08:07:34 +0000 (09:07 +0100)]
Settings is no longer a singleton

Multiple Settings instances can now be created and used in the same
process.

11 years agoSettings, GLTypes and CSTypes are now in IBind
Stefanos A. [Fri, 1 Nov 2013 08:06:49 +0000 (09:06 +0100)]
Settings, GLTypes and CSTypes are now in IBind

Settings, GLTypes and CSTypes are no longer global singletons. Instead,
explicit instances must be stored in the IBind implementation. This
allows us to use multiple configurations in the same process.

11 years agoAvoid singleton Settings; make internal
Stefanos A. [Fri, 1 Nov 2013 08:03:36 +0000 (09:03 +0100)]
Avoid singleton Settings; make internal

Utilities.Keywords now accepts an explicit parameter, instead of
accessing Settings directly. This allows us to use multiple
configurations in the same process.

Additionally, the Utilities class is no longer public (the Bind project
is not meant to be consumed as a dll.)

11 years agoAvoid singleton Settings. Allow v1 signatures
Stefanos A. [Fri, 1 Nov 2013 08:01:35 +0000 (09:01 +0100)]
Avoid singleton Settings. Allow v1 signatures

A Settings object is now passed directly as a parameter, in order to
support different configurations in the same process. The XmlSpecReader
can now distinguish between, and support both, pre-GL4.4 and post-GL4.4
specs.

11 years agoAvoid using singletons
Stefanos A. [Fri, 1 Nov 2013 07:59:20 +0000 (08:59 +0100)]
Avoid using singletons

The IBind generator and the Settings class are now passed directly as
parameters. This allows us to run multiple generators in a single
process.

11 years agoImproved multiline output
Stefanos A. [Fri, 1 Nov 2013 07:57:44 +0000 (08:57 +0100)]
Improved multiline output

This lets us compose and print multiline strings without manually
adjusting indentation on each line.

11 years agoRemove deprecated elements from glcore
Stefanos A. [Wed, 30 Oct 2013 23:20:59 +0000 (00:20 +0100)]
Remove deprecated elements from glcore

Deprecated elements are marked as such in the compatibility profile and
are completely absent from the core profile. This is in-line with the
new glcore headers from Khronos.

11 years agoWarn on function redefinition
Stefanos A. [Wed, 30 Oct 2013 23:20:05 +0000 (00:20 +0100)]
Warn on function redefinition

A function redefinition usually stems from a bug in the OpenGL specs, or
a bug in the spec converter. The binding generator now logs a warning,
instead of crashing, when a redefinition is encountered.

11 years agoRenamed gloverrides.xml to overrides.xml
Stefanos A. [Wed, 30 Oct 2013 23:18:45 +0000 (00:18 +0100)]
Renamed gloverrides.xml to overrides.xml

This aligns the name of the OpenGL overrides file with that of the
OpenGL|ES implementations.

11 years agoCleaned up Generator class tree
Stefanos A. [Wed, 30 Oct 2013 23:18:07 +0000 (00:18 +0100)]
Cleaned up Generator class tree

This significantly reduces the amount of duplicated code between
Generator implementations.

11 years agoImprove sorting; remove enum-function distinction
Stefanos A. [Tue, 29 Oct 2013 18:35:35 +0000 (19:35 +0100)]
Improve sorting; remove enum-function distinction

Both enums and functions are now stored under a single <add> element.
Their ordering is now maintained by sorting over all possible
attributes.

11 years agoCorrected apiname xpath lookup
Stefanos A. [Tue, 29 Oct 2013 08:32:28 +0000 (09:32 +0100)]
Corrected apiname xpath lookup