glDrawArrays doesn't draw anything


I’m having some trouble with rendering a triangle onto my screen with GLFW/GLAD/Nim.

You can find my code here:

To be exact, I’m pretty sure I’ve done everything right, yet no triangle is drawn. This is what I’m getting on my screen:

The relevant drawing code can be found here:
I am really annoyed, since I’ve been debugging and rewriting the code for a few days now, and nothing seems to be working. I’m following the tutorial at

I also don’t know any debugging tools that could potentially help me. I run Linux with an Nvidia GeForce GTX 1060 3GB, if that’s important.

Use the debugging tools the OpenGL API offers:

Didn’t find any glGetError() calls in the two posted sources.

I’m following the tutorial at

You should follow the tutorial exactly before you start wrapping classes around everything. Test all steps in a single file. If that works you can start moving piece by piece into classes. Can’t help you much more since I am not familiar with nim.

It seems like I did everything right, but Nim floats are like C++ doubles! I fixed the issue by changing all floats to float32s and my triangle renders correctly now.