Update SDL to 3.4.16
This commit is contained in:
Vendored
+1
-1
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main include header for the SDL library, version 3.4.4
|
||||
* Main include header for the SDL library, version 3.4.16
|
||||
*
|
||||
* It is almost always best to include just this one header instead of
|
||||
* picking out individual headers included here. There are exceptions to
|
||||
|
||||
+15
-7
@@ -126,10 +126,13 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner
|
||||
|
||||
#elif defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER >= 1310)
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1310
|
||||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif defined(__MINGW32__)
|
||||
#include <intrin.h>
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif defined(_MSC_VER) && defined(_M_IX86)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif SDL_HAS_BUILTIN(__builtin_debugtrap)
|
||||
@@ -229,11 +232,16 @@ extern "C" {
|
||||
#define SDL_LINE __LINE__
|
||||
|
||||
/*
|
||||
sizeof (x) makes the compiler still parse the expression even without
|
||||
assertions enabled, so the code is always checked at compile time, but
|
||||
sizeof ((x) ? 1 : 0) makes the compiler still parse the expression even
|
||||
without assertions enabled, so the code is always checked at compile time, but
|
||||
doesn't actually generate code for it, so there are no side effects or
|
||||
expensive checks at run time, just the constant size of what x WOULD be,
|
||||
expensive checks at run time, just the constant size of what int would be,
|
||||
which presumably gets optimized out as unused.
|
||||
|
||||
(The `? 1 : 0` is so this always dithers down to `sizeof (int)`...otherwise
|
||||
you'll have problems when bitfields are used as the condition, since the
|
||||
compiler will error out on the sizeof.)
|
||||
|
||||
This also solves the problem of...
|
||||
|
||||
int somevalue = blah();
|
||||
@@ -265,7 +273,7 @@ disable assertions.
|
||||
*/
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||
|
||||
#elif defined(_MSC_VER) /* Avoid /W4 warnings. */
|
||||
#elif defined(_MSC_VER) && !defined(__clang__) /* Avoid /W4 warnings. */
|
||||
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||
this condition isn't constant. And looks like an owl's face! */
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||
@@ -281,14 +289,14 @@ disable assertions.
|
||||
*
|
||||
* The code does nothing, but wraps `condition` in a sizeof operator, which
|
||||
* generates no code and has no side effects, but avoid compiler warnings
|
||||
* about unused variables.
|
||||
* about unused variables, and still checks syntax even when disabled.
|
||||
*
|
||||
* \param condition the condition to assert (but not actually run here).
|
||||
*
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_disabled_assert(condition) \
|
||||
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
do { (void) sizeof ((condition) ? 1 : 0); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
|
||||
/**
|
||||
* Possible outcomes from a triggered assertion.
|
||||
|
||||
+13
-3
@@ -156,6 +156,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockSpinlock(SDL_SpinLock *lock);
|
||||
*/
|
||||
#define SDL_CompilerBarrier() DoCompilerSpecificReadWriteBarrier()
|
||||
|
||||
#elif SDL_HAS_BUILTIN(__atomic_signal_fence) || (defined(__GNUC__) && (__GNUC__ >= 5))
|
||||
#define SDL_CompilerBarrier() __atomic_signal_fence(__ATOMIC_SEQ_CST)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
||||
void _ReadWriteBarrier(void);
|
||||
#pragma intrinsic(_ReadWriteBarrier)
|
||||
@@ -167,8 +169,9 @@ void _ReadWriteBarrier(void);
|
||||
extern __inline void SDL_CompilerBarrier(void);
|
||||
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||
#else
|
||||
/* We don't unlock here to avoid possible infinite recursion */
|
||||
#define SDL_CompilerBarrier() \
|
||||
{ SDL_SpinLock _tmp = 0; SDL_LockSpinlock(&_tmp); SDL_UnlockSpinlock(&_tmp); }
|
||||
{ SDL_SpinLock _tmp = 0; SDL_LockSpinlock(&_tmp); }
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -275,12 +278,19 @@ extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
*/
|
||||
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||
|
||||
#elif SDL_HAS_BUILTIN(__atomic_thread_fence) || (defined(__GNUC__) && (__GNUC__ >= 5))
|
||||
#define SDL_MemoryBarrierRelease() __atomic_thread_fence(__ATOMIC_RELEASE)
|
||||
#define SDL_MemoryBarrierAcquire() __atomic_thread_fence(__ATOMIC_ACQUIRE)
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ishld" : : : "memory")
|
||||
#elif defined(_MSC_VER) && (defined(_M_ARM64) || defined(_M_ARM64EC))
|
||||
#include <arm64intr.h>
|
||||
#define SDL_MemoryBarrierRelease() __dmb(_ARM64_BARRIER_ISH)
|
||||
#define SDL_MemoryBarrierAcquire() __dmb(_ARM64_BARRIER_ISHLD)
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if 0 /* defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_ANDROID) */
|
||||
/* Information from:
|
||||
@@ -345,7 +355,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
*/
|
||||
#define SDL_CPUPauseInstruction() DoACPUPauseInACompilerAndArchitectureSpecificWay
|
||||
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) && !defined(__arm64ec__)
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
|
||||
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
|
||||
|
||||
+16
-3
@@ -434,7 +434,8 @@ typedef struct SDL_AudioSpec
|
||||
* - It can handle incoming data in any variable size.
|
||||
* - It can handle input/output format changes on the fly.
|
||||
* - It can remap audio channels between inputs and outputs.
|
||||
* - You push data as you have it, and pull it when you need it
|
||||
* - You push data as you have it, and pull it when you need it; the
|
||||
* stream will buffer data as needed.
|
||||
* - It can also function as a basic audio data queue even if you just have
|
||||
* sound that needs to pass from one place to another.
|
||||
* - You can hook callbacks up to them when more data is added or requested,
|
||||
@@ -1054,8 +1055,15 @@ extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_Audio
|
||||
/**
|
||||
* Create a new audio stream.
|
||||
*
|
||||
* \param src_spec the format details of the input audio.
|
||||
* \param dst_spec the format details of the output audio.
|
||||
* Note that `src_spec` or `dst_spec` may be NULL, but any attempts to
|
||||
* put or get data from an audio stream will fail until it has valid
|
||||
* specs assigned to both ends of the stream. Specs can be assigned later
|
||||
* through SDL_SetAudioStreamFormat(), or binding the stream to an audio
|
||||
* device (which will set the format of only the input or output,
|
||||
* depending on what kind of device the stream was bound to).
|
||||
*
|
||||
* \param src_spec the format details of the input audio. May be NULL.
|
||||
* \param dst_spec the format details of the output audio. May be NULL.
|
||||
* \returns a new audio stream on success or NULL on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
@@ -1137,6 +1145,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *strea
|
||||
* be ignored, but this will not report an error. The other side's format can
|
||||
* be changed.
|
||||
*
|
||||
* `src_spec` and `dst_spec` may each be NULL; a NULL spec signals not to
|
||||
* change the current format for that side of the stream.
|
||||
*
|
||||
* \param stream the stream the format is being changed.
|
||||
* \param src_spec the new format of the audio input; if NULL, it is not
|
||||
* changed.
|
||||
@@ -1843,6 +1854,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream);
|
||||
* appropriate, but the system goes on with the data currently available to it
|
||||
* if this callback does nothing.
|
||||
*
|
||||
* Do not call SDL_DestroyAudioStream() on `stream` during this callback.
|
||||
*
|
||||
* \param stream the SDL audio stream associated with this callback.
|
||||
* \param additional_amount the amount of data, in bytes, that is needed right
|
||||
* now.
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ typedef enum SDL_CameraPermissionState
|
||||
{
|
||||
SDL_CAMERA_PERMISSION_STATE_DENIED = -1,
|
||||
SDL_CAMERA_PERMISSION_STATE_PENDING,
|
||||
SDL_CAMERA_PERMISSION_STATE_APPROVED,
|
||||
SDL_CAMERA_PERMISSION_STATE_APPROVED
|
||||
} SDL_CameraPermissionState;
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ typedef void (SDLCALL *SDL_ClipboardCleanupCallback)(void *userdata);
|
||||
* \sa SDL_GetClipboardData
|
||||
* \sa SDL_HasClipboardData
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, void *userdata, const char **mime_types, size_t num_mime_types);
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, void *userdata, const char *const *mime_types, size_t num_mime_types);
|
||||
|
||||
/**
|
||||
* Clear the clipboard data.
|
||||
|
||||
+2
-1
@@ -456,7 +456,7 @@ typedef struct SDL_MouseMotionEvent
|
||||
Uint32 reserved;
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID; /**< The window with mouse focus, if any */
|
||||
SDL_MouseID which; /**< The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0 */
|
||||
SDL_MouseID which; /**< The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, SDL_PEN_MOUSEID for pen events, or 0 */
|
||||
SDL_MouseButtonFlags state; /**< The current button state */
|
||||
float x; /**< X coordinate, relative to window */
|
||||
float y; /**< Y coordinate, relative to window */
|
||||
@@ -830,6 +830,7 @@ typedef struct SDL_PenProximityEvent
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID; /**< The window with pen focus, if any */
|
||||
SDL_PenID which; /**< The pen instance id */
|
||||
SDL_PenInputFlags pen_state; /**< Complete pen input state at time of event (added in 3.4.16). */
|
||||
} SDL_PenProximityEvent;
|
||||
|
||||
/**
|
||||
|
||||
+5
-5
@@ -167,11 +167,11 @@ typedef enum SDL_GamepadButton
|
||||
SDL_GAMEPAD_BUTTON_DPAD_DOWN,
|
||||
SDL_GAMEPAD_BUTTON_DPAD_LEFT,
|
||||
SDL_GAMEPAD_BUTTON_DPAD_RIGHT,
|
||||
SDL_GAMEPAD_BUTTON_MISC1, /**< Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button, Google Stadia capture button) */
|
||||
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1, /**< Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1, DualSense Edge RB button, Right Joy-Con SR button) */
|
||||
SDL_GAMEPAD_BUTTON_LEFT_PADDLE1, /**< Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3, DualSense Edge LB button, Left Joy-Con SL button) */
|
||||
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2, /**< Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2, DualSense Edge right Fn button, Right Joy-Con SL button) */
|
||||
SDL_GAMEPAD_BUTTON_LEFT_PADDLE2, /**< Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4, DualSense Edge left Fn button, Left Joy-Con SR button) */
|
||||
SDL_GAMEPAD_BUTTON_MISC1, /**< Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Steam Controller QAM button, Amazon Luna microphone button, Google Stadia capture button) */
|
||||
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1, /**< Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1, DualSense Edge RB button, Right Joy-Con SR button, Steam Controller R4 button) */
|
||||
SDL_GAMEPAD_BUTTON_LEFT_PADDLE1, /**< Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3, DualSense Edge LB button, Left Joy-Con SL button, Steam Controller L4 button) */
|
||||
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2, /**< Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2, DualSense Edge right Fn button, Right Joy-Con SL button, Steam Controller R5 button) */
|
||||
SDL_GAMEPAD_BUTTON_LEFT_PADDLE2, /**< Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4, DualSense Edge left Fn button, Left Joy-Con SR button, Steam Controller L5 button) */
|
||||
SDL_GAMEPAD_BUTTON_TOUCHPAD, /**< PS4/PS5 touchpad button */
|
||||
SDL_GAMEPAD_BUTTON_MISC2, /**< Additional button */
|
||||
SDL_GAMEPAD_BUTTON_MISC3, /**< Additional button (e.g. Nintendo GameCube left trigger click) */
|
||||
|
||||
Vendored
+17
-4
@@ -884,8 +884,8 @@ typedef enum SDL_GPUTextureFormat
|
||||
/**
|
||||
* Specifies how a texture is intended to be used by the client.
|
||||
*
|
||||
* A texture must have at least one usage flag. Note that some usage flag
|
||||
* combinations are invalid.
|
||||
* A texture must have at least one usage flag.
|
||||
* Note that combining SAMPLER with STORAGE_READ flags is invalid.
|
||||
*
|
||||
* With regards to compute storage usage, READ | WRITE means that you can have
|
||||
* shader A that only writes into the texture and shader B that only reads
|
||||
@@ -967,8 +967,10 @@ typedef enum SDL_GPUCubeMapFace
|
||||
/**
|
||||
* Specifies how a buffer is intended to be used by the client.
|
||||
*
|
||||
* A buffer must have at least one usage flag. Note that some usage flag
|
||||
* combinations are invalid.
|
||||
* A buffer must have at least one usage flag.
|
||||
*
|
||||
* If a buffer has multiple read usages, this may lead to a performance penalty
|
||||
* due to more conservative memory barriers, but it also may not necessarily affect the performance.
|
||||
*
|
||||
* Unlike textures, READ | WRITE can be used for simultaneous read-write
|
||||
* usage. The same data synchronization concerns as textures apply.
|
||||
@@ -1409,6 +1411,7 @@ typedef struct SDL_GPUViewport
|
||||
*
|
||||
* \sa SDL_UploadToGPUTexture
|
||||
* \sa SDL_DownloadFromGPUTexture
|
||||
* \sa SDL_GPUTransferBuffer
|
||||
*/
|
||||
typedef struct SDL_GPUTextureTransferInfo
|
||||
{
|
||||
@@ -1427,6 +1430,7 @@ typedef struct SDL_GPUTextureTransferInfo
|
||||
*
|
||||
* \sa SDL_UploadToGPUBuffer
|
||||
* \sa SDL_DownloadFromGPUBuffer
|
||||
* \sa SDL_GPUTransferBuffer
|
||||
*/
|
||||
typedef struct SDL_GPUTransferBufferLocation
|
||||
{
|
||||
@@ -1442,6 +1446,7 @@ typedef struct SDL_GPUTransferBufferLocation
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_CopyGPUTextureToTexture
|
||||
* \sa SDL_GPUTexture
|
||||
*/
|
||||
typedef struct SDL_GPUTextureLocation
|
||||
{
|
||||
@@ -1463,6 +1468,7 @@ typedef struct SDL_GPUTextureLocation
|
||||
* \sa SDL_UploadToGPUTexture
|
||||
* \sa SDL_DownloadFromGPUTexture
|
||||
* \sa SDL_CreateGPUTexture
|
||||
* \sa SDL_GPUTexture
|
||||
*/
|
||||
typedef struct SDL_GPUTextureRegion
|
||||
{
|
||||
@@ -1483,6 +1489,7 @@ typedef struct SDL_GPUTextureRegion
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BlitGPUTexture
|
||||
* \sa SDL_GPUTexture
|
||||
*/
|
||||
typedef struct SDL_GPUBlitRegion
|
||||
{
|
||||
@@ -1707,6 +1714,7 @@ typedef struct SDL_GPUStencilOpState
|
||||
*
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_SetGPUBlendConstants
|
||||
* \sa SDL_GPUColorTargetDescription
|
||||
* \sa SDL_GPUBlendFactor
|
||||
* \sa SDL_GPUBlendOp
|
||||
@@ -2098,6 +2106,11 @@ typedef struct SDL_GPUDepthStencilTargetInfo
|
||||
* \since This struct is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_BlitGPUTexture
|
||||
* \sa SDL_GPUBlitRegion
|
||||
* \sa SDL_GPULoadOp
|
||||
* \sa SDL_FColor
|
||||
* \sa SDL_FlipMode
|
||||
* \sa SDL_GPUFilter
|
||||
*/
|
||||
typedef struct SDL_GPUBlitInfo {
|
||||
SDL_GPUBlitRegion source; /**< The source region for the blit. */
|
||||
|
||||
+74
-2
@@ -117,6 +117,33 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_ANDROID_LOW_LATENCY_AUDIO "SDL_ANDROID_LOW_LATENCY_AUDIO"
|
||||
|
||||
/**
|
||||
* A variable to control Android's AAudio input preset.
|
||||
*
|
||||
* This hint only applies to SDL's "aaudio" backend on Android 9+ devices.
|
||||
*
|
||||
* Some devices choose the wrong microphone by default (between the one meant
|
||||
* to be spoken in when the phone is held to the user's ear for a phone call,
|
||||
* or an external microphone that's meant to be used when recording video),
|
||||
* or have DSP effects applied to the recorded audio, and changing the input
|
||||
* preset can help control this.
|
||||
*
|
||||
* This can be any number that maps to an `AAUDIO_INPUT_PRESET_*` enum from
|
||||
* the Android NDK headers. The most reasonable choices are 5 ("camcorder",
|
||||
* for external microphones) and 7 ("voice communication", for speaking
|
||||
* directly into the device like a mobile phone). 6 ("voice recognition")
|
||||
* might also be a useful choice.
|
||||
*
|
||||
* If unset (the default), SDL will not specify an input preset at all, which
|
||||
* lets the system choose. This is usually the correct thing to do unless
|
||||
* your app is having problems.
|
||||
*
|
||||
* This hint should be set before a recording audio device is opened.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.16.
|
||||
*/
|
||||
#define SDL_HINT_ANDROID_AAUDIO_INPUT_PRESET "SDL_ANDROID_AAUDIO_INPUT_PRESET"
|
||||
|
||||
/**
|
||||
* A variable to control whether we trap the Android back button to handle it
|
||||
* manually.
|
||||
@@ -809,6 +836,25 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
|
||||
|
||||
/**
|
||||
* A variable that controls whether the Steam on-screen keyboard should be
|
||||
* shown when text input is active.
|
||||
*
|
||||
* Steam will set this hint via environment variable for games launched in Big
|
||||
* Picture mode. To override this you should call SDL_SetHintWithPriority()
|
||||
* with priority `SDL_HINT_OVERRIDE`.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": Do not show the Steam on-screen keyboard.
|
||||
* - "1": Show the Steam on-screen keyboard.
|
||||
*
|
||||
* This hint should be set before SDL is initialized.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.12.
|
||||
*/
|
||||
#define SDL_HINT_ENABLE_STEAM_SCREEN_KEYBOARD "SDL_ENABLE_STEAM_SCREEN_KEYBOARD"
|
||||
|
||||
/**
|
||||
* A variable containing a list of evdev devices to use if udev is not
|
||||
* available.
|
||||
@@ -2150,7 +2196,8 @@ extern "C" {
|
||||
* - "0": Assume this is a generic controller.
|
||||
* - "1": Reset the controller to get metadata.
|
||||
*
|
||||
* By default the controller is not reset.
|
||||
* By default the controller is reset. This is so we can properly detect
|
||||
* the controller type.
|
||||
*
|
||||
* This hint should be set before initializing joysticks and gamepads.
|
||||
*
|
||||
@@ -2772,7 +2819,7 @@ extern "C" {
|
||||
* (default)
|
||||
* - "1": Cursors will automatically match the display content scale (e.g. a
|
||||
* 2x sized cursor will be used when the window is on a monitor with 200%
|
||||
* scale). This is currently implemented on Windows and Wayland.
|
||||
* scale). This is currently implemented on Windows.
|
||||
*
|
||||
* This hint needs to be set before creating cursors.
|
||||
*
|
||||
@@ -4044,6 +4091,31 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the X Synchronization Extension is enabled.
|
||||
*
|
||||
* If set, this can result in smoother window resizing when rendering using
|
||||
* OpenGL, however, there are some conditions:
|
||||
*
|
||||
* - It is only activated on windows created with the `SDL_WINDOW_OPENGL` flag
|
||||
* (windows using an SDL OpenGL renderer have this automatically set).
|
||||
* - When activated, presentation must be done with `SDL_GL_SwapWindow()`
|
||||
* (`SDL_RenderPresent()` calls this internally for OpenGL renderers as well).
|
||||
*
|
||||
* Enabling this and presenting via an external mechanism will result in sync
|
||||
* requests not being acked, and hangs and other odd window behavior may result.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": The X Synchronization Extension is disabled. (default)
|
||||
* - "1": The X Synchronization Extension is enabled.
|
||||
*
|
||||
* This hint should be set before creating a window.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.10.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT "SDL_VIDEO_X11_ENABLE_XSYNC_EXT"
|
||||
|
||||
/**
|
||||
* A variable controlling whether SDL should call XSelectInput() to enable
|
||||
* input events on X11 windows wrapped by SDL windows.
|
||||
|
||||
+20
-20
@@ -9807,15 +9807,15 @@ typedef void (APIENTRYP PFNGLUPLOADGPUMASKNVXPROC) (GLbitfield mask);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTVIEWPORTARRAYVNVXPROC) (GLuint gpu, GLuint first, GLsizei count, const GLfloat *v);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTVIEWPORTPOSITIONWSCALENVXPROC) (GLuint gpu, GLuint index, GLfloat xcoeff, GLfloat ycoeff);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTSCISSORARRAYVNVXPROC) (GLuint gpu, GLuint first, GLsizei count, const GLint *v);
|
||||
typedef GLuint (APIENTRYP PFNGLASYNCCOPYBUFFERSUBDATANVXPROC) (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *fenceValueArray, GLuint readGPU, GLbitfield writeGPUMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
|
||||
typedef GLuint (APIENTRYP PFNGLASYNCCOPYIMAGESUBDATANVXPROC) (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *waitValueArray, GLuint srcGPU, GLbitfield dstGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
|
||||
typedef GLuint (APIENTRYP PFNGLASYNCCOPYBUFFERSUBDATANVXPROC) (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *fenceValueArray, GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
|
||||
typedef GLuint (APIENTRYP PFNGLASYNCCOPYIMAGESUBDATANVXPROC) (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *waitValueArray, GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glUploadGPUMaskNVX (GLbitfield mask);
|
||||
GLAPI void APIENTRY glUploadGpuMaskNVX (GLbitfield mask);
|
||||
GLAPI void APIENTRY glMulticastViewportArrayvNVX (GLuint gpu, GLuint first, GLsizei count, const GLfloat *v);
|
||||
GLAPI void APIENTRY glMulticastViewportPositionWScaleNVX (GLuint gpu, GLuint index, GLfloat xcoeff, GLfloat ycoeff);
|
||||
GLAPI void APIENTRY glMulticastScissorArrayvNVX (GLuint gpu, GLuint first, GLsizei count, const GLint *v);
|
||||
GLAPI GLuint APIENTRY glAsyncCopyBufferSubDataNVX (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *fenceValueArray, GLuint readGPU, GLbitfield writeGPUMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
|
||||
GLAPI GLuint APIENTRY glAsyncCopyImageSubDataNVX (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *waitValueArray, GLuint srcGPU, GLbitfield dstGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
|
||||
GLAPI GLuint APIENTRY glAsyncCopyBufferSubDataNVX (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *fenceValueArray, GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
|
||||
GLAPI GLuint APIENTRY glAsyncCopyImageSubDataNVX (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *waitValueArray, GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
|
||||
#endif
|
||||
#endif /* GL_NVX_gpu_multicast2 */
|
||||
|
||||
@@ -9824,11 +9824,11 @@ GLAPI GLuint APIENTRY glAsyncCopyImageSubDataNVX (GLsizei waitSemaphoreCount, co
|
||||
#define GL_LGPU_SEPARATE_STORAGE_BIT_NVX 0x0800
|
||||
#define GL_MAX_LGPU_GPUS_NVX 0x92BA
|
||||
typedef void (APIENTRYP PFNGLLGPUNAMEDBUFFERSUBDATANVXPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
typedef void (APIENTRYP PFNGLLGPUCOPYIMAGESUBDATANVXPROC) (GLuint sourceGPU, GLbitfield destinationGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (APIENTRYP PFNGLLGPUCOPYIMAGESUBDATANVXPROC) (GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (APIENTRYP PFNGLLGPUINTERLOCKNVXPROC) (void);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glLGPUNamedBufferSubDataNVX (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GLAPI void APIENTRY glLGPUCopyImageSubDataNVX (GLuint sourceGPU, GLbitfield destinationGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
GLAPI void APIENTRY glLGPUCopyImageSubDataNVX (GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
GLAPI void APIENTRY glLGPUInterlockNVX (void);
|
||||
#endif
|
||||
#endif /* GL_NVX_linked_gpu_multicast */
|
||||
@@ -9836,13 +9836,13 @@ GLAPI void APIENTRY glLGPUInterlockNVX (void);
|
||||
#ifndef GL_NVX_progress_fence
|
||||
#define GL_NVX_progress_fence 1
|
||||
typedef GLuint (APIENTRYP PFNGLCREATEPROGRESSFENCENVXPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLSIGNALSEMAPHOREUI64NVXPROC) (GLuint signalGPU, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
typedef void (APIENTRYP PFNGLWAITSEMAPHOREUI64NVXPROC) (GLuint waitGPU, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
typedef void (APIENTRYP PFNGLSIGNALSEMAPHOREUI64NVXPROC) (GLuint signalGpu, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
typedef void (APIENTRYP PFNGLWAITSEMAPHOREUI64NVXPROC) (GLuint waitGpu, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
typedef void (APIENTRYP PFNGLCLIENTWAITSEMAPHOREUI64NVXPROC) (GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI GLuint APIENTRY glCreateProgressFenceNVX (void);
|
||||
GLAPI void APIENTRY glSignalSemaphoreui64NVX (GLuint signalGPU, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
GLAPI void APIENTRY glWaitSemaphoreui64NVX (GLuint waitGPU, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
GLAPI void APIENTRY glSignalSemaphoreui64NVX (GLuint signalGpu, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
GLAPI void APIENTRY glWaitSemaphoreui64NVX (GLuint waitGpu, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
GLAPI void APIENTRY glClientWaitSemaphoreui64NVX (GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
|
||||
#endif
|
||||
#endif /* GL_NVX_progress_fence */
|
||||
@@ -10433,25 +10433,25 @@ GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachmen
|
||||
#define GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9549
|
||||
typedef void (APIENTRYP PFNGLRENDERGPUMASKNVPROC) (GLbitfield mask);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTBUFFERSUBDATANVPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTCOPYBUFFERSUBDATANVPROC) (GLuint readGPU, GLbitfield writeGPUMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTCOPYIMAGESUBDATANVPROC) (GLuint srcGPU, GLbitfield dstGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTBLITFRAMEBUFFERNVPROC) (GLuint srcGPU, GLuint dstGPU, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTCOPYBUFFERSUBDATANVPROC) (GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTCOPYIMAGESUBDATANVPROC) (GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTBLITFRAMEBUFFERNVPROC) (GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTBARRIERNVPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTWAITSYNCNVPROC) (GLuint signalGPU, GLbitfield waitGPUMask);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTWAITSYNCNVPROC) (GLuint signalGpu, GLbitfield waitGpuMask);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint64 *params);
|
||||
typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glRenderGPUMaskNV (GLbitfield mask);
|
||||
GLAPI void APIENTRY glRenderGpuMaskNV (GLbitfield mask);
|
||||
GLAPI void APIENTRY glMulticastBufferSubDataNV (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GLAPI void APIENTRY glMulticastCopyBufferSubDataNV (GLuint readGPU, GLbitfield writeGPUMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
GLAPI void APIENTRY glMulticastCopyImageSubDataNV (GLuint srcGPU, GLbitfield dstGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
GLAPI void APIENTRY glMulticastBlitFramebufferNV (GLuint srcGPU, GLuint dstGPU, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
GLAPI void APIENTRY glMulticastCopyBufferSubDataNV (GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
GLAPI void APIENTRY glMulticastCopyImageSubDataNV (GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
GLAPI void APIENTRY glMulticastBlitFramebufferNV (GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
GLAPI void APIENTRY glMulticastFramebufferSampleLocationsfvNV (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
|
||||
GLAPI void APIENTRY glMulticastBarrierNV (void);
|
||||
GLAPI void APIENTRY glMulticastWaitSyncNV (GLuint signalGPU, GLbitfield waitGPUMask);
|
||||
GLAPI void APIENTRY glMulticastWaitSyncNV (GLuint signalGpu, GLbitfield waitGpuMask);
|
||||
GLAPI void APIENTRY glMulticastGetQueryObjectivNV (GLuint gpu, GLuint id, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glMulticastGetQueryObjectuivNV (GLuint gpu, GLuint id, GLenum pname, GLuint *params);
|
||||
GLAPI void APIENTRY glMulticastGetQueryObjecti64vNV (GLuint gpu, GLuint id, GLenum pname, GLint64 *params);
|
||||
|
||||
-237
@@ -1,237 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryOpenXR
|
||||
*
|
||||
* Functions for creating OpenXR handles for SDL_gpu contexts.
|
||||
*
|
||||
* For the most part, OpenXR operates independent of SDL, but
|
||||
* the graphics initialization depends on direct support from SDL_gpu.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SDL_openxr_h_
|
||||
#define SDL_openxr_h_
|
||||
|
||||
#include <SDL3/SDL_stdinc.h>
|
||||
#include <SDL3/SDL_gpu.h>
|
||||
|
||||
#include <SDL3/SDL_begin_code.h>
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(OPENXR_H_)
|
||||
#define NO_SDL_OPENXR_TYPEDEFS 1
|
||||
#endif /* OPENXR_H_ */
|
||||
|
||||
#if !defined(NO_SDL_OPENXR_TYPEDEFS)
|
||||
#define XR_NULL_HANDLE 0
|
||||
|
||||
#if !defined(XR_DEFINE_HANDLE)
|
||||
#define XR_DEFINE_HANDLE(object) typedef Uint64 object;
|
||||
#endif /* XR_DEFINE_HANDLE */
|
||||
|
||||
typedef enum XrStructureType {
|
||||
XR_TYPE_SESSION_CREATE_INFO = 8,
|
||||
XR_TYPE_SWAPCHAIN_CREATE_INFO = 9,
|
||||
} XrStructureType;
|
||||
|
||||
XR_DEFINE_HANDLE(XrInstance)
|
||||
XR_DEFINE_HANDLE(XrSystemId)
|
||||
XR_DEFINE_HANDLE(XrSession)
|
||||
XR_DEFINE_HANDLE(XrSwapchain)
|
||||
|
||||
typedef struct {
|
||||
XrStructureType type;
|
||||
const void* next;
|
||||
} XrSessionCreateInfo;
|
||||
typedef struct {
|
||||
XrStructureType type;
|
||||
const void* next;
|
||||
} XrSwapchainCreateInfo;
|
||||
|
||||
typedef enum XrResult {
|
||||
XR_ERROR_FUNCTION_UNSUPPORTED = -7,
|
||||
XR_ERROR_HANDLE_INVALID = -12,
|
||||
} XrResult;
|
||||
|
||||
#define PFN_xrGetInstanceProcAddr SDL_FunctionPointer
|
||||
#endif /* NO_SDL_OPENXR_TYPEDEFS */
|
||||
|
||||
/**
|
||||
* Creates an OpenXR session.
|
||||
*
|
||||
* The OpenXR system ID is pulled from the passed GPU context.
|
||||
*
|
||||
* \param device a GPU context.
|
||||
* \param createinfo the create info for the OpenXR session, sans the system
|
||||
* ID.
|
||||
* \param session a pointer filled in with an OpenXR session created for the
|
||||
* given device.
|
||||
* \returns the result of the call.
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
*
|
||||
* \sa SDL_CreateGPUDeviceWithProperties
|
||||
*/
|
||||
extern SDL_DECLSPEC XrResult SDLCALL SDL_CreateGPUXRSession(SDL_GPUDevice *device, const XrSessionCreateInfo *createinfo, XrSession *session);
|
||||
|
||||
/**
|
||||
* Queries the GPU device for supported XR swapchain image formats.
|
||||
*
|
||||
* The returned pointer should be allocated with SDL_malloc() and will be
|
||||
* passed to SDL_free().
|
||||
*
|
||||
* \param device a GPU context.
|
||||
* \param session an OpenXR session created for the given device.
|
||||
* \param num_formats a pointer filled with the number of supported XR
|
||||
* swapchain formats.
|
||||
* \returns a 0 terminated array of supported formats or NULL on failure; call
|
||||
* SDL_GetError() for more information. This should be freed with
|
||||
* SDL_free() when it is no longer needed.
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
*
|
||||
* \sa SDL_CreateGPUXRSwapchain
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUTextureFormat * SDLCALL SDL_GetGPUXRSwapchainFormats(SDL_GPUDevice *device, XrSession session, int *num_formats);
|
||||
|
||||
/**
|
||||
* Creates an OpenXR swapchain.
|
||||
*
|
||||
* The array returned via `textures` is sized according to
|
||||
* `xrEnumerateSwapchainImages`, and thus should only be accessed via index
|
||||
* values returned from `xrAcquireSwapchainImage`.
|
||||
*
|
||||
* Applications are still allowed to call `xrEnumerateSwapchainImages` on the
|
||||
* returned XrSwapchain if they need to get the exact size of the array.
|
||||
*
|
||||
* \param device a GPU context.
|
||||
* \param session an OpenXR session created for the given device.
|
||||
* \param createinfo the create info for the OpenXR swapchain, sans the
|
||||
* format.
|
||||
* \param format a supported format for the OpenXR swapchain.
|
||||
* \param swapchain a pointer filled in with the created OpenXR swapchain.
|
||||
* \param textures a pointer filled in with the array of created swapchain
|
||||
* images.
|
||||
* \returns the result of the call.
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
*
|
||||
* \sa SDL_CreateGPUDeviceWithProperties
|
||||
* \sa SDL_CreateGPUXRSession
|
||||
* \sa SDL_GetGPUXRSwapchainFormats
|
||||
* \sa SDL_DestroyGPUXRSwapchain
|
||||
*/
|
||||
extern SDL_DECLSPEC XrResult SDLCALL SDL_CreateGPUXRSwapchain(
|
||||
SDL_GPUDevice *device,
|
||||
XrSession session,
|
||||
const XrSwapchainCreateInfo *createinfo,
|
||||
SDL_GPUTextureFormat format,
|
||||
XrSwapchain *swapchain,
|
||||
SDL_GPUTexture ***textures);
|
||||
|
||||
/**
|
||||
* Destroys and OpenXR swapchain previously returned by
|
||||
* SDL_CreateGPUXRSwapchain.
|
||||
*
|
||||
* \param device a GPU context.
|
||||
* \param swapchain a swapchain previously returned by
|
||||
* SDL_CreateGPUXRSwapchain.
|
||||
* \param swapchainImages an array of swapchain images returned by the same
|
||||
* call to SDL_CreateGPUXRSwapchain.
|
||||
* \returns the result of the call.
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
*
|
||||
* \sa SDL_CreateGPUDeviceWithProperties
|
||||
* \sa SDL_CreateGPUXRSession
|
||||
* \sa SDL_CreateGPUXRSwapchain
|
||||
*/
|
||||
extern SDL_DECLSPEC XrResult SDLCALL SDL_DestroyGPUXRSwapchain(SDL_GPUDevice *device, XrSwapchain swapchain, SDL_GPUTexture **swapchainImages);
|
||||
|
||||
/**
|
||||
* Dynamically load the OpenXR loader.
|
||||
*
|
||||
* This can be called at any time.
|
||||
*
|
||||
* SDL keeps a reference count of the OpenXR loader, calling this function
|
||||
* multiple times will increment that count, rather than loading the library
|
||||
* multiple times.
|
||||
*
|
||||
* If not called, this will be implicitly called when creating a GPU device
|
||||
* with OpenXR.
|
||||
*
|
||||
* This function will use the platform default OpenXR loader name, unless the
|
||||
* `SDL_HINT_OPENXR_LIBRARY` hint is set.
|
||||
*
|
||||
* \returns true on success or false on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
*
|
||||
* \sa SDL_HINT_OPENXR_LIBRARY
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_OpenXR_LoadLibrary(void);
|
||||
|
||||
/**
|
||||
* Unload the OpenXR loader previously loaded by SDL_OpenXR_LoadLibrary.
|
||||
*
|
||||
* SDL keeps a reference count of the OpenXR loader, calling this function
|
||||
* will decrement that count. Once the reference count reaches zero, the
|
||||
* library is unloaded.
|
||||
*
|
||||
* \threadsafety This function is not thread safe.
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_OpenXR_UnloadLibrary(void);
|
||||
|
||||
/**
|
||||
* Get the address of the `xrGetInstanceProcAddr` function.
|
||||
*
|
||||
* This should be called after either calling SDL_OpenXR_LoadLibrary() or
|
||||
* creating an OpenXR SDL_GPUDevice.
|
||||
*
|
||||
* The actual type of the returned function pointer is
|
||||
* PFN_xrGetInstanceProcAddr, but that isn't always available. You should
|
||||
* include the OpenXR headers before this header, or cast the return value of
|
||||
* this function to the correct type.
|
||||
*
|
||||
* \returns the function pointer for `xrGetInstanceProcAddr` or NULL on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC PFN_xrGetInstanceProcAddr SDLCALL SDL_OpenXR_GetXrGetInstanceProcAddr(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <SDL3/SDL_close_code.h>
|
||||
|
||||
#endif /* SDL_openxr_h_ */
|
||||
+8
-2
@@ -402,7 +402,7 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_GetGPURendererDevice(SDL_Rendere
|
||||
/**
|
||||
* Create a 2D software rendering context for a surface.
|
||||
*
|
||||
* Two other API which can be used to create SDL_Renderer:
|
||||
* Two other APIs which can be used to create SDL_Renderer:
|
||||
* SDL_CreateRenderer() and SDL_CreateWindowAndRenderer(). These can _also_
|
||||
* create a software renderer, but they are intended to be used with an
|
||||
* SDL_Window as the final destination and not an SDL_Surface.
|
||||
@@ -1221,6 +1221,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureAlphaModFloat(SDL_Texture *textur
|
||||
/**
|
||||
* Set the blend mode for a texture, used by SDL_RenderTexture().
|
||||
*
|
||||
* This blend mode is used for any drawing that involves this texture.
|
||||
*
|
||||
* If the blend mode is not supported, the closest supported mode is chosen
|
||||
* and this function returns false.
|
||||
*
|
||||
@@ -1234,6 +1236,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureAlphaModFloat(SDL_Texture *textur
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetTextureBlendMode
|
||||
* \sa SDL_SetRenderDrawBlendMode
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode blendMode);
|
||||
|
||||
@@ -2054,7 +2057,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderColorScale(SDL_Renderer *renderer,
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderColorScale(SDL_Renderer *renderer, float *scale);
|
||||
|
||||
/**
|
||||
* Set the blend mode used for drawing operations (Fill and Line).
|
||||
* Set the blend mode used for drawing operations.
|
||||
*
|
||||
* This blend mode is used for any drawing that doesn't involve textures.
|
||||
*
|
||||
* If the blend mode is not supported, the closest supported mode is chosen.
|
||||
*
|
||||
@@ -2068,6 +2073,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderColorScale(SDL_Renderer *renderer,
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_GetRenderDrawBlendMode
|
||||
* \sa SDL_SetTextureBlendMode
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode);
|
||||
|
||||
|
||||
+2
-2
@@ -31,9 +31,9 @@
|
||||
/* #undef SDL_VENDOR_INFO */
|
||||
|
||||
#ifdef SDL_VENDOR_INFO
|
||||
#define SDL_REVISION "SDL-3.4.4-release-3.4.4 (" SDL_VENDOR_INFO ")"
|
||||
#define SDL_REVISION "SDL-3.4.16-release-3.4.16 (" SDL_VENDOR_INFO ")"
|
||||
#else
|
||||
#define SDL_REVISION "SDL-3.4.4-release-3.4.4"
|
||||
#define SDL_REVISION "SDL-3.4.16-release-3.4.16"
|
||||
#endif
|
||||
|
||||
#endif /* SDL_revision_h_ */
|
||||
|
||||
+5
-4
@@ -1290,8 +1290,9 @@ extern "C" {
|
||||
/**
|
||||
* Free memory previously allocated with SDL_stack_alloc.
|
||||
*
|
||||
* If SDL used alloca() to allocate this memory, this macro does nothing and
|
||||
* the allocated memory will be automatically released when the function that
|
||||
* If SDL used alloca() to allocate this memory, this macro does nothing (other
|
||||
* than insert `((void)(data)` so the compiler sees an expression) and the
|
||||
* allocated memory will be automatically released when the function that
|
||||
* called SDL_stack_alloc() returns. If SDL used SDL_malloc(), it will
|
||||
* SDL_free the memory immediately.
|
||||
*
|
||||
@@ -1303,10 +1304,10 @@ extern "C" {
|
||||
*
|
||||
* \sa SDL_stack_alloc
|
||||
*/
|
||||
#define SDL_stack_free(data)
|
||||
#define SDL_stack_free(data) ((void)(data))
|
||||
#elif !defined(SDL_DISABLE_ALLOCA)
|
||||
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
|
||||
#define SDL_stack_free(data)
|
||||
#define SDL_stack_free(data) ((void)(data))
|
||||
#else
|
||||
#define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count))
|
||||
#define SDL_stack_free(data) SDL_free(data)
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ extern "C" {
|
||||
*
|
||||
* \since This macro is available since SDL 3.2.0.
|
||||
*/
|
||||
#define SDL_MICRO_VERSION 4
|
||||
#define SDL_MICRO_VERSION 16
|
||||
|
||||
/**
|
||||
* This macro turns the version numbers into a numeric value.
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Flax.Deps.Dependencies
|
||||
|
||||
CloneGitRepo(root, "https://github.com/libsdl-org/SDL");
|
||||
GitFetch(root);
|
||||
GitResetToCommit(root, "5848e584a1b606de26e3dbd1c7e4ecbc34f807a6"); // 3.4.4
|
||||
GitResetToCommit(root, "fa2c02bb6e21974a89ea9824bc53c9932abe5f9c"); // 3.4.16
|
||||
|
||||
foreach (var platform in options.Platforms)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user