Learn OpenGL

Using examples from LearnOpenGL working fine on Haiku :

This is pure OpenGL with glfw/glad (nothing relative to Haiku) as the compilation is done with :

g++ opengl.cpp glad/src/glad.c -o opengl -lglfw -lGL -I./glad/include/

objdump -x opengl | grep NEEDED
NEEDED libglfw.so.3
NEEDED libGL.so.1
NEEDED libstdc++.so.6
NEEDED libgcc_s.so.1
NEEDED libroot.so

ImGUI should also be able to be used on top of that (I’ve seen some Qt samples with ImGUI on Haiku)

The model viewer example from this site :

5 Likes

“Raw” OpenGL is a pain to use, because it is a low-level library. I’m actually developing an object-oriented graphics library using OpenGL, GLFW, and other libraries in the background. For many reasons, my implementation is in modern Fortran - and I mention it as a factor that in theory adds up to the porting complexity (otherwise the code itself is much easier and cleaner compared to a C/C++ implementation). Still, porting the library to Haiku was surprisingly easy. All I needed to do was minor modifications in the Makefiles. Literally, that was all. This led me to easily port every library I ever wrote as well.

Of course, the lack of 3D acceleration in Haiku (for “usable” GPUs at least) is an issue. But if you keep that in mind, you can still use OpenGL in large projects.

2 Likes