Open
Description
While it is possible to achieve type safety for constants passed to GL functions, I think it would be a breaking change.
What I ask for is to declare a type, e.g. type GLConst int32
and define constants as
const (
ACTIVE_ATOMIC_COUNTER_BUFFERS GLConst = 0x92D9
ACTIVE_ATTRIBUTES GLConst = 0x8B89
ACTIVE_ATTRIBUTE_MAX_LENGTH GLConst = 0x8B8A
...
)
Then it would be possible to use stringer
to generate the code which would convert a value (returned by gl.GetError, for example) to constant name. I think it would be pretty neat for debugging and exception displaying
Metadata
Metadata
Assignees
Labels
No labels