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:

  1. you can give sensible error systems don't have opengl
  2. 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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -