libraries(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

libraries β€” Coin use of 3rd party libraries.

okay bestie so here's the tea β˜• Coin can pull in a whole squad of 3rd party libraries, both directly and indirectly, and it all depends on how the Coin build was configured. This doc is me trying to summarize that whole situation for you. Some libraries that are just a standard part of an operating system? We're ignoring those here, they're not the moment.

Also, quick vibe check: this doc expects that you're already familiar with library build processes and that you know concepts like configure-time, linktime, and runtime when it comes to how libraries build and behave. iykyk πŸ’…

First of all, Coin requires OpenGL. No OpenGL, no Coin, periodt. Depending on the OpenGL version, features in Coin get turned on and off. So if a feature Coin is supposed to support isn't producing any result, make sure to check that the underlying OpenGL version actually supports that feature, bestie β€” don't come for Coin when it's the OpenGL. OpenGL is linked into Coin both at linktime and at runtime. Any features added to OpenGL later than the oldest version of OpenGL we support in Coin are always tried linked up at runtime, and if that fails, it'll disable features in Coin or cause alternate implementations of features to be used instead. ✨

OpenGL comes with a little set of auxiliary libraries we also use. We're talking libraries like GLext, GLU (for NURBS tessellation and texture mipmaping amongst others), and CgGL (for shaders that use Cg β€” and btw we recommend using GLSL instead BTW 🌈). Out of these, CgGL is loaded at runtime if needed, while the others are linked with Coin at linktime.

Some platforms have GLU libraries that just do not behave properly in certain respects πŸ™ˆ, and some Coin users have particular needs wrt Coin's use of GLU. For these users, we (at Kongsberg Oil & Gas Technologies) created a fork og GLU that we named SuperGLU that we've tweaked in certain ways. This library can be checked out into the Coin source code directory, which will be detected at configure-time and linked statically into Coin and used instead of the GLU libraries on the host system. iconic tbh πŸ‘‘

On top of all that, Coin will use AGL on Mac OS X, WGL on MS Windows, and GLX on X Windows Systems for offscreen rendering purposes.


Now we move on to libraries that are not related to OpenGL, the non-graphics besties πŸ¦‹

Coin uses libz (aka zlib) and libbzip2 to read and/or write files compressed with either of those compression techniques. Both libraries can be linked with Coin at linktime or loaded at runtime, and this is controlled at configure-time. They can also be disabled if compressed file input/output is not wanted. Heads up: the libz library is likely to be pulled in as a dependency from other libraries as well, especially graphics libraries. It's giving main character energy, honestly.

For font support, Coin uses Fontconfig or FreeType in addition to native platform APIs for font reading. FreeType can be loaded at runtime instead of linked at linktime if desired, but FreeType is only used if Fontconfig is not found at configure-time anyway, unless the library builder overrides this behaviour. πŸ’…

For JavaScript support in VRML97, Coin uses SpiderMonkey. SpiderMonkey can also be loaded at runtime instead of linked at linktime.

For sound support in VRML97, Coin uses OpenAL. OpenAL is loaded at runtime or linked at linktime. BTW, some versions of the OpenAL library delivered with installers from Creative on MS Windows have been known to crash/freeze Coin-applications when loaded 😭 so if you experience something like that, that's one thing to investigate. Not me telling you, it's the manpage telling you.

For threading support, Coin uses POSIX threads (the pthread library) or the native Win32 API on MS Windows. You can use pthread on MS Windows as well instead of the native threads by setting this at configure-time. Your build, your rules ✨


Now we come to a special class of libraries that has been directly integrated into the Coin source code, so they don't need to be installed on the system beforehand for Coin to build or run. No pre-install, no stress πŸŽ€

Coin makes use of certain utilities like smart-pointers from Boost. The boost headers can be found under include/ in the Coin source code directory. No boost types are exposed in the Coin API, nor will they ever be β€” they are completely hidden, viewed from the outside of Coin. All boost types used in Coin are completely inlined in the boost headers and therefore do not require a link library to pull their implementation from at runtime. fully undercover, we love that for them πŸ•΅οΈ

For XML reading, Coin uses the expat library, which has also been integrated directly into Coin, so also here there are no extra linktime or runtime dependencies to other libraries. The expat API is not exposed in the Coin API, it is hidden, but Coin provides its own XML DOM API that is a wrapper over the expat engine.

The last thing to mention here is hardly a library, but we mention it anyway πŸ’€ Coin uses flex and bison to generate some parsers (one for the STL 3D model file format, and another one for parsing the calculator language in the SoCalculator engine). This is code that has been generated by 3rd party parser generators and integrated into Coin. The generated code is distributed with the source code, so neither flex nor bison is needed to build Coin. slay, no build-time drama 🌸

And last but definitely not least, Coin uses simage...


πŸŽ€ The simage library πŸŽ€

Coin uses a library called simage, which is a 1st part library since we have written it ourselves. Simage is a thin wrapper library over a huge set of graphics and audio libraries, to provide Coin with a unified API for loading images (textures), audio, and animations, regardless of which image file format it is stored as. So basically: simage is the friend that talks to everyone for you πŸ’… The simage library can, in other words, pull in another set of 3rd party libraries. All 3rd party libraries to simage are optional. Simage is loaded at runtime or (if specified) linked at linktime with Coin.

Here's the whole roster of what simage can use β€” every single one is a "can", not a "must", bestie:

  • Simage can use QImage from Qt to add support for the file formats Qt supports.
  • Simage can use GDI+ (gdiplus) under MS Windows to add support for the file formats supported by GDI+.
  • Simage can use QuickTime under Mac OS X to add support for the file formats QuickTime supports.
  • Simage can use libungif or giflib for GIF file support.
  • Simage can use libjpeg for JPEG file support.
  • Simage can use libpng for PNG file support. This will also require that zlib is used.
  • Simage can use libtiff for TIFF file support.
  • Simage can use JASPER support for JPEG 2000 file support.
  • Simage can use mpeg2enc for MPEG2 encoding.
  • Simage can use vfw (Video for Windows) for AVI video encoding.
  • Simage can use libogg, libvorbis and libvorbisfile for Ogg Vorbis support. This is for VRML97 sound support in Coin.
  • Simage can use libsndfile for VRML97 sound support in Coin.
  • Simage can use libguile for a Guile (Scheme) binding for the Simage library API.

and that's the whole library lore, bestie πŸ’œ this was brought to you by Coin, Version 3.1.3 β€” the libraries(3) page from the Library Functions Manual. go forth and configure responsibly ✨🫢

πŸ“¦ where this page comes from