Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
D gamedev toolkit. 3D maths, language-friendly wrappers, stb_image port., etc...
Failed to load latest commit information.
assimp/gfm/assimp Less boring one-size-fits-all logging.
core/gfm/core If unimplemented debugBreak() does nothing, to allow to build with GDC.
deps Updated dependency graph. Cleaner!
enet/gfm/enet Upgrade all dependencies to latest tap. Notably upgrade logger depend…
examples Fix example.
freeimage/gfm/freeimage Less boring one-size-fits-all logging.
logger/gfm/logger Fix DDoc.
math/gfm/math Adds a translate function for boxes.
net/gfm/net Exception constructors are now @safe pure nothrow. This allows unitte…
opengl/gfm/opengl Upgrade derelict dependencies for 2.067 compat.
sdl2/gfm/sdl2 Fix typo in testAndRelease
.gitignore add .gitignore
.travis.yml Stricter travis. More green in readme.
UNLICENSE add missing licence
dub.json Nice to meet you.
hmod.cfg Add harbored-mod options
index.d Readme was outdated.

GFM Build Status

Join the chat at

GFM is a feature-rich library to ease the creation of video games / multimedia applications with the D programming language.

Documentation and overview can be found here:

Tested compilers: dmd-2.067.1 dmd-2.066.1 LDC-0.15.1 GDC-4.9.2


Public Domain (Unlicense).

How to use GFM?

Add the sub-package you are interested in in your dub.json:

      "dependencies": {
        "gfm:math": "~>2.0"

See the examples/ directory, or as an example of a game.


You absolutely don't need to use the whole of GFM. Pick just what you need to minimize the amount of dependencies.

GFM dependencies

There is an ongoing work to delete things in GFM that exist elsewhere but better. See to discover lots of useful libraries for your programs.

Design goals

  • Give some more power to the library user providing code that will probably need to be written anyway.
  • Each module / sub-package is maximally decoupled.
  • Logging interface for everything that has a logging callback.
  • Correctness and functionality are favoured over speed.
  • Wrappers are transparent layers that expose the C libraries objects, turn every error code into an D exception and makes it easier to use the library correctly. They do almost nothing and perhaps you don't need them.

Why use GFM?

In the D1 days, I created several multimedia applications:

This all came with some insight with how to do OpenGL applications in D. During this time I became acutely aware that my quick & dirty coding style wouldn't cut it in the long run. GFM is the clean successor library to the unfortunate code I was using at this time.

Something went wrong with that request. Please try again.