Final Platform Layer 1.0.0
Loading...
Searching...
No Matches
Settings & Configurations

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  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  fplGamepadSettings
 Stores the settings for controlling how gamepads are handled. More...
struct  fplGraphicsApiSettings
 Stores graphics API settings. More...
struct  fplImageSource
 Stores data for working with an image source. More...
struct  fplInputBackendMask
 Bitmask of enabled fplInputBackendType values. 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_GAMEPAD_MAPPING_RESOLVE_CALLBACK(name)
 Defines a prototype for a gamepad mapping resolver function.
#define FPL_MAX_AUDIO_CHANNEL_COUNT
 Maximum number of audio channels.
#define FPL_MAX_INPUT_BACKEND_COUNT
 Maximum number of input backends that can be active at once.

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 bool fpl_gamepad_mapping_resolver_callback(const fplGamepadInfo *info, fplGamepadMapping *outMapping, void *userData)
 Optional callback invoked once per controller connect on raw-HID gamepad backends (DirectInput, Linux joystick/evdev, etc.) to install a custom fplGamepadMapping for the device.
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 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 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.

Enumerations

enum  fplAudioBackendType {
  fplAudioBackendType_None , fplAudioBackendType_Auto , fplAudioBackendType_DirectSound , fplAudioBackendType_WASAPI ,
  fplAudioBackendType_Alsa , fplAudioBackendType_PulseAudio , fplAudioBackendType_PipeWire , fplAudioBackendType_OSS ,
  fplAudioBackendType_First , fplAudioBackendType_Last
}
 An enumeration of audio backend types. More...
enum  fplAudioChannelLayout {
  fplAudioChannelLayout_Unsupported , fplAudioChannelLayout_Automatic , fplAudioChannelLayout_Mono , fplAudioChannelLayout_Stereo ,
  fplAudioChannelLayout_2_1 , fplAudioChannelLayout_3_0_Surround , fplAudioChannelLayout_4_0_Quad , fplAudioChannelLayout_4_0_Surround ,
  fplAudioChannelLayout_4_1 , fplAudioChannelLayout_5_0_Surround , fplAudioChannelLayout_5_1 , fplAudioChannelLayout_6_1 ,
  fplAudioChannelLayout_7_1 , fplAudioChannelLayout_First , fplAudioChannelLayout_Last
}
 An enumeration of audio channel layouts. More...
enum  fplAudioChannelType {
  fplAudioChannelType_None , fplAudioChannelType_FrontLeft , fplAudioChannelType_FrontRight , fplAudioChannelType_FrontCenter ,
  fplAudioChannelType_LowFrequency , fplAudioChannelType_BackLeft , fplAudioChannelType_BackRight , fplAudioChannelType_FrontLeftOfCenter ,
  fplAudioChannelType_FrontRightOfCenter , fplAudioChannelType_BackCenter , fplAudioChannelType_SideLeft , fplAudioChannelType_SideRight ,
  fplAudioChannelType_TopCenter , fplAudioChannelType_TopFrontLeft , fplAudioChannelType_TopFrontCenter , fplAudioChannelType_TopFrontRight ,
  fplAudioChannelType_TopBackLeft , fplAudioChannelType_TopBackCenter , fplAudioChannelType_TopBackRight , fplAudioChannelType_AUX0 ,
  fplAudioChannelType_AUX1 , fplAudioChannelType_AUX2 , fplAudioChannelType_AUX3 , fplAudioChannelType_AUX4 ,
  fplAudioChannelType_AUX5 , fplAudioChannelType_AUX6 , fplAudioChannelType_AUX7 , fplAudioChannelType_AUX8 ,
  fplAudioChannelType_AUX9 , fplAudioChannelType_AUX10 , fplAudioChannelType_AUX11 , fplAudioChannelType_AUX12 ,
  fplAudioChannelType_AUX13 , fplAudioChannelType_AUX14 , fplAudioChannelType_AUX15 , fplAudioChannelType_First ,
  fplAudioChannelType_Last
}
 An enumeration of audio channel types. More...
enum  fplAudioDefaultFields {
  fplAudioDefaultFields_None , fplAudioDefaultFields_BufferSize , fplAudioDefaultFields_SampleRate , fplAudioDefaultFields_Channels ,
  fplAudioDefaultFields_Periods , fplAudioDefaultFields_Type , fplAudioDefaultFields_ChannelLayout
}
 An enumeration of audio default fields. More...
