C Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
configs Add head test conf Feb 18, 2018
console-support Properly model color channels for grandma May 22, 2017
gobos prefinal fixxes Jun 24, 2017
shaders final fix Jun 24, 2017
.gitignore Add generated shader headers to gitignore Dec 1, 2016
LICENSE.txt Add License Aug 17, 2016
README.md libXext is only required in the xrender target Dec 6, 2016
TODO Introduce data structures for channel remapping Dec 2, 2016
artnet.c fixing get_mac_address wants 8 bytes for a mac address. Not only 6 Jan 13, 2017
artnet.h Code cleanup Aug 17, 2016
backend_opengl.c Check for shader support before using it (Fixes #7) Jun 14, 2017
backend_opengl.h Factor out backend data types Apr 14, 2017
backend_opengl2.c final fix Jun 24, 2017
backend_opengl2.h prefinal fixxes Jun 24, 2017
backend_xrender.c Add trace parameter May 30, 2017
backend_xrender.h Factor out backend data types Apr 14, 2017
config.c Fix Coverity issues Jan 12, 2017
coreloop.c Add trace parameter May 30, 2017
easy_args.c easy_args updated, using now the easy_args int parsing function for d… Jul 9, 2016
easy_args.h easy_args updated, using now the easy_args int parsing function for d… Jul 9, 2016
easy_config.c new version of easy_config Jan 13, 2017
easy_config.h new version of easy_config Jan 13, 2017
makefile added backopengl 2. opengl1 is deprecated and shouldn't work anymore … Jun 22, 2017
network.c Create pixmaps on main screen instead of back buffer in XRender backend Dec 30, 2016
stb_image.h update stb_image to v2.16 Jan 2, 2018
x11.c Clean up colormap Dec 21, 2016
xfds.c XFD structure Jun 14, 2016
xfds.h XFD structure Jun 14, 2016
xlaser.1 Update manpage Oct 24, 2016
xlaser.c Handle SIGINT Dec 11, 2016
xlaser.h added backopengl 2. opengl1 is deprecated and shouldn't work anymore … Jun 22, 2017



XLaser emulates a scanner lighting fixture within an X11 window, useful for example for creating light shows with computer projectors.


Control data is input via the Art-Net protocol, generated by most lighting control desks and software.


Up to 255 projection gobos are supported via a configurable folder containing images named value.png (eg. 127.png). All non-transparent pixels of a gobo image will be colored in the resulting image.


One XLaser instance uses 16 channels, some of which are reserved but not yet mapped to functionality.

  • Channel 1/2: Pan coarse/fine
  • Channel 3/4: Tilt coarse/fine
  • Channel 5/6/7: Red/Green/Blue color mix
  • Channel 8: Dimmer
  • Channel 9: Shutter
    • 0 Open
    • 1-127 Strobe slow-fast
    • 128-192 Flash in slow-fast
    • 193-255 Flash out slow-fast
  • Channel 10: Gobo
  • Channel 11: Gobo zoom
  • Channel 12: Gobo rotation absolute
  • Channel 13: Gobo rotation speed (not yet implemented)
  • Channel 14: Gobo focus (experimental)


XLaser is available with multiple backends (currently XRender and OpenGL). The default target, built by running make in the project repository, builds XLaser with the OpenGL backend.

To select the XRender backend (slower, but might work on older hardware), run make xrender.

Prerequisites (debian)

  • A C compiler
  • libx11-dev
  • For the XRender backend
    • x11proto-render-dev
    • x11proto-xext-dev
  • For the OpenGL backend
    • libglew-dev
    • libgl1-mesa-dev


Basically, edit configs/sample.conf to match your setup and run xlaser /path/to/your.conf. Optionally override the starting address with the -d <address> parameter (useful to start multiple instances from one configuration file)

Configuration file

The configuration file is split into multiple sections, which may appear in any order in the file.

The general section

Controls general behaviour.

Option Example value Description
bindhost * Which interface to listen for ArtNet data on
gobos gobos/ Where to look for gobo images

The window section

X11 window parameters.

Option Example value Description
windowed true Do not initially fullscreen the window
width 800 Initial window width (when windowed)
height 600 Initial window height (when windowed)
x_offset 100 Currently not implemented
y_offset 100 Currently not implemented

The artnet section

ArtNet control data input setup.

Option Example value Description
net 0 The artnet net parameter for this fixture
subuni 0 The artnet subnet parameter for this fixture
address 1 The dmx start address (1-512)

The remap section

Reassign control channels (for example to emulate other fixtures).

List of remappable channel names

  • pan
  • panfine
  • tilt
  • tiltfine
  • red
  • green
  • blue
  • dimmer
  • shutter
  • gobo
  • zoom
  • rotation
  • rotationspeed
  • focus

A remap argument may consist of one or more of the following parts

Option Parameter Example Description
fixed value fixed 123 Channel is at fixed value continuously
source offset source 0 Channel value is read from another channel (given as an offset from the base address)
min value min 0 Minimum channel value. The value is interpolated from the full channel range
max value max 127 Maximum channel interpolation value.
inverted none inverted Invert channel values

ArtNet input

Most professional lighting desks can be configured to output one or more universes to an ethernet port via multiple protocols. XLaser requires broad- or unicasted ArtNet as input. Please report any problems encountered with a desk to the Github issues section.

Tested desks

  • GLP Creation2 (+ OnPC)
  • MA Lighting GrandMA2 OnPC