glDrawArrays doesn't draw anything

Hello,

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

You can find my code here: https://github.com/liquid600pgm/rapid

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:
[ul]
[li]https://github.com/liquid600pgm/rapid/blob/master/src/gfx/globjects.nim
[/li][li]https://github.com/liquid600pgm/rapid/blob/master/src/gfx/gfx.nim
[/li][/ul]
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 https://learnopengl.com/Getting-started/Hello-Triangle

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:

http://in2gpu.com/2015/05/27/debugging-opengl-glgeterror/

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

I’m following the tutorial at https://learnopengl.com/Getting-started/Hello-Triangle

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.