ClusterGL
ClusterGL is a distributed rendering system for OpenGL applications. OpenGL API calls are captured by the ClusterGL library and then sent to distributed rendering nodes. These receive the queries, transform them back to OpenGL API calls and render them locally in a application window.
In comparision to other solutions like (X-)DMX, WireGL, its successor Chromium, as well as BroadcastGL ClusterGL provides some optimizations and is still under active development. It runs on unix flavoured Operating Systems.
Ever if there is some problem i had do do more research to solve it, i will write it down here.
Usage
Although ClusterGL claims to be a fully transparent OpenGL Replacement Library, there are some OpenGL API Calls which are not yet implemented and therefor not yet supported. For example i did not yet manage to get openframeworks example OpenGL Applications to work properly with ClusterGL as it seems some shader magic is not yet working.
Still there are some examples known to work with ClusterGL also in the main repository which provide a good starting point. In general all OpenGL API Calls are implemented with only some exceptions. For example MieCraft and Open Arena are known to work without any modification.
OpenGL applications can be implemented in several different programming languages - they only depend on the availability of an OpenGL library. It is even possible to use Processing and the provided OpenGL renderer. Of course when using Processing actually Java is used which may slow down performance a lot - depending on the age of your computer ;) .
Using the Berkelium library and the provided example program it is even possible to render webpages to OpenGL textures. This is done using a selfcompiled instance of the chromium browser, that does all the WebKit stuff in the back. Therefor it is even possible to integrate flash applications, javascript applications and so on in ClusterGL.
ClusterGL basically provides two applications and one library which will be described here in some detail.
cgl-capture
cgl-capture basically is only a bash-script which replaces the OpenGL library with the ClusterGL library for the executed program.
libcgl-capture.so
libcgl-capture.so is the actual library doing all the magic. It is responsible for reading the configuration file from /etc/cgl.conf first and then catching every call to the OpenGL API if started out of the cgl-capture environment. These library calls are then transformed (and compressed) and sent to predefined (in /etc/cgl.conf) renderers via network. On these nodes the same library is then used to recreate the OpenGL library calls and send them to the local OpenGL library. The renderer also keeps track of changed camera parameters as of the specified part to display of the whole application window.
cgl-render
cgl-render is the application running on the rendering node, that uses libcgl-capture.so to render the outputs defined in /etc/cgl.conf on the different nodes.Installation of ClusterGL - Mac OS X
To install ClusterGL on OS X (tested with 10.7 and 10.8), there are several linux libraries necessary, that OS X doesn't provide
They can be easily installed using either Homebrew or MacPorts:
MacPorts
port install libconfuse libsdl libsdl_net lzo2 glew
Homebrew
brew install confuse sdl_net lzo glew intltool gettext brew link gettext
Compiling
Compiling should work right away now using my fork of the original repository.
A pullrequest on the last changes has been sent to the original repository and might be merged sooner or later.
Executing Programs
Executing on OS X works right like on Linux when using cgl-capture from my fork.
Using the original repository (for now) you would have to set some environment variables. Instead of LD_LIBRARY_PRELOAD on Linux on OS X DYLD_INSERT_LIBRARIES has to be set to the path of the installed libcgl-capture.so. Additinally to disable two-level namespacing on OS X you also have to setup DYLD_FORCE_FLAT_NAMESPACE:
export DYLD_INSERT_LIBRARIES=/usr/lib/libcgl-capture.so export DYLD_FORCE_FLAT_NAMESPACE=
Afterwards each in this terminal executed programs OpengGL API Queries will be led into ClusterGL instead of OpenGL.