MGL is a set of matlab functions for displaying full screen visual stimuli from matlab. It is based on OpenGL functions, but abstracts these into more simple functions that can be used to code various kinds of visual stimuli. Along with a low-level library for displaying stimuli and accessing hardware there is a task library. The task library simplifies writing experiments since it takes care of timing, trials, synching with digital pulses, interfacing with eye-trackers etc. Each new experiment simply implements callback functions that handle how to draw the screen, what to do when a subject responds etc. This makes it quick to write new experiments and makes sure that problems fixed for one experiment are solved for all experiments.