TEXT   48

libGL.so library defines the gl- and glX-prefixed

Guest on 27th April 2022 05:59:42 PM

  1. Using libGL.so
  3. The libGL.so library defines the gl- and glX-prefixed functions needed to
  4. run OpenGL programs.  OpenGL client applications should link with the
  5. -lGL option to use it.
  7. libGL.so serves two primary functions: GLX protocol generation for indirect
  8. rendering and loading/management of hardware drivers for direct rendering.
  10. When libGL.so initializes itself it uses the DRI to determine the
  11. appropriate hardware driver for each screen on the local X display.
  12. The hardware drivers are expected to be in the /usr/X11R6/lib/modules/dri/
  13. directory.  Drivers are named with the convention <name>_dri.so where
  14. <name> is a driver such as "tdfx", "i810", "gamma", etc.
  16. The LIBGL_DRIVERS_DIR environment variable may be used to specify a
  17. different DRI modules directory, overriding /usr/X11R6/lib/modules/dri/.
  18. This environment variable is ignored in setuid programs for security
  19. reasons.
  21. When libGL.so is unable to locate appropriate hardware drivers it will
  22. fall back to using indirect GLX rendering.
  24. To aid in solving problems, libGL.so will print diagnostic messages to
  25. stderr if the LIBGL_DEBUG environment variable is defined.
  27. libGL.so is thread safe.  The overhead of thread safety for common,
  28. single-thread clients is negligible.  However, the overhead of thread
  29. safety for multi-threaded clients is significant.  Each GL API call
  30. requires two calls to pthread_get_specific() which can noticably
  31. impact performance.  Warning:  libGL.so is thread safe but individual
  32. DRI drivers may not be.  Please consult the documentation for a driver
  33. to learn if it is thread safe.
  35. Indirect Rendering
  37. You can force indirect rendering mode by setting the LIBGL_ALWAYS_INDIRECT
  38. environment variable.  Hardware acceleration will not be used.

Raw Paste

Login or Register to edit or fork this paste. It's free.