Final Platform Layer 0.9.8-beta
Loading...
Searching...
No Matches
FAQ

FAQ

What are the license requirements for FPL?

Final Platform Layer is released under the MIT License.
This license allows you to use FPL freely in any software.

I did pay for FPL, did I get ripped-of?

Yes, you are! FPL is fully open source and costs nothing.

In what language is FPL written?

Final Platform Layer is written in C99 for simplicity and best portability, but is C++/11 compatible as well.
It uses standard types such as uint32_t or intptr_t from <stdint.h> <stddef.h> and <stdbool.h> to ensure correctness on all platforms.
For certain features such as printf(), getchar() the CRT (C-Runtime-Library) are used, but you can disable it if needed.

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

  • FPL is designed to require bare minimum linking to the OS (kernel32.lib / libld.so) only.
  • It does not require any dependencies or build-systems to get it running.
  • It has a lightweight feature set.
  • No data hiding -> everything is accessible.
  • It uses a fixed and small memory footprint and handles memory very gracefully.
  • FPL can be controlled by configuration in very detail at startup.
  • You decide how to integrate it; not the library. You can statically link it, you can dynamically link it, or you can just include the full source.

Why is FPL so big?

Final Platform Layer contains headers and implementations for all supported platforms with all the function prototypes for linking operating system functions dynamically.
Also the entire API definition is documented inline and it comes with a full detailed changelog.

How does it work?

FPL relies heavy on preprocessor defines, used for detecting the current architecture / compiler / operating system.
This makes it possible to enable/disable certain code-paths for certain platform/compiler combinations.
Only built-in OS operating system functions are used in every situation and the usage of standard library functions is prevented by all means.

To prevent code duplication, FPL implements either platform sets or just subsets which can be used for other platforms For example, Linux is a POSIX-based platform so it uses POSIX libraries, such as pthread / X11, etc. The pthread and X11 implementation are separated, so other Unix-based platforms can use that implementation without any problem.
On top of that FPL implements multiple audio and video backends, so that all platforms can playback audio and render using a supported graphics API.

Does FPL have some limitations?

Yes, it does have some limitations, because it cannot do everything for you:

  • No audio DSP is going on, so you have to convert the samples into the proper format (Sample rate, Channels, Format type) FPL expects.
  • There are no rendering functions included, except for presenting the current frame. So you have to load and call the correct API functions yourself.
  • FPL has a lightweight feature set, so it may not have all the features you may need.

How does FPL handle strings?

On every platform, all strings/paths are expected to be UTF-8 always!
If you need to convert Unicode/UTF-16 based strings there are conversion functions built-in.

Can FPL handle third-party libraries?

Yes it works very well with other libraries. There are several demo projects in the repository which show that.

Here is a short list of tested third-party libraries with FPL:

  • C-Standard Library
  • C++ Standard Template Library
  • STB Libraries
  • Glew/Glad
  • PhysX
  • Box2D
  • GLM
  • ImGUI
  • FFMPEG

But it won't work with other platform abstraction libraries such as SDL, SFML, GLUT, GLFW, etc.
All these other platform abstraction libraries have their way of providing the main entry point and may not compatibility with each other.