-
Notifications
You must be signed in to change notification settings - Fork 13
FAQ
-
FAQ
- What are the license requirements for FPL?
- I did pay for FPL, did I get ripped off?
- In what language is FPL written?
- What makes it different from other platform abstraction libraries, such as SDL/SFML, etc. ?
- Why is FPL so big?
- How does it work?
- Does FPL have some limitations?
- How does FPL handle strings?
- Can FPL handle third-party libraries?
Final Platform Layer is released under the MIT License.
This license allows you to use FPL freely in any software.
Yes, you are! FPL is fully open source and costs nothing.
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) is used, but you can disable it if needed.
- FPL is designed to require bare minimum linking to the OS (kernel32.lib / libdl.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.
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.
FPL relies heavily 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.
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.
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.
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 own way of providing the main entry point and may not be compatible with each other.
- Assertion & Debug
- Atomic operations
- Audio functions
- Clipboard functions
- Console functions
- Constants
- Display/Monitor functions
- Dynamic library loading
- Error Handling
- Files/IO functions
- Function macros
- Hardware Infos
- Input types and functions
- Localization functions
- Logging
- Memory Macros
- Memory functions
- Operating system Infos
- Path functions
- Platform functions
- Session Infos
- Settings & Configurations
- Storage class identifiers
- String functions
- Threading and synchronizations routines
- Timing functions
- Video functions
- Window events
- Window functions
- fplARMCPUCapabilities
- fplAudioChannelMap
- fplAudioDeviceID
- fplAudioDeviceInfo
- fplAudioFormat
- fplAudioSettings
- fplColor32
- fplConditionVariable
- fplConsoleSettings
- fplCPUCapabilities
- fplCPUIDLeaf
- fplDateTime
- fplDateTimeCreationResult
- fplDateTimeResult
- fplDisplayInfo
- fplDisplayMode
- fplDynamicLibraryHandle
- fplEndianess
- fplEvent
- fplFileEntry
- fplFileHandle
- fplFilePermissions
- fplFileTimeStamps
- fplGamepadButton
- fplGamepadData
- fplGamepadEvent
- fplGamepadInfo
- fplGamepadInputBinding
- fplGamepadMapping
- fplGamepadSettings
- fplGamepadState
- fplGamepadStates
- fplGraphicsApiSettings
- fplImageSource
- fplInputBackendMask
- fplInputBackendSupport
- fplInputDevice
- fplInputDeviceGuid
- fplInputSettings
- fplInternalConditionVariable
- fplInternalDynamicLibraryHandle
- fplInternalFileEntryHandle
- fplInternalFileHandle
- fplInternalFileRootInfo
- fplInternalMutexHandle
- fplInternalSemaphoreHandle
- fplInternalSignalHandle
- fplInternalThreadHandle
- fplKeyboardEvent
- fplKeyboardState
- fplLogSettings
- fplLogWriter
- fplLogWriterConsole
- fplLogWriterCustom
- fplMemoryAllocationSettings
- fplMemoryBlock
- fplMemoryInfos
- fplMemorySettings
- fplMouseEvent
- fplMouseState
- fplMutexHandle
- fplOpenGLSettings
- fplOSVersionInfos
- fplSemaphoreHandle
- fplSettings
- fplSignalHandle
- fplSpecificAudioSettings
- fplThreadHandle
- fplThreadParameters
- fplTimestamp
- fplVersionInfo
- fplVideoBackBuffer
- fplVideoRect
- fplVideoRequirements
- fplVideoRequirementsVulkan
- fplVideoSettings
- fplVideoSurface
- fplVideoSurfaceOpenGL
- fplVideoSurfaceVulkan
- fplVideoWindow
- fplVulkanSettings
- fplWindowCallbacks
- fplWindowDropFiles
- fplWindowEvent
- fplWindowPosition
- fplWindowSettings
- fplWindowSize
- fplX86CPUCapabilities