Here are some things I bumped into several times and which Imo should really be discussed before locking down the APIs. If these questions were addressed to Fiddler only, I would have used pm. Everyone is invited to voice suggestions|opinions.
1) CLS compliance. It's not ideal that some functions allow the use of uint, while some enforce the use of int.
Example: GL.GenList returns
int, but GL.CallList() accepts both:
int or uint
Although it will be more work, it would be nice if one could chose whether "compliance" (int) or "best fit" (uint) is desired regarding types. There's really no need to have both around, I believe everyone has a preference between those 2 types and is able to chose one of them.
2.a) reference vs. value. I believe this should be handled consistent throughout all GL helpers added to the API, not some passing by value and some by ref. Only talking about GL overloads here, no changes to the mathlib itself.
Maybe code explains this best:
// it's more cumbersome to write this (and it implies 2* Vector3 are created before GL receives it) GL.Vertex3( new Vector3(1f, 2f, 3f) ); // might aswell write: GL.Vertex3( 1f, 2f, 3f ); // which the Vector overload calls internally anyway // in practice you usually created the Vector3 previously to calling GL.Vertex, and this call does not consume memory GL.Vertex3( ref vec );
2.b) Afaik the primary reason why some commands pass by value is that you may call this:
GL.Normal( Vector3.UnitY ); which is a problem with readonly&const when not passing by value. However this could be worked around by adding some private Unit-vectors for internal operation of the math library and allowing the user to pass UnitX etc. by reference. Obviously this could lead to UnitX etc. being modified by the user, so it might be viable to completely remove the public Unit* and Zero fields.
3) I'd really like to see some token named "Undefined", "Null" or "Invalid" in enums like BeginMode, TextureTarget or DrawElementsType (there's more, will make a list if it gets approved ;) ). Currently I do cast 0 to the enum and cast that back for Debug.Assert(). It would be much nicer if those enums had some token that obviously does not belong to GL and is not a valid parameter. i.e. NOT naming this token "Automatic" (the purpose of this is that you can use enums as fields/properties and initialize them to something you can easily distinguish from regular tokens)