Libgliar: a library that lies to the OpenGL programs about the OpenGL context information

libgliar — a library that lies to the OpenGL programs about the OpenGL context info (for Linux only). Code: bzr branch lp:libgliar

Libgliar is a library I wrote to make the Unity/Nux development easier.Β  It can be preloaded when a developer needs to “lie” to an OpenGL program in order to change the control flow.

For example:
An OpenGL program might have a different behavior depending on the extensions supported by the user’s GPU, the shading language version, the OpenGL version, the vendor string or some other context related info, even when the maximum texture size or texture unit supported by the GPU varies.

Libgliar, fakes most of the OpenGL context information that can be returned by a glGet call. It reads a configuration file with the desired context info and returns that info instead of the actual glGet result.

Usage:
$ gliar <opengl_program>

Here is a video where I used the library to lie to the glxinfo program and fake its output:

Note: The users can only restrict their GPU capabilities in order to test their projects behavior in less capable machines. If a user adds a GL extension that is not supported by his system to the configuration file, he will receive a warning.

Leave a Reply

Your email address will not be published. Required fields are marked *