First let me say if this is not a bug my apologies. But i think in my noobish experience it is.
I think i traced my problem to it in nim.
The strange behavior i get with my opengl vertices and i'm fairly certain after trying the same sorta thing in c++ and nim is that a vertice of 0,0,0 for x,y,z coords appear in the shader data when sending the vertices to the shader.
i'm certain its the first vertices of x,y,z coordinate to sent to the shader so maybe in nim my vector3 object is being initialized with 0,0,0? Here is my Vector3 object.
type
Vec3* = object
x*,y*,z* : GLfloat
The more i think of this the more it would to be make sense that when nim does a check for the variables or object maybe the first thing it does is make it static in c?? i don't know for sure but thats the only thing i can think of that would make nim do this. And i base this off some of the posts i've read from araq.
but if araq or someone thinks this is a bug i will post it on github.
I do recommend to use the GLvectorf3 type from the OpenGL. There is nothing inherently wrong with that type, but there is also almost no benefit in using it, because it's just an alias for an array. There are not typica vector operations like dot product or cross product defined. I recommend to use a 3D math library additionaly. I used so far the nim version of glm, and as much as I can tell, it is ok, but I was also not 100% happy with it. But for a start, I guess it should be ok.
To your original problem. It is almost impossible from my here to see what is wrong in your code. Sadly in opengl there can go a lot of things wrong, so you should post a bit more of your code rather than just a Vec3 type (the type looks ok to me).
Maybe it is best to show both versions the c++ version and the nim version, and I might be able to see further what is wrong in it.