leif icon indicating copy to clipboard operation
leif copied to clipboard

Min opengl version?

Open arjunmenon opened this issue 1 year ago • 2 comments

Hey i have 4.1, it seems leif required 4.5. Not sure we can update to 4.5 if underlying driver itself does not support that, atleast based on this - https://askubuntu.com/questions/795647/how-to-install-opengl-4-0-or-4-5-for-developing

How to go about this then? I tried building it with 4.1 itself, it installed but while running the example, i get segmentation fault.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffea737640 (LWP 1785)]

Thread 1 "basic" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()

I think coming from here, lf_init_glfw(800, 600, window);

#0  0x0000000000000000 in ?? ()
#1  0x000055555556ea39 in renderer_init ()
#2  0x00005555555afa1a in lf_init_glfw ()
#3  0x0000555555558e74 in main () at basic.c:10

Basic glfw examples run fine in my system.

arjunmenon avatar Jun 08 '24 23:06 arjunmenon

I had this issue in the past as well. There's a GLFW function call in renderer_init that only exists from 4.5 onwards. At this point, Leif would have to either rewrite the function with the old API or declare a minimum OpenGL version (as it does currently in install.sh).

marcybelardo avatar Jun 14 '24 11:06 marcybelardo

Leif would have to either rewrite the function with the old API

Got it, thanks. Let me try that out.

arjunmenon avatar Jun 21 '24 18:06 arjunmenon