Commit graph

17 commits

Author SHA1 Message Date
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 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
thefiddler dde7c645c4 Removed unused code 2013-11-11 10:00:32 +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. 11c1071625 Corrected declarations in convenience overloads 2013-11-10 10:08:04 +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
Stefanos A 49df5ff453 Do not generate delegates for overloads
We should only generate delegates for actual OpenGL entry points, not
for overloaded functions that resolve to the same entry point. This
improves loading speeds and reduces the size of the compiled dll.
2013-11-08 16:40:43 +01:00
Stefanos A 2d33b10e1a Improve debug output
Function parameters are now displayed during binding generation.
2013-11-03 20:28:57 +01:00
Stefanos A. 9789225e0c 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.
2013-11-03 16:09:11 +01:00
Stefanos A ab61e3f6a0 Added missing newline
Methods are now separated by a single newline.
2013-11-03 01:27:33 +01:00
Stefanos A. bf0f42be82 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.)
2013-11-01 09:27:46 +01:00
thefiddler 8dcb8601a2 Normalized line endings
Hopefully this is the first and last time we have to do this.
2013-10-11 01:58:54 +02:00
the_fiddler 81b188ffca Added documentation comments to generated enums.
Improved ISpecWriter API by removing low-level implementation details.
Made Constant implement IComparable so it can be sorted before being written to output.
2011-07-20 10:10:33 +00:00
the_fiddler 3021f668ad Re-added missing gl.tm file.
Added initial C++ spec writer.
Refactored IBind and ISpecWriter interfaces.
2010-12-03 10:21:50 +00:00
the_fiddler c3bfa7dc9a Moved output filenames to Settings class. 2010-12-02 21:58:49 +00:00
the_fiddler 0ce332b318 Refactored spec reading / writing functionality into its own classes.
Removed legacy spec reader.
2010-12-02 21:36:05 +00:00