gfm

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

Overview:

  • gfm.core:
    • queue.d: a dead simple queue/fifo/stack/ring-buffer, with a range interface.
    • memory.d: aligned malloc/free/realloc.
  • gfm.math:
    • vector.d: small vectors for 2D and 3D.
    • matrix.d: small matrices for 2D and 3D.
    • quaternion.d: quaternions.
    • box.d: half-open intervals (for eg. rectangles, AABB).
    • simplerng.d: random distributions: a port of SimpleRNG from John D. Cook.
    • shapes.d: segment, triangle, sphere, ray, plane, frustum.
    • funcs.d: useful math functions, polynomial solvers, statistics.
  • gfm.integers:
    • half.d: 16-bit floating point type.
    • wideint.d: 2^N bits integers (recursive implementation, covers cent/ucent).
    • fixedpoint.d: fixed-point numbers.
  • gfm.opengl:
    • OpenGL wrapper based on package derelict-gl3.
    • makes easier to use the OpenGL API correctly.
    • including a matrix stack to replace fixed pipeline.
    • including compilation of a single source for multiple shaders.
    • practical shader uniforms support: set them at any time, with id caching, and support pruned uniforms.
    • legacy multi-texture support which is needed for a low-spec game.
    • built-in OpenGL debug output forwarding.
  • gfm.sdl2:
    • SDL 2.x wrapper based on package derelict-sdl2.
    • including SDL_image and SDL_ttf wrappers.
    • built-in SDL logging forwarding.
  • gfm.logger:
    • log.d: coloured console logger implementation based on std.logger.
  • gfm.freeimage:
    • FreeImage wrapper based on package derelict-fi.
  • gfm.assimp:
    • Assimp wrapper based on package derelict-assimp3.

Dealing with resources in D.

Be sure to read these entries on d-idioms: