I'm storing color per vertex as Vec[4, system.uint8] to work with ImGui and noticed that the type for the vertex attribute was always being set to GL_NONE which lead me to discover this bug.
I don't exactly remember how toGlEnum(x) behaves when x is a type, but please make it throw an error for unsupported types using the {.error.} pragma, if it doesn't already do that.
I'm storing color per vertex as
Vec[4, system.uint8]
to work with ImGui and noticed that the type for the vertex attribute was always being set toGL_NONE
which lead me to discover this bug.https://github.com/liquidev/aglet/blob/b689416f40de38ce727627ec197a4bd3db9110ab/src/aglet/gl.nim#L792
The expression
T.toGlEnum
will always evaluate to0
orGL_NONE
. It should beTT.toGlEnum
instead, to work with the type inside of theVec
.I will open a PR shortly. Should
toGlEnum
have a catch all which throws an exception?