I just started learning openGL and whenever I call glDrawArrays my program segfaults. Since I'm working on a laptop with an nvidia GPU I made sure I run the program through optirun and that I've installed the proprietary drivers.
I'm working in codeblocks and this is the output I get when I run the program:
GLFW init succeeded
vertex shader compilation succeeded
fragment shader compilation succeeded
Going to create program now
Program should work
Initializing vertex buffers
Generating vertex arrays
Binding vertex array
stuff should work
Process returned 139 (0x8B) execution time : 0.139 s
Press ENTER to continue.
I'm not sure where I'm going wrong. Did I mess up the shaders? Or the creation of the openGL program? Or did I call glDrawArrays incorrectly?
Any help would