|
Final Platform Layer 0.9.9-beta
|
This category contains global settings structures/enumerations and functions to initialize/set them. More...
Data Structures | |
| struct | fplAudioChannelMap |
| Stores the mapping of all audio channels to an audio speaker. More... | |
| union | fplAudioDeviceID |
| Stores the ID of the underlying backend. More... | |
| struct | fplAudioDeviceInfo |
| Stores the name and the ID of the audio device. More... | |
| struct | fplAudioDeviceInfoExtended |
| Stores the fplAudioDeviceInfo and the supported formats. More... | |
| struct | fplAudioFormat |
| Stores audio format properties, such as type, sample rate, channels, etc. More... | |
| struct | fplAudioSettings |
| Stores audio settings, such as format, device info, callbacks, backend, etc. More... | |
| union | fplColor32 |
| Defines a 32-bit color in format BGRA. More... | |
| struct | fplConsoleSettings |
| Stores the title and options for the console. More... | |
| struct | fplGraphicsApiSettings |
| Stores graphics API settings. More... | |
| struct | fplImageSource |
| Stores data for working with an image source. More... | |
| struct | fplInputSettings |
| Stores input settings. More... | |
| struct | fplMemoryAllocationSettings |
| Stores settings for memory allocation usage. More... | |
| struct | fplMemorySettings |
| Stores memory settings for dynamic and temporary allocations. More... | |
| struct | fplOpenGLSettings |
| Stores OpenGL video settings. More... | |
| struct | fplSettings |
| Stores settings, such as window, video, etc. More... | |
| union | fplSpecificAudioSettings |
| Stores backend-specific audio settings. More... | |
| struct | fplVideoSettings |
| Stores video settings such as backend, v-sync, API-settings, etc. More... | |
| struct | fplVulkanSettings |
| Stores Vulkan video settings. More... | |
| struct | fplWindowCallbacks |
| Stores the window callbacks. More... | |
| struct | fplWindowPosition |
| Stores the position of a window. More... | |
| struct | fplWindowSettings |
| Stores window settings, such as size, title, etc. More... | |
| struct | fplWindowSize |
| Stores the size of a window. More... | |
Macros | |
| #define | FPL_MAX_AUDIO_CHANNEL_COUNT |
| Maximum number of audio channels. | |
Typedefs | |
| typedef uint32_t | fpl_audio_client_read_callback(const fplAudioFormat *deviceFormat, const uint32_t frameCount, void *outputSamples, void *userData) |
| A function definition for a callback that is called to read audio samples from the client. | |
| typedef void * | fpl_memory_allocate_callback(void *userData, const size_t size, const size_t alignment) |
| A function definition for a custom memory allocation callback. | |
| typedef void | fpl_memory_release_callback(void *userData, void *ptr) |
| A function definition for a custom memory release callback. | |
| typedef bool | fpl_window_event_callback(const fplPlatformType platformType, void *windowState, void *rawEventData, void *userData) |
| A function definition for a callback executed for each raw window event. | |
| typedef fpl_window_event_callback | fpl_window_exposed_callback |
| A function definition for a callback executed when the window needs to be exposed/repainted. | |
| typedef enum fplAudioBackendType | fplAudioBackendType |
| typedef enum fplAudioChannelLayout | fplAudioChannelLayout |
| typedef struct fplAudioChannelMap | fplAudioChannelMap |
| typedef enum fplAudioChannelType | fplAudioChannelType |
| typedef enum fplAudioDefaultFields | fplAudioDefaultFields |
| typedef union fplAudioDeviceID | fplAudioDeviceID |
| typedef struct fplAudioDeviceInfo | fplAudioDeviceInfo |
| typedef struct fplAudioDeviceInfoExtended | fplAudioDeviceInfoExtended |
| typedef struct fplAudioFormat | fplAudioFormat |
| typedef enum fplAudioFormatType | fplAudioFormatType |
| typedef uint64_t | fplAudioFormatU64 |
| Encoded audio format in 64-bit ([63] Unused 8-bit, Type 8-bit, Channels 16-bit, Sample rate 32-bit [0]). | |
| typedef enum fplAudioLatencyType | fplAudioLatencyType |
| typedef enum fplAudioMode | fplAudioMode |
| typedef struct fplAudioSettings | fplAudioSettings |
| typedef enum fplAudioShareMode | fplAudioShareMode |
| typedef union fplColor32 | fplColor32 |
| typedef struct fplConsoleSettings | fplConsoleSettings |
| typedef struct fplGraphicsApiSettings | fplGraphicsApiSettings |
| typedef struct fplImageSource | fplImageSource |
| typedef enum fplImageType | fplImageType |
| typedef enum fplInitFlags | fplInitFlags |
| typedef struct fplInputSettings | fplInputSettings |
| typedef enum fplMemoryAllocationMode | fplMemoryAllocationMode |
| typedef struct fplMemoryAllocationSettings | fplMemoryAllocationSettings |
| typedef struct fplMemorySettings | fplMemorySettings |
| typedef enum fplOpenGLCompabilityFlags | fplOpenGLCompabilityFlags |
| typedef struct fplOpenGLSettings | fplOpenGLSettings |
| typedef enum fplPlatformResultType | fplPlatformResultType |
| typedef enum fplPlatformType | fplPlatformType |
| typedef struct fplSettings | fplSettings |
| typedef union fplSpecificAudioSettings | fplSpecificAudioSettings |
| typedef enum fplVideoBackendType | fplVideoBackendType |
| typedef struct fplVideoSettings | fplVideoSettings |
| typedef struct fplVulkanSettings | fplVulkanSettings |
| typedef void | fplVulkanValidationLayerCallback(void *userData, const char *message, const uint32_t messageSeverity, const uint32_t messageType, const void *debugUtilsMessengerCallbackData) |
| A function definition for the debug callback that is called, when the validation layer writes something. | |
| typedef enum fplVulkanValidationLayerMode | fplVulkanValidationLayerMode |
| typedef enum fplVulkanValidationSeverity | fplVulkanValidationSeverity |
| typedef struct fplWindowCallbacks | fplWindowCallbacks |
| typedef struct fplWindowPosition | fplWindowPosition |
| typedef struct fplWindowSettings | fplWindowSettings |
| typedef struct fplWindowSize | fplWindowSize |
Functions | |
| FPL_ENUM_AS_FLAGS_OPERATORS (fplAudioChannelType) | |
| Audio speaker layout operator overloads for C++. | |
| FPL_ENUM_AS_FLAGS_OPERATORS (fplAudioDefaultFields) | |
| fplAudioDefaultFields operator overloads for C++. | |
| FPL_ENUM_AS_FLAGS_OPERATORS (fplInitFlags) | |
| InitFlags operator overloads for C++. | |
| fpl_common_api fplColor32 | fplCreateColorRGBA (const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t a) |
| Creates a 32-bit color structure from the specified R, G, B, A components. | |
| fpl_common_api const char * | fplGetAudioChannelTypeName (const fplAudioChannelType type) |
| Gets the name of the specified audio channel type. | |
| fpl_common_api const fplSettings * | fplGetCurrentSettings (void) |
| Gets the current settings. | |
| fpl_common_api fplSettings | fplMakeDefaultSettings (void) |
| 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.
| #define FPL_MAX_AUDIO_CHANNEL_COUNT |
Maximum number of audio channels.
Definition at line 4739 of file final_platform_layer.h.
| typedef uint32_t fpl_audio_client_read_callback(const fplAudioFormat *deviceFormat, const uint32_t frameCount, void *outputSamples, void *userData) |
A function definition for a callback that is called to read audio samples from the client.
| [in] | deviceFormat | Reference to the source audio format structure fplAudioFormat. |
| [in] | frameCount | The number of frames the client should write at max. |
| [out] | outputSamples | Reference to the target samples. |
| [in] | userData | Reference to the user data specified in fplAudioSettings. |
Definition at line 4857 of file final_platform_layer.h.
| typedef void * fpl_memory_allocate_callback(void *userData, const size_t size, const size_t alignment) |
A function definition for a custom memory allocation callback.
| [in] | userData | Reference to opaque user data. |
| [in] | size | The size to be allocated. |
| [in] | alignment | The alignment in bytes. |
Definition at line 5090 of file final_platform_layer.h.
| typedef void fpl_memory_release_callback(void *userData, void *ptr) |
A function definition for a custom memory release callback.
| [in] | userData | Reference to opaque user data. |
| [in] | ptr | Reference to the memory to be released. |
Definition at line 5097 of file final_platform_layer.h.
| typedef bool fpl_window_event_callback(const fplPlatformType platformType, void *windowState, void *rawEventData, void *userData) |
A function definition for a callback executed for each raw window event.
| [in] | platformType | The current platform type fplPlatformType. |
| [in,out] | windowState | Reference to the opaque window state, mapping to the actual internal window state. |
| [in] | rawEventData | Reference to the raw event data structure for the current OS (XEvent for POSIX, MSG for Win32, etc.). |
| [in] | userData | Reference to the specific user data specified in fplWindowCallbacks. |
Definition at line 4926 of file final_platform_layer.h.
A function definition for a callback executed when the window needs to be exposed/repainted.
| [in] | platformType | The current platform type fplPlatformType. |
| [in,out] | windowState | Reference to the opaque window state, mapping to internal window state. |
| [in] | rawEventData | Reference to the raw event data structure for the current OS (XEvent for POSIX, MSG for Win32, etc.). |
| [in] | userData | Reference to the specific user data specified in fplWindowCallbacks. |
Definition at line 4936 of file final_platform_layer.h.
| typedef uint64_t fplAudioFormatU64 |
Encoded audio format in 64-bit ([63] Unused 8-bit, Type 8-bit, Channels 16-bit, Sample rate 32-bit [0]).
Definition at line 4796 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) |
A function definition for the debug callback that is called, when the validation layer writes something.
| [in] | userData | Reference to opaque user data. |
| [in] | message | The message from the validation layer. |
| [in] | messageSeverity | The severity of the message. |
| [in] | messageType | The type of the message. |
| [in] | debugUtilsMessengerCallbackData | Reference to the debug utils messenger callback data. |
Definition at line 4391 of file final_platform_layer.h.
| enum fplAudioBackendType |
An enumeration of audio backend types.
| Enumerator | |
|---|---|
| fplAudioBackendType_None | No audio backend. |
| fplAudioBackendType_Auto | Auto detect audio backend. |
| fplAudioBackendType_DirectSound | DirectSound audio backend. |
| fplAudioBackendType_Alsa | ALSA audio backend. |
| fplAudioBackendType_Custom | Custom audio backend. |
| fplAudioBackendType_First | First fplAudioBackendType. |
| fplAudioBackendType_Last | Last fplAudioBackendType. |
Definition at line 4501 of file final_platform_layer.h.
An enumeration of audio channel layouts.
Definition at line 4611 of file final_platform_layer.h.
| enum fplAudioChannelType |
An enumeration of audio channel types.
Definition at line 4648 of file final_platform_layer.h.
An enumeration of audio default fields.
Definition at line 4551 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 4523 of file final_platform_layer.h.
| enum fplAudioLatencyType |
An enumeration of audio latency types.
| Enumerator | |
|---|---|
| fplAudioLatencyType_Conservative | Conservative latency. |
| fplAudioLatencyType_Low | Low latency. |
Definition at line 4574 of file final_platform_layer.h.
| enum fplAudioMode |
An enumeration of audio modes that combines conservative/latency and exclusive/shared.
Definition at line 4596 of file final_platform_layer.h.
| enum fplAudioShareMode |
An enumeration of audio share modes.
| Enumerator | |
|---|---|
| fplAudioShareMode_Shared | Shared mode. |
| fplAudioShareMode_Exclusive | Exclusive mode. |
Definition at line 4585 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 4896 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 4252 of file final_platform_layer.h.
An enumeration of dynamic memory allocation modes.
| Enumerator | |
|---|---|
| fplMemoryAllocationMode_Automatic | Use OS memory allocation. |
| fplMemoryAllocationMode_Custom | Use custom memory allocation. |
Definition at line 5103 of file final_platform_layer.h.
An enumeration of OpenGL compatibility flags.
Definition at line 4352 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_OutOfMemory | 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 4295 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 4275 of file final_platform_layer.h.
| enum fplVideoBackendType |
An enumeration of video backend types.
Definition at line 4331 of file final_platform_layer.h.
An enumeration of Vulkan validation layer modes.
Definition at line 4397 of file final_platform_layer.h.
An enumeration of Vulkan validation layer logging severity.
Definition at line 4410 of file final_platform_layer.h.
| fpl_common_api fplColor32 fplCreateColorRGBA | ( | const uint8_t | r, |
| const uint8_t | g, | ||
| const uint8_t | b, | ||
| const uint8_t | a ) |
Creates a 32-bit color structure from the specified R, G, B, A components.
| [in] | r | The red component in range of 0-255. |
| [in] | g | The green component in range of 0-255. |
| [in] | b | The blue component in range of 0-255. |
| [in] | a | The alpha component in range of 0-255. |
| fpl_common_api const char * fplGetAudioChannelTypeName | ( | const fplAudioChannelType | type | ) |
Gets the name of the specified audio channel type.
| [in] | type | Audio channel type enumeration value fplAudioChannelType. |
| fpl_common_api const fplSettings * fplGetCurrentSettings | ( | void | ) |
Gets the current settings.
| fpl_common_api fplSettings fplMakeDefaultSettings | ( | void | ) |
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.
| [in] | type | The platform result type enumeration value fplPlatformResultType. |
| fpl_common_api void fplSetDefaultAudioSettings | ( | fplAudioSettings * | audio | ) |
Resets the given audio settings to default settings (S16 PCM, 48 kHz, 2 Channels).
| [out] | audio | Reference to the target audio settings structure fplAudioSettings. |
| fpl_common_api void fplSetDefaultConsoleSettings | ( | fplConsoleSettings * | console | ) |
Resets the given console settings container to default settings.
| [out] | console | Reference to the target structure fplConsoleSettings. |
| fpl_common_api void fplSetDefaultInputSettings | ( | fplInputSettings * | input | ) |
Resets the given input settings container to default values.
| [out] | input | Reference to the target structure fplInputSettings. |
| fpl_common_api void fplSetDefaultSettings | ( | fplSettings * | settings | ) |
Resets the given settings container to default values for window, video, audio, etc.
| [out] | settings | Reference to the target structure fplSettings. |
| fpl_common_api void fplSetDefaultVideoSettings | ( | fplVideoSettings * | video | ) |
Resets the given video settings to default values.
| [out] | video | Reference to the target structure fplVideoSettings. |
| fpl_common_api void fplSetDefaultWindowSettings | ( | fplWindowSettings * | window | ) |
Resets the given window settings container to default settings.
| [out] | window | Reference to the target structure fplWindowSettings. |