Final Platform Layer

A C99 Single-Header-File Platform Abstraction Library

What is FPL?

Final Platform Layer is a Single-Header-File cross-platform C development library designed to abstract the underlying platform to a simple and easy-to-use API - providing low-level access to (Window, Video, Audio, Input, File/Path IO, Threads, Memory, Hardware, etc.).

The main focus is game/media/simulation development, so the default settings will create a window, set up an OpenGL rendering context, and initialize audio playback on any platform.

It is written in C99 for simplicity and best portability but is C++ compatible as well.

FPL supports the platforms Windows/Linux/Unix for the architectures x86/x64/arm.

The only dependencies are built-in operating system libraries and a C99 compliant compiler.

It is licensed under the MIT-License. This license allows you to use FPL freely in any software.


What makes it different from other platform abstraction libraries, such as SDL/SFML, etc. ?

  • Has bare minimum compile and linking requirements.
  • No requirements for any dependencies or build-systems.
  • Lightweight feature set (Single window, Graphics API initialization, Raw audio samples playback, Input handling, Multithreading, Path/File IO, Atomics, OS/HW-Infos, etc.)
  • Compiles blazingly fast on all modern C99/C++ compilers.
  • Uses a fixed and small memory footprint and handles memory very gracefully.
  • Can be controlled by a configuration structure in very detail at startup.
  • Allows to control the memory allocations and handles memory very gracefully.
  • Uses runtime linking by default, so no libs needs to be included.
  • Can be integrated however you like (statically linked, dynamically linked, with-full source).
  • No data hiding -> everything is accessible.


How do I get started?

You download the latest "final_platform_layer.h" file.

Drop it into your C/C++ project and use it in any place you want.

Define FPL_IMPLEMENTATION in at least one translation unit before including the header file.

For more details see the Usage page.