enum  fplAudioFormatType {
  fplAudioFormatType_None , fplAudioFormatType_U8 , fplAudioFormatType_S16 , fplAudioFormatType_S24 ,
  fplAudioFormatType_S32 , fplAudioFormatType_S64 , fplAudioFormatType_F32 , fplAudioFormatType_F64 ,
  fplAudioFormatType_First , fplAudioFormatType_Last
}
 An enumeration of audio format types. More...
enum  fplAudioLatencyType { fplAudioLatencyType_Conservative , fplAudioLatencyType_Low }
 fplAudioDefaultFields operator overloads for C++. More...
enum  fplAudioMode { fplAudioMode_Shared_Conservative , fplAudioMode_Exclusive_Conservative , fplAudioMode_Shared_LowLatency , fplAudioMode_Exclusive_LowLatency }
 An enumeration of audio modes that combines conservative/latency and exclusive/shared. More...
enum  fplAudioShareMode { fplAudioShareMode_Shared , fplAudioShareMode_Exclusive }
 An enumeration of audio share modes. More...
enum  fplImageType { fplImageType_None , fplImageType_RGBA }
 An enumeration of image types. More...
enum  fplInitFlags {
  fplInitFlags_None , fplInitFlags_Console , fplInitFlags_Window , fplInitFlags_Video ,
  fplInitFlags_Audio , fplInitFlags_Gamepad , fplInitFlags_Keyboard , fplInitFlags_Mouse ,
  fplInitFlags_Input , fplInitFlags_All
}
 An enumeration of initialization flags. More...
enum  fplInputBackendType {
  fplInputBackendType_None , fplInputBackendType_Auto , fplInputBackendType_XInput , fplInputBackendType_DInput ,
  fplInputBackendType_LinuxJoystick , fplInputBackendType_X11Kbm , fplInputBackendType_Win32 , fplInputBackendType_First ,
  fplInputBackendType_Last
}
 InputSourceType operator overloads for C++. More...
enum  fplInputSourceType {
  fplInputSourceType_None , fplInputSourceType_Keyboard , fplInputSourceType_Mouse , fplInputSourceType_Gamepad ,
  fplInputSourceType_All
}
 A bitmask of input source kinds (keyboard, mouse, gamepad). More...
enum  fplMemoryAllocationMode { fplMemoryAllocationMode_Automatic , fplMemoryAllocationMode_Custom }
 An enumeration of dynamic memory allocation modes. More...
enum  fplOpenGLCompatibilityFlags { fplOpenGLCompatibilityFlags_Legacy , fplOpenGLCompatibilityFlags_Core , fplOpenGLCompatibilityFlags_Compatibility , fplOpenGLCompatibilityFlags_Forward }
 An enumeration of OpenGL compatibility flags. More...
enum  fplPlatformResultType {
  fplPlatformResultType_FailedWindow , fplPlatformResultType_FailedAudio , fplPlatformResultType_FailedVideo , fplPlatformResultType_FailedPlatform ,
  fplPlatformResultType_OutOfMemory , fplPlatformResultType_AlreadyInitialized , fplPlatformResultType_NotInitialized , fplPlatformResultType_Success ,
  fplPlatformResultType_First , fplPlatformResultType_Last
}
 An enumeration of platform result types. More...
enum  fplPlatformType {
  fplPlatformType_Unknown , fplPlatformType_Windows , fplPlatformType_Linux , fplPlatformType_Unix ,
  fplPlatformType_First , fplPlatformType_Last
}
 InitFlags operator overloads for C++. More...
enum  fplVideoBackendType {
  fplVideoBackendType_None , fplVideoBackendType_Software , fplVideoBackendType_OpenGL , fplVideoBackendType_Vulkan ,
  fplVideoBackendType_First , fplVideoBackendType_Last
}
 An enumeration of video backend types. More...
enum  fplVulkanValidationLayerMode { fplVulkanValidationLayerMode_Disabled , fplVulkanValidationLayerMode_Optional , fplVulkanValidationLayerMode_Required }
 An enumeration of Vulkan validation layer modes. More...
enum  fplVulkanValidationSeverity {
  fplVulkanValidationSeverity_Off , fplVulkanValidationSeverity_Error , fplVulkanValidationSeverity_Warning , fplVulkanValidationSeverity_Info ,
  fplVulkanValidationSeverity_Verbose , fplVulkanValidationSeverity_All
}
 An enumeration of Vulkan validation layer logging severity. More...

Functions

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)
 Audio speaker layout operator overloads for C++.
fpl_common_api const fplSettingsfplGetCurrentSettings (void)
 Gets the current settings.
fpl_common_api void fplInputBackendMaskDisable (fplInputBackendMask *mask, const fplInputBackendType type)
 Clears the bit for the given backend type in the mask.
fpl_common_api void fplInputBackendMaskEnable (fplInputBackendMask *mask, const fplInputBackendType type)
 Sets the bit for the given backend type in the mask.
fpl_common_api bool fplInputBackendMaskIsEnabled (const fplInputBackendMask *mask, const fplInputBackendType type)
 Returns true when the given backend type bit is set in the mask.
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 fplSetDefaultGamepadSettings (fplGamepadSettings *gamepadSettings)
 Resets the given gamepad settings container to default values.
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.

Detailed Description

This category contains global settings structures/enumerations and functions to initialize/set them.

Macro Definition Documentation

◆ FPL_GAMEPAD_MAPPING_RESOLVE_CALLBACK

#define FPL_GAMEPAD_MAPPING_RESOLVE_CALLBACK ( name)

Defines a prototype for a gamepad mapping resolver function.

Parameters
[in]nameThe name of the function.
Returns
A boolean indicating the result.

Definition at line 6672 of file final_platform_layer.h.

◆ FPL_MAX_AUDIO_CHANNEL_COUNT

#define FPL_MAX_AUDIO_CHANNEL_COUNT

Maximum number of audio channels.

Definition at line 6269 of file final_platform_layer.h.

◆ FPL_MAX_INPUT_BACKEND_COUNT

#define FPL_MAX_INPUT_BACKEND_COUNT

Maximum number of input backends that can be active at once.

Definition at line 6752 of file final_platform_layer.h.

Typedef Documentation

◆ fpl_audio_client_read_callback

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.

Parameters
[in]deviceFormatReference to the source audio format structure fplAudioFormat.
[in]frameCountThe number of frames the client should write at max.
[out]outputSamplesReference to the target samples.
[in]userDataReference to the user data specified in fplAudioSettings.
Returns
Returns the number of written frames.
See also
Setting the client callback

Definition at line 6445 of file final_platform_layer.h.

◆ fpl_gamepad_mapping_resolver_callback

typedef bool fpl_gamepad_mapping_resolver_callback(const fplGamepadInfo *info, fplGamepadMapping *outMapping, void *userData)

Optional callback invoked once per controller connect on raw-HID gamepad backends (DirectInput, Linux joystick/evdev, etc.) to install a custom fplGamepadMapping for the device.

Parameters
[in]infoBackend-built description of the device that just connected.
[out]outMappingMapping to fill in when the resolver wants to override the default convention.
[in]userDataOpaque pointer the user supplied via fplGamepadSettings.
Returns
true to install outMapping for this device, false to fall back to the default convention.
Note
The callback runs once at connect time on the platform input thread; do not block.

Definition at line 6683 of file final_platform_layer.h.

◆ fpl_memory_allocate_callback

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.

Parameters
[in]userDataReference to opaque user data.
[in]sizeThe size to be allocated.
[in]alignmentThe alignment in bytes.
Returns
Returns a reference to the allocated memory.

Definition at line 6820 of file final_platform_layer.h.

◆ fpl_memory_release_callback

typedef void fpl_memory_release_callback(void *userData, void *ptr)

A function definition for a custom memory release callback.

Parameters
[in]userDataReference to opaque user data.
[in]ptrReference to the memory to be released.

Definition at line 6827 of file final_platform_layer.h.

◆ fpl_window_event_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.

Parameters
[in]platformTypeThe current platform type fplPlatformType.
[in,out]windowStateReference to the opaque window state, mapping to the actual internal window state.
[in]rawEventDataReference to the raw event data structure for the current OS (XEvent for POSIX, MSG for Win32, etc.).
[in]userDataReference to the specific user data specified in fplWindowCallbacks.
Returns
Needs to return true if the event is handled, false otherwise.

Definition at line 6524 of file final_platform_layer.h.

◆ fpl_window_exposed_callback

A function definition for a callback executed when the window needs to be exposed/repainted.

Parameters
[in]platformTypeThe current platform type fplPlatformType.
[in,out]windowStateReference to the opaque window state, mapping to internal window state.
[in]rawEventDataReference to the raw event data structure for the current OS (XEvent for POSIX, MSG for Win32, etc.).
[in]userDataReference to the specific user data specified in fplWindowCallbacks.
Returns
Needs to return true if the event is handled, false otherwise.

Definition at line 6534 of file final_platform_layer.h.

◆ fplAudioFormatU64

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 6342 of file final_platform_layer.h.

◆ fplVulkanValidationLayerCallback

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.

Parameters
[in]userDataReference to opaque user data.
[in]messageThe message from the validation layer.
[in]messageSeverityThe severity of the message.
[in]messageTypeThe type of the message.
[in]debugUtilsMessengerCallbackDataReference to the debug utils messenger callback data.

Definition at line 5915 of file final_platform_layer.h.

Enumeration Type Documentation

◆ 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_WASAPI 

WASAPI audio backend.

fplAudioBackendType_Alsa 

ALSA audio backend.

fplAudioBackendType_PulseAudio 

PulseAudio audio backend.

fplAudioBackendType_PipeWire 

PipeWire audio backend.

fplAudioBackendType_OSS 

OSS audio backend.

fplAudioBackendType_First 

First fplAudioBackendType.

fplAudioBackendType_Last 

Last fplAudioBackendType.

Definition at line 6025 of file final_platform_layer.h.

◆ fplAudioChannelLayout

An enumeration of audio channel layouts.

Enumerator
fplAudioChannelLayout_Unsupported 

Unsupported Audio Channel Layout.

fplAudioChannelLayout_Automatic 

Automatic Audio Channel Layout (based on number of channels and/or sound device).

fplAudioChannelLayout_Mono 

Mono Audio Channel Layout (1.0, Single Channel: Front).

fplAudioChannelLayout_Stereo 

Stereo Audio Channel Layout (2.0, 2 Channels: Front).

fplAudioChannelLayout_2_1 

2.1 Audio Channel Layout (2.1, 3 Channels: Front, LFE).

fplAudioChannelLayout_3_0_Surround 

3.0 Surround Audio Channel Layout (3.0, 3 Channels: Front/F-Center).

fplAudioChannelLayout_4_0_Quad 

4.0 Quad Audio Channel Layout (4.0 Quad, 4 Channels: Front/Back).

fplAudioChannelLayout_4_0_Surround 

4.0 Surround Audio Channel Layout (4.0 Surround, 4 Channels: Front/F-Center/B-Center).

fplAudioChannelLayout_4_1 

4.1 Audio Channel Layout (4.1, 5 Channels: Front/LFE/Back).

fplAudioChannelLayout_5_0_Surround 

5.0 Audio Channel Layout (5.0, 5 Channels: Front/Center/Back).

fplAudioChannelLayout_5_1 

5.1 Audio Channel Layout (5.1, 6 Channels: Front/Center/LFE/Side).

fplAudioChannelLayout_6_1 

6.1 Audio Channel Layout (6.1, 7 Channels: Front/F-Center/LFE/B-Center/Side).

fplAudioChannelLayout_7_1 

7.1 Audio Channel Layout (7.1, 8 Channels: Front/Center/LFE/Back/Side).

fplAudioChannelLayout_First 

First Audio Channel Layout.

fplAudioChannelLayout_Last 

Last Audio Channel Layout.

Definition at line 6141 of file final_platform_layer.h.

◆ fplAudioChannelType

An enumeration of audio channel types.

Enumerator
fplAudioChannelType_None 

No or unknown audio channel.

fplAudioChannelType_FrontLeft 

Front left.

fplAudioChannelType_FrontRight 

Front right.

fplAudioChannelType_FrontCenter 

Front center.

fplAudioChannelType_LowFrequency 

Low Frequency.

fplAudioChannelType_BackLeft 

Back left.

fplAudioChannelType_BackRight 

Back right.

fplAudioChannelType_FrontLeftOfCenter 

Front left of center.

fplAudioChannelType_FrontRightOfCenter 

Front right of center.

fplAudioChannelType_BackCenter 

Back center.

fplAudioChannelType_SideLeft 

Side left.

fplAudioChannelType_SideRight 

Side right.

fplAudioChannelType_TopCenter 

Top center.

fplAudioChannelType_TopFrontLeft 

Top front left.

fplAudioChannelType_TopFrontCenter 

Top front center.

fplAudioChannelType_TopFrontRight 

Top front right.

fplAudioChannelType_TopBackLeft 

Top back left.

fplAudioChannelType_TopBackCenter 

Top back center.

fplAudioChannelType_TopBackRight 

Top back right.

fplAudioChannelType_AUX0 

AUX 0.

fplAudioChannelType_AUX1 

AUX 1.

fplAudioChannelType_AUX2 

AUX 2.

fplAudioChannelType_AUX3 

AUX 3.

fplAudioChannelType_AUX4 

AUX 4.

fplAudioChannelType_AUX5 

AUX 5.

fplAudioChannelType_AUX6 

AUX 6.

fplAudioChannelType_AUX7 

AUX 7.

fplAudioChannelType_AUX8 

AUX 8.

fplAudioChannelType_AUX9 

AUX 9.

fplAudioChannelType_AUX10 

AUX 10.

fplAudioChannelType_AUX11 

AUX 11.

fplAudioChannelType_AUX12 

AUX 12.

fplAudioChannelType_AUX13 

AUX 13.

fplAudioChannelType_AUX14 

AUX 14.

fplAudioChannelType_AUX15 

AUX 15.

fplAudioChannelType_First 

First audio channel type.

fplAudioChannelType_Last 

Last audio channel type.

Definition at line 6178 of file final_platform_layer.h.

◆ fplAudioDefaultFields

An enumeration of audio default fields.

Enumerator
fplAudioDefaultFields_None 

No default fields.

fplAudioDefaultFields_BufferSize 

Buffer size is default.

fplAudioDefaultFields_SampleRate 

Samples per second is default.

fplAudioDefaultFields_Channels 

Number of channels is default.

fplAudioDefaultFields_Periods 

Number of periods is default.

fplAudioDefaultFields_Type 

Audio format is default.

fplAudioDefaultFields_ChannelLayout 

Audio layout is default.

Definition at line 6081 of file final_platform_layer.h.

◆ 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 6053 of file final_platform_layer.h.

◆ fplAudioLatencyType

fplAudioDefaultFields operator overloads for C++.

An enumeration of audio latency types.

Enumerator
fplAudioLatencyType_Conservative 

Conservative latency.

fplAudioLatencyType_Low 

Low latency.

Definition at line 6104 of file final_platform_layer.h.

◆ fplAudioMode

An enumeration of audio modes that combines conservative/latency and exclusive/shared.

Enumerator
fplAudioMode_Shared_Conservative 

Shared Conservative.

fplAudioMode_Exclusive_Conservative 

Exclusive Conservative.

fplAudioMode_Shared_LowLatency 

Shared Low Latency.

fplAudioMode_Exclusive_LowLatency 

Exclusive Low Latency.

Definition at line 6126 of file final_platform_layer.h.

◆ fplAudioShareMode

An enumeration of audio share modes.

Enumerator
fplAudioShareMode_Shared 

Shared mode.

fplAudioShareMode_Exclusive 

Exclusive mode.

Definition at line 6115 of file final_platform_layer.h.

◆ fplImageType

An enumeration of image types.

Enumerator
fplImageType_None 

No image type.

fplImageType_RGBA 

RGBA image type.

Definition at line 6494 of file final_platform_layer.h.

◆ 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_Gamepad 

Enable the gamepad input source. Initializes the input subsystem if not already requested.

fplInitFlags_Keyboard 

Enable the keyboard input source. Initializes the input subsystem if not already requested.

fplInitFlags_Mouse 

Enable the mouse input source. Initializes the input subsystem if not already requested.

fplInitFlags_Input 

Convenience alias enabling keyboard, mouse and gamepad input sources together.

fplInitFlags_All 

All init flags.

Definition at line 5770 of file final_platform_layer.h.

◆ fplInputBackendType

InputSourceType operator overloads for C++.

Identifies a concrete input backend implementation.

Enumerator
fplInputBackendType_None 

Unknown / no backend.

fplInputBackendType_Auto 

Use platform default backends.

fplInputBackendType_XInput 

XInput gamepad backend (Windows).

fplInputBackendType_DInput 

DirectInput8 gamepad backend (Windows).

fplInputBackendType_LinuxJoystick 

/dev/input/jsX legacy joystick backend (Linux).

fplInputBackendType_X11Kbm 

X11 keyboard/mouse backend (Unix/Linux).

fplInputBackendType_Win32 

Win32 keyboard/mouse backend (Windows).

fplInputBackendType_First 

First valid backend type identifier.

fplInputBackendType_Last 

Last valid backend type identifier.

Definition at line 6730 of file final_platform_layer.h.

◆ fplInputSourceType

A bitmask of input source kinds (keyboard, mouse, gamepad).

Enumerator
fplInputSourceType_None 

No input source.

fplInputSourceType_Keyboard 

Keyboard input source.

fplInputSourceType_Mouse 

Mouse input source.

fplInputSourceType_Gamepad 

Gamepad input source.

fplInputSourceType_All 

All input sources.

Definition at line 6711 of file final_platform_layer.h.

◆ fplMemoryAllocationMode

An enumeration of dynamic memory allocation modes.

Enumerator
fplMemoryAllocationMode_Automatic 

Use OS memory allocation.

fplMemoryAllocationMode_Custom 

Use custom memory allocation.

Definition at line 6833 of file final_platform_layer.h.

◆ fplOpenGLCompatibilityFlags

An enumeration of OpenGL compatibility flags.

Enumerator
fplOpenGLCompatibilityFlags_Legacy 

Use legacy context.

fplOpenGLCompatibilityFlags_Core 

Use core profile.

fplOpenGLCompatibilityFlags_Compatibility 

Use compatibility profile.

fplOpenGLCompatibilityFlags_Forward 

Remove features marked as deprecated.

Definition at line 5876 of file final_platform_layer.h.

◆ fplPlatformResultType

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 5819 of file final_platform_layer.h.

◆ fplPlatformType

InitFlags operator overloads for C++.

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 5799 of file final_platform_layer.h.

◆ fplVideoBackendType

An enumeration of video backend types.

Enumerator
fplVideoBackendType_None 

No video backend.

fplVideoBackendType_Software 

Software video backend.

fplVideoBackendType_OpenGL 

OpenGL video backend.

fplVideoBackendType_Vulkan 

Vulkan video backend.

fplVideoBackendType_First 

First video backend.

fplVideoBackendType_Last 

Last video backend.

Definition at line 5855 of file final_platform_layer.h.

◆ fplVulkanValidationLayerMode

An enumeration of Vulkan validation layer modes.

Enumerator
fplVulkanValidationLayerMode_Disabled 

Do not use the validation.

fplVulkanValidationLayerMode_Optional 

Enable validations when it's possible.

fplVulkanValidationLayerMode_Required 

Enable validations and stop when it's not supported.

Definition at line 5921 of file final_platform_layer.h.

◆ fplVulkanValidationSeverity

An enumeration of Vulkan validation layer logging severity.

Enumerator
fplVulkanValidationSeverity_Off 

Log nothing.

fplVulkanValidationSeverity_Error 

Log error only.

fplVulkanValidationSeverity_Warning 

Log warning and error.

fplVulkanValidationSeverity_Info 

Log warning, error, and info.

fplVulkanValidationSeverity_Verbose 

Log warning, error, info, and verbose.

fplVulkanValidationSeverity_All 

Log everything.

Definition at line 5934 of file final_platform_layer.h.

Function Documentation

◆ fplCreateColorRGBA()

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.

Parameters
[in]rThe red component in range of 0-255.
[in]gThe green component in range of 0-255.
[in]bThe blue component in range of 0-255.
[in]aThe alpha component in range of 0-255.
Returns
The resulting fplColor32.

◆ fplGetAudioChannelTypeName()

fpl_common_api const char * fplGetAudioChannelTypeName ( const fplAudioChannelType type)

Audio speaker layout operator overloads for C++.

Gets the name of the specified audio channel type.

Parameters
[in]typeAudio channel type enumeration value fplAudioChannelType.
Returns
Returns the name of the audio channel type.

◆ fplGetCurrentSettings()

fpl_common_api const fplSettings * fplGetCurrentSettings ( void )

Gets the current settings.

Returns
Returns a reference to the source settings structure fplSettings.
See also
Tips

◆ fplInputBackendMaskDisable()

fpl_common_api void fplInputBackendMaskDisable ( fplInputBackendMask * mask,
const fplInputBackendType type )

Clears the bit for the given backend type in the mask.

Parameters
[in,out]maskReference to the mask to modify.
[in]typeThe backend type to disable.

◆ fplInputBackendMaskEnable()

fpl_common_api void fplInputBackendMaskEnable ( fplInputBackendMask * mask,
const fplInputBackendType type )

Sets the bit for the given backend type in the mask.

Parameters
[in,out]maskReference to the mask to modify.
[in]typeThe backend type to enable.

◆ fplInputBackendMaskIsEnabled()

fpl_common_api bool fplInputBackendMaskIsEnabled ( const fplInputBackendMask * mask,
const fplInputBackendType type )

Returns true when the given backend type bit is set in the mask.

Parameters
[in]maskReference to the mask to query.
[in]typeThe backend type to test.

◆ fplMakeDefaultSettings()

fpl_common_api fplSettings fplMakeDefaultSettings ( void )

Creates a full settings structure containing default values.

Returns
Returns a default settings structure fplSettings.
See also
Tips

◆ fplPlatformGetResultName()

fpl_common_api const char * fplPlatformGetResultName ( const fplPlatformResultType type)

Gets the string representation of a platform result type.

Parameters
[in]typeThe platform result type enumeration value fplPlatformResultType.
Returns
Returns the string representation of a platform result type.
See also
Result/Error checking

◆ fplSetDefaultAudioSettings()

fpl_common_api void fplSetDefaultAudioSettings ( fplAudioSettings * audio)

Resets the given audio settings to default settings (S16 PCM, 48 kHz, 2 Channels).

Parameters
[out]audioReference to the target audio settings structure fplAudioSettings.
Note
This will not change any audio settings! To change the actual settings you have to pass the entire fplSettings container as an argument in fplPlatformInit().
See also
Notes

◆ fplSetDefaultConsoleSettings()

fpl_common_api void fplSetDefaultConsoleSettings ( fplConsoleSettings * console)

Resets the given console settings container to default settings.

Parameters
[out]consoleReference to the target structure fplConsoleSettings.
Note
This will not change any console settings! To change the actual settings you have to pass the entire fplSettings container as an argument in fplPlatformInit().

◆ fplSetDefaultGamepadSettings()

fpl_common_api void fplSetDefaultGamepadSettings ( fplGamepadSettings * gamepadSettings)

Resets the given gamepad settings container to default values.

Parameters
[out]gamepadSettingsReference to the target structure fplGamepadSettings.
Note
This will not change any input settings! To change the actual settings you have to pass the entire fplSettings container as an argument in fplPlatformInit().

◆ fplSetDefaultInputSettings()

fpl_common_api void fplSetDefaultInputSettings ( fplInputSettings * input)

Resets the given input settings container to default values.

Parameters
[out]inputReference to the target structure fplInputSettings.
Note
This will not change any input settings! To change the actual settings you have to pass the entire fplSettings container as an argument in fplPlatformInit().
See also
Input configuration

◆ fplSetDefaultSettings()

fpl_common_api void fplSetDefaultSettings ( fplSettings * settings)

Resets the given settings container to default values for window, video, audio, etc.

Parameters
[out]settingsReference to the target structure fplSettings.
Note
This will not change the active settings! To change the actual settings you have to pass this settings container as an argument in fplPlatformInit().
See also
Initialization with custom settings

◆ fplSetDefaultVideoSettings()

fpl_common_api void fplSetDefaultVideoSettings ( fplVideoSettings * video)

Resets the given video settings to default values.

Parameters
[out]videoReference to the target structure fplVideoSettings.
Note
This will not change any video settings! To change the actual settings you have to pass the entire fplSettings container as an argument in fplPlatformInit().
See also
Notes

◆ fplSetDefaultWindowSettings()

fpl_common_api void fplSetDefaultWindowSettings ( fplWindowSettings * window)

Resets the given window settings container to default settings.

Parameters
[out]windowReference to the target structure fplWindowSettings.
Note
This will not change any window settings! To change the actual settings you have to pass the entire fplSettings container as an argument in fplPlatformInit().
See also
Notes