Final Platform Layer 0.9.8-beta
|
This category contains global settings structures/enumerations and functions to initialize/set them. More...
Data Structures | |
struct | fplAudioDeviceFormat |
A structure containing audio device format runtime properties, such as type, samplerate, channels, etc. More... | |
union | fplAudioDeviceID |
A union containing a id of the underlying backend. More... | |
struct | fplAudioDeviceInfo |
A structure containing the name and the id of the audio device. More... | |
struct | fplAudioSettings |
A structure containing audio settings, such as format, device info, callbacks, backend, etc. More... | |
struct | fplAudioTargetFormat |
A structure containing audio target format configurations, such as type, sample rate, channels, etc. More... | |
union | fplColor32 |
Defines a 32-bit color in format BGRA. More... | |
struct | fplConsoleSettings |
A structure containing the title and options for the console. More... | |
struct | fplGraphicsApiSettings |
A union that contains graphics api settings. More... | |
struct | fplImageSource |
A structure containing data for working with a image source. More... | |
struct | fplInputSettings |
A structure containing input settings. More... | |
struct | fplMemoryAllocationSettings |
A structure for setting up memory allocation usage. More... | |
struct | fplMemorySettings |
A structure for setting up memory settings for dynamic and temporary allocations. More... | |
struct | fplOpenGLSettings |
A structure that contains OpenGL video settings. More... | |
struct | fplSettings |
A structure containing settings, such as window, video, etc. More... | |
union | fplSpecificAudioSettings |
A union containing backend specific audio settings. More... | |
struct | fplVideoSettings |
A structure that contains video settings such as backend, v-sync, API-settings, etc. More... | |
struct | fplVulkanSettings |
A structure that contains Vulkan video settings. More... | |
struct | fplWindowCallbacks |
A structure containing the window callbacks. More... | |
struct | fplWindowPosition |
A structure containing the position of a window. More... | |
struct | fplWindowSettings |
A structure containing window settings, such as size, title etc. More... | |
struct | fplWindowSize |
A structure containing the size of a window. More... | |
Typedefs | |
typedef uint32_t() | fpl_audio_client_read_callback(const fplAudioDeviceFormat *deviceFormat, const uint32_t frameCount, void *outputSamples, void *userData) |
A callback for reading audio samples from the client. | |
typedef void *() | fpl_memory_allocate_callback(void *userData, const size_t size, const size_t alignment) |
Custom memory allocation callback. | |
typedef void() | fpl_memory_release_callback(void *userData, void *ptr) |
Custom memory release callback. | |
typedef bool() | fpl_window_event_callback(const fplPlatformType platformType, void *windowState, void *rawEventData, void *userData) |
A callback executed for each raw window event. | |
typedef fpl_window_event_callback | fpl_window_exposed_callback |
A callback executed when the window needs to be exposed/repainted. | |
typedef enum fplAudioBackendType | fplAudioBackendType |
An enumeration of audio backend types. | |
typedef enum fplAudioDefaultFields | fplAudioDefaultFields |
An enumeration of audio default fields. | |
typedef struct fplAudioDeviceFormat | fplAudioDeviceFormat |
A structure containing audio device format runtime properties, such as type, samplerate, channels, etc. | |
typedef union fplAudioDeviceID | fplAudioDeviceID |
A union containing a id of the underlying backend. | |
typedef struct fplAudioDeviceInfo | fplAudioDeviceInfo |
A structure containing the name and the id of the audio device. | |
typedef enum fplAudioFormatType | fplAudioFormatType |
An enumeration of audio format types. | |
typedef enum fplAudioLatencyMode | fplAudioLatencyMode |
An enumeration of audio latency modes. | |
typedef struct fplAudioSettings | fplAudioSettings |
A structure containing audio settings, such as format, device info, callbacks, backend, etc. | |
typedef struct fplAudioTargetFormat | fplAudioTargetFormat |
A structure containing audio target format configurations, such as type, sample rate, channels, etc. | |
typedef union fplColor32 | fplColor32 |
Defines a 32-bit color in format BGRA. | |
typedef struct fplConsoleSettings | fplConsoleSettings |
A structure containing the title and options for the console. | |
typedef struct fplGraphicsApiSettings | fplGraphicsApiSettings |
A union that contains graphics api settings. | |
typedef struct fplImageSource | fplImageSource |
A structure containing data for working with a image source. | |
typedef enum fplImageType | fplImageType |
An enumeration of image types. | |
typedef enum fplInitFlags | fplInitFlags |
An enumeration of initialization flags. | |
typedef struct fplInputSettings | fplInputSettings |
A structure containing input settings. | |
typedef enum fplMemoryAllocationMode | fplMemoryAllocationMode |
A enumeration of dynamic memory allocation modes. | |
typedef struct fplMemoryAllocationSettings | fplMemoryAllocationSettings |
A structure for setting up memory allocation usage. | |
typedef struct fplMemorySettings | fplMemorySettings |
A structure for setting up memory settings for dynamic and temporary allocations. | |
typedef enum fplOpenGLCompabilityFlags | fplOpenGLCompabilityFlags |
An enumeration of OpenGL compability flags. | |
typedef struct fplOpenGLSettings | fplOpenGLSettings |
A structure that contains OpenGL video settings. | |
typedef enum fplPlatformResultType | fplPlatformResultType |
An enumeration of platform result types. | |
typedef enum fplPlatformType | fplPlatformType |
An enumeration of platform types. | |
typedef struct fplSettings | fplSettings |
A structure containing settings, such as window, video, etc. | |
typedef union fplSpecificAudioSettings | fplSpecificAudioSettings |
A union containing backend specific audio settings. | |
typedef enum fplVideoBackendType | fplVideoBackendType |
An enumeration of video backend types. | |
typedef struct fplVideoSettings | fplVideoSettings |
A structure that contains video settings such as backend, v-sync, API-settings, etc. | |
typedef struct fplVulkanSettings | fplVulkanSettings |
A structure that contains Vulkan video settings. | |
typedef void() | fplVulkanValidationLayerCallback(void *userData, const char *message, const uint32_t messageSeverity, const uint32_t messageType, const void *debugUtilsMessengerCallbackData) |
The debug callback called when the validation layer writes something. | |
typedef enum fplVulkanValidationLayerMode | fplVulkanValidationLayerMode |
The validation layer modes for Vulkan. | |
typedef enum fplVulkanValidationSeverity | fplVulkanValidationSeverity |
The validation layer logging severity for Vulkan. | |
typedef struct fplWindowCallbacks | fplWindowCallbacks |
A structure containing the window callbacks. | |
typedef struct fplWindowPosition | fplWindowPosition |
A structure containing the position of a window. | |
typedef struct fplWindowSettings | fplWindowSettings |
A structure containing window settings, such as size, title etc. | |
typedef struct fplWindowSize | fplWindowSize |
A structure containing the size of a window. | |
Functions | |
FPL_ENUM_AS_FLAGS_OPERATORS (fplAudioDefaultFields) | |
fplAudioDefaultFields operator overloads for C++ | |
FPL_ENUM_AS_FLAGS_OPERATORS (fplInitFlags) | |
InitFlags operator overloads for C++. | |
fpl_inline fplColor32 | fplCreateColorRGBA (const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t a) |
Creates a fplColor32 from the specified r, g, b, a components. | |
fpl_common_api const fplSettings * | fplGetCurrentSettings () |
Gets the current settings. | |
fpl_common_api fplSettings | fplMakeDefaultSettings () |
Creates a full settings structure containing default values. | |
fpl_common_api const char * | fplPlatformGetResultName (const fplPlatformResultType type) |
Gets the string representation of a platform result type. | |
fpl_common_api void | fplSetDefaultAudioSettings (fplAudioSettings *audio) |
Resets the given audio settings to default settings (S16 PCM, 48 kHz, 2 Channels) | |
fpl_common_api void | fplSetDefaultConsoleSettings (fplConsoleSettings *console) |
Resets the given console settings container to default settings. | |
fpl_common_api void | fplSetDefaultInputSettings (fplInputSettings *input) |
Resets the given input settings container to default values. | |
fpl_common_api void | fplSetDefaultSettings (fplSettings *settings) |
Resets the given settings container to default values for window, video, audio, etc. | |
fpl_common_api void | fplSetDefaultVideoSettings (fplVideoSettings *video) |
Resets the given video settings to default values. | |
fpl_common_api void | fplSetDefaultWindowSettings (fplWindowSettings *window) |
Resets the given window settings container to default settings. | |
This category contains global settings structures/enumerations and functions to initialize/set them.
typedef uint32_t() fpl_audio_client_read_callback(const fplAudioDeviceFormat *deviceFormat, const uint32_t frameCount, void *outputSamples, void *userData) |
A callback for reading audio samples from the client.
deviceFormat | The pointer to the fplAudioDeviceFormat structure, the audio cards expects |
frameCount | The numbers if frames the client should write at max |
outputSamples | The pointer to the target samples |
userData | The pointer to the user data specified in fplAudioSettings |
Definition at line 3847 of file final_platform_layer.h.
typedef void *() fpl_memory_allocate_callback(void *userData, const size_t size, const size_t alignment) |
Custom memory allocation callback.
Definition at line 4044 of file final_platform_layer.h.
typedef void() fpl_memory_release_callback(void *userData, void *ptr) |
Custom memory release callback.
Definition at line 4046 of file final_platform_layer.h.
typedef bool() fpl_window_event_callback(const fplPlatformType platformType, void *windowState, void *rawEventData, void *userData) |
A callback executed for each raw window event.
platformType | The current fplPlatformType |
windowState | The opaque window state, mapping to fpl internal window state |
rawEventData | The raw event data structure for the current OS (XEvent for POSIX, MSG for Win32, etc.) |
userData | The pointer to the specific user data specified in fplWindowCallbacks |
Definition at line 3905 of file final_platform_layer.h.
A callback executed when the window needs to be exposed/repainted.
platformType | The current fplPlatformType |
windowState | The opaque window state, mapping to internal window state |
rawEventData | The raw event data structure for the current OS (XEvent for POSIX, MSG for Win32, etc.) |
userData | The pointer to the specific user data specified in fplWindowCallbacks |
Definition at line 3915 of file final_platform_layer.h.
typedef void() fplVulkanValidationLayerCallback(void *userData, const char *message, const uint32_t messageSeverity, const uint32_t messageType, const void *debugUtilsMessengerCallbackData) |
The debug callback called when the validation layer writes something.
Definition at line 3599 of file final_platform_layer.h.
enum fplAudioBackendType |
An enumeration of audio backend types.
Enumerator | |
---|---|
fplAudioBackendType_None | No audio backend. |
fplAudioBackendType_Auto | Auto detect. |
fplAudioBackendType_DirectSound | DirectSound. |
fplAudioBackendType_Alsa | ALSA. |
fplAudioBackendType_First | First fplAudioBackendType. |
fplAudioBackendType_Last | Last fplAudioBackendType. |
Definition at line 3691 of file final_platform_layer.h.
An enumeration of audio default fields.
Definition at line 3733 of file final_platform_layer.h.
enum fplAudioFormatType |
An enumeration of audio format types.
Enumerator | |
---|---|
fplAudioFormatType_None | No audio format. |
fplAudioFormatType_U8 | Unsigned 8-bit integer PCM. |
fplAudioFormatType_S16 | Signed 16-bit integer PCM. |
fplAudioFormatType_S24 | Signed 24-bit integer PCM. |
fplAudioFormatType_S32 | Signed 32-bit integer PCM. |
fplAudioFormatType_S64 | Signed 64-bit integer PCM. |
fplAudioFormatType_F32 | 32-bit IEEE_FLOAT |
fplAudioFormatType_F64 | 64-bit IEEE_FLOAT |
fplAudioFormatType_First | First fplAudioFormatType. |
fplAudioFormatType_Last | Last fplAudioFormatType. |
Definition at line 3708 of file final_platform_layer.h.
enum fplAudioLatencyMode |
An enumeration of audio latency modes.
Enumerator | |
---|---|
fplAudioLatencyMode_Conservative | Conservative latency. |
fplAudioLatencyMode_Low | Low latency. |
Definition at line 3751 of file final_platform_layer.h.
enum fplImageType |
An enumeration of image types.
Enumerator | |
---|---|
fplImageType_None | No image type. |
fplImageType_RGBA | RGBA image type. |
Definition at line 3878 of file final_platform_layer.h.
enum fplInitFlags |
An enumeration of initialization flags.
Enumerator | |
---|---|
fplInitFlags_None | No init flags. |
fplInitFlags_Console | Create a console window. |
fplInitFlags_Window | Create a single window. |
fplInitFlags_Video | Use a video backbuffer (This flag ensures that fplInitFlags_Window is included always) |
fplInitFlags_Audio | Use asynchronous audio playback. |
fplInitFlags_GameController | Support for game controllers. |
fplInitFlags_All | All init flags. |
Definition at line 3482 of file final_platform_layer.h.
A enumeration of dynamic memory allocation modes.
Enumerator | |
---|---|
fplMemoryAllocationMode_Automatic | Use OS memory allocation. |
fplMemoryAllocationMode_Custom | Use custom memory allocation. |
Definition at line 4049 of file final_platform_layer.h.
An enumeration of OpenGL compability flags.
Definition at line 3570 of file final_platform_layer.h.
An enumeration of platform result types.
Enumerator | |
---|---|
fplPlatformResultType_FailedWindow | Window creation failed. |
fplPlatformResultType_FailedAudio | Audio initialization failed. |
fplPlatformResultType_FailedVideo | Video initialization failed. |
fplPlatformResultType_FailedPlatform | Platform initialization failed. |
fplPlatformResultType_FailedAllocatingMemory | Failed allocating required memory. |
fplPlatformResultType_AlreadyInitialized | Platform is already initialized. |
fplPlatformResultType_NotInitialized | Platform is not initialized. |
fplPlatformResultType_Success | Everything is fine. |
fplPlatformResultType_First | First fplPlatformResultType. |
fplPlatformResultType_Last | Last fplPlatformResultType. |
Definition at line 3519 of file final_platform_layer.h.
enum fplPlatformType |
An enumeration of platform types.
Enumerator | |
---|---|
fplPlatformType_Unknown | Unknown platform. |
fplPlatformType_Windows | Windows platform. |
fplPlatformType_Linux | Linux platform. |
fplPlatformType_Unix | Unix platform. |
fplPlatformType_First | First fplPlatformType. |
fplPlatformType_Last | Last fplPlatformType. |
Definition at line 3502 of file final_platform_layer.h.
enum fplVideoBackendType |
An enumeration of video backend types.
Enumerator | |
---|---|
fplVideoBackendType_None | No video backend. |
fplVideoBackendType_Software | Software. |
fplVideoBackendType_OpenGL | OpenGL. |
fplVideoBackendType_Vulkan | Vulkan. |
fplVideoBackendType_First | First fplVideoBackendType. |
fplVideoBackendType_Last | Last fplVideoBackendType. |
Definition at line 3552 of file final_platform_layer.h.
The validation layer modes for Vulkan.
Definition at line 3602 of file final_platform_layer.h.
The validation layer logging severity for Vulkan.
Definition at line 3612 of file final_platform_layer.h.
fpl_inline fplColor32 fplCreateColorRGBA | ( | const uint8_t | r, |
const uint8_t | g, | ||
const uint8_t | b, | ||
const uint8_t | a | ||
) |
Creates a fplColor32 from the specified r, g, b, a components.
r | The red component in range of 0-255 |
g | The green component in range of 0-255 |
b | The blue component in range of 0-255 |
a | The alpha component in range of 0-255 |
Definition at line 3971 of file final_platform_layer.h.
fpl_common_api const fplSettings * fplGetCurrentSettings | ( | ) |
fpl_common_api fplSettings fplMakeDefaultSettings | ( | ) |
Creates a full settings structure containing default values.
fpl_common_api const char * fplPlatformGetResultName | ( | const fplPlatformResultType | type | ) |
Gets the string representation of a platform result type.
type | The platform result type as fplPlatformResultType |
fpl_common_api void fplSetDefaultAudioSettings | ( | fplAudioSettings * | audio | ) |
Resets the given audio settings to default settings (S16 PCM, 48 kHz, 2 Channels)
audio | The target fplAudioSettings structure |
fpl_common_api void fplSetDefaultConsoleSettings | ( | fplConsoleSettings * | console | ) |
Resets the given console settings container to default settings.
console | The target fplConsoleSettings structure |
fpl_common_api void fplSetDefaultInputSettings | ( | fplInputSettings * | input | ) |
Resets the given input settings container to default values.
input | The target fplInputSettings structure |
fpl_common_api void fplSetDefaultSettings | ( | fplSettings * | settings | ) |
Resets the given settings container to default values for window, video, audio, etc.
settings | The target fplSettings structure |
fpl_common_api void fplSetDefaultVideoSettings | ( | fplVideoSettings * | video | ) |
Resets the given video settings to default values.
video | The target fplVideoSettings structure |
fpl_common_api void fplSetDefaultWindowSettings | ( | fplWindowSettings * | window | ) |
Resets the given window settings container to default settings.
window | The target fplWindowSettings structure |