c - OpenGL on Linux: dlopen libGL.so -
most applications (and libraries) using opengl on linux load libgl.so
@ runtime using dlopen
api, instead of dynamically linking against it.
why this?
the reason can imagine it's because graphic driver vendor provides different libgl
, , 2 different libgl
abi incompatible. (well, hum, why should abi incompatible? , if are, why loading them via dlopen
fix issue?)
anyway, supposing there's reason doing that, i'd well. have link opensource c/c++ code loads opengl functions via dlopen
, can include project without needing many tweaks?
there 2 main reasons people this:
- you can give sensible error systems don't have opengl
- vendors offer many different extensions , sane way support multiple sets of extensions without different binaries per vendor use dlsym check them. glew offers nice way of doing though.
Comments
Post a Comment