Skip to content
Painless 2D vector graphics, animations and simulations.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis @ 33cd528 update submodule 'travis-scripts' Oct 7, 2018
gloss-algorithms gloss-algorithms: relax dependency bounds Oct 7, 2018
gloss-examples gloss-examples: build fix for ghc-8.6 Oct 7, 2018
gloss-raster gloss-raster: build fix for ghc-8.6 Oct 7, 2018
gloss-rendering gloss:Internals: also clamp negative input values Feb 19, 2019
gloss gloss: relax dependency bounds Oct 7, 2018
test/T25-SpaceLeak Fix space leak in timing code Nov 26, 2012
.gitmodules Add submodule 'travis-scripts' Aug 21, 2017
.travis.yml add ghc-8.6 to stack/travis Oct 7, 2018
stack-8.0.yaml accidently deleted stack yaml files Mar 28, 2018
stack-8.2.yaml accidently deleted stack yaml files Mar 28, 2018


Build Status

Gloss hides the pain of drawing simple vector graphics behind a nice data type and a few display functions.


Getting something on the screen is as easy as:

import Graphics.Gloss
main = display (InWindow "Nice Window" (200, 200) (10, 10)) white (Circle 80)

Explore and run the example projects using stack:

$ stack setup
$ stack build
$ stack exec gloss-boids


Once the window is open you can use the following:

  • Quit

    • esc-key
  • Move Viewport

    • arrow keys
    • left-click drag
  • Zoom Viewport

    • page up/down-keys
    • control-left-click drag
    • right-click drag
    • mouse wheel
  • Rotate Viewport

    • home/end-keys
    • alt-left-click drag
  • Reset Viewport

    • 'r'-key


  • Animations and simulations can be constructed similarly using the 'animate' and 'simulate' functions
  • Games with user input can be constructed with the 'play' function.
  • See the gloss-examples package for more.


As Gloss is now fairly stable, I typically make releases only when there is a new GHC version. If you have added a new feature or fixed a bug, and want your pull request merged sooner than that, then send email to benl AT I don't pay attention to github notifications, but am happy to receive emails from people. If you have changed any internal functionality then please test that all the gloss-examples still work before submitting your pull request.

If you just want to bump a dependency version then get a Hackage trustee to edit the package information directly on Hackage. You don't need to raise a pull request here.

You can’t perform that action at this time.