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.

$ 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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s