cococry / leif

Minimal, configurable & GPU accelerated Immediate Mode UI Library written with modern OpenGL
836 stars 36 forks source link

Check for correct OpenGL version in `install.sh` #8

Closed marcybelardo closed 5 months ago

marcybelardo commented 5 months ago

I found the todo tutorial yesterday on YouTube and I was excited to try it out! However, after adding leif and compiling, the program would segfault. I spent the last day checking everywhere for an answer, and found that a call in leif's renderer_init() function, specifically glCreateVertexArrays, is only available in OpenGL version 4.5 and higher.

Admittedly, it's a little obvious of an answer, but I had zero indication that this was the problem's source. I've added a little OpenGL version checker to the install.sh script to make this problem a little easier for anyone who might want to use leif, but I'll leave it to you if you want to include it or not!

Thanks for all the hard work, I'm able to follow along the video now and I really like what you've made.