Oh ok, that's strange, because GL_UNSIGNED_BYTE worked, I never thought of
looking for something like cGL_FLOAT. But it works, thanks! I maybe should have
checked the sources first before asking here, but the errors didn't make me
think that way.
It seems both GL_UNSIGNED_BYTE and cGL_UNSIGNED_BYTE are defined. Meanwhile,
GL_RGBA exists, but cGL_RGBA doesn't.
A bit awkward. I totally love Nim, and I am so glad that it has FFI (it's
probably a huge part of why it's so attractive), but the way we sometimes need
to use it is something to abstract as quickly as possible so you never have to
do it again :-).
Thanks!
However, I wonder if FFI could not be improved to solve these things. It is a
bit awkward that some constants have to be renamed to solve language choices
and others don't, while maybe adding a simple keyword could solve it for
everything at once. Something like GL_FLOAT {.value.} and GLfloat {.type.} or
something much better.
Or even a keyword to disable the Nim identifier equality for these names so
that they have to be exactly as they are declared, so that GL_FLOAT {.exact.}
and GLfloat {.exact.} are no longer the same in this case.
In this particular case, I could even see the FFI be smart enough to know that
it should not expect a type as a parameter in the call and thus ignore GLfloat
and find GL_FLOAT.
Maybe I am saying stupid things, I've only be learning Nim for a couple of days.
But like I said, I think we should be happy to have FFI at all :-)