Monthly Downloads: 13
Programming language: Haskell
License: MIT License
Tags: Graphics    

gelatin alternatives and similar packages

Based on the "Graphics" category.
Alternatively, view gelatin alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of gelatin or a related project?

Add another 'Graphics' Package



Build Status

This is a mega-repo for a real-time graphics renderer in Haskell.



gelatin (core)

  • Backend definitions
  • Primitives for drawing
    • triangles
    • triangle strips
    • triangle fans
    • beziers (fill below curve) + inverted beziers (fill above curve)
    • thick, feathered stroked lines and for creating new backends.
  • Definitions and functions for post compilation affine transformation, color multiply, red channel replacement (for font textures)


Backend for compiling gelatin pictures using OpenGL.


freetype2 text using character atlases and word maps for fast rendering. Use this if your text changes frequently but does not often get resized. It is fast to compile renderings but unless the text is rendered with a large character size, scaling up the rendering will show pixels.


Functions for extracting truetype font geometry as gelatin primitives. Use this if your text resizes frequently but otherwise does not change. It is slow to compile renderings but once compiled those renderings can be displayed at any scale.


SDL2 initialization and windowing.


WebGL backend via ghcjs (experimental)


For examples please see gelatin-example and odin


gelatin depends on

You can install them with the following platform specific steps.

Mac OS X

Using homebrew...

brew install freetype
brew install sdl2


First install freetype2

apt-get install libfreetype6

The sdl2 bindings require an sdl2 install >= 2.0.4, or for special instructions to be followed. Assuming you're on Ubuntu >= 16.04, you can simply run

apt-get install libsdl2-dev

otherwise please visit the link above and install via their README.

Windows 10 with MSYS2/MINGW

pacman -S mingw-w64-x86_64-pkg-config mingw-w64-x86_64-freetype mingw-w64-x86_64-SDL2

building source

The easiest way to get up and running on the Haskell toolchain is to download stack. All of gelatin's projects are spec'd out with stack.yaml build files, so picking the correct versions of libraries is not needed if you follow the stack path.

git clone https://github.com/schell/gelatin.git

cd gelatin

If you just installed stack, run

stack setup

Go make some โ˜• and then...

stack build

Note on Windows that if you run into this error

ghc-pkg.EXE: C:\sr\snapshots\3c4ad812\pkgdb\package.cache: you don't have
permission to modify this file

You can simply run stack build over and over until the thing finally compiles. facepalm - this will be fixed with ghc 8.2.

Drink your โ˜•, take a walk and rejoice...


I welcome any and all contributions. Feel free to tackle an issue (or a TODO) by making a pull request!

If you'd like to make a donation you can do so through patreon.

This library will always be free.