I have encountered one pitfall with the Q2 way of loading 
the (Mesa) GL DLL directly by means of dlopen("libSomeGL.so"):

  ldd libMesaGL.so.3.1b2 
  libglide2x.so => /opt/local/lib/libglide2x.so (0x40158000)
  libm.so.6 => /lib/libm.so.6 (0x4029d000)
  libc.so.6 => /lib/libc.so.6 (0x402ba000)
  /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
   
  nm -D libMesaGL.so.3.1b2 | grep X | grep U
  U XAllocColor
  U XCopyArea
  U XCreateColormap
  U XCreateGC
  ...

Request: Linux/OGL base should require that all libGL DLL's
an application can link against or load have to ensure
loading of all required modules and DLL themselves.

Example: Linux Q2 has to be linked against X, or an LD_PRELOAD 
has to be used, to satisfy the X11/Xext dependencies. Yet
the  portable engine code is not X aware, and could accomodate 
a Glide/SVGA-only environment just fine.

This also implies that I prefer the brave new world of modular 
Linux OpenGL not to break the dlopen("libGL.so") approach. The 
visible DLL to load and link against has to initiate all 
loading of internally required modules one way (ld) or the 
other (_init/_fini). If we agree on this, I'd like to see it 
spelled out in the document. If we don't agree, the document
should have a disclaimer and an explanation on why this is a
bad idea.


                                           b.


Reply via email to