Segfault in GL lib


I moved some OpenGL calls from my rendering code to my initialization code (so I can preload stuff to the card). However, the app now seg faults in libGL even with basic glVertex calls. I think I’m initializing the rendering context and the window correctly. Is there anything else that might be responsible for the seg fault?


You have to make sure that you initialized both the OpenGL context and glew/glee or whatever extension wrangler you’re using.

I think I figured it out. I called glEnableVertexAttribArray, but I removed the call to glVertexAttribPointer. Apparently that does very bad things in the driver without returning an error.