Merge branch 'alpha40LINwork' of https://github.com/Azaezel/Torque3D into Preview4_0

This commit is contained in:
Areloch 2019-08-27 19:10:38 -05:00
commit ca38fff31a
941 changed files with 123325 additions and 27436 deletions

View file

@ -2,7 +2,7 @@
#define __khrplatform_h_ #define __khrplatform_h_
/* /*
** Copyright (c) 2008-2009 The Khronos Group Inc. ** Copyright (c) 2008-2018 The Khronos Group Inc.
** **
** Permission is hereby granted, free of charge, to any person obtaining a ** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the ** copy of this software and/or associated documentation files (the
@ -26,18 +26,16 @@
/* Khronos platform-specific types and definitions. /* Khronos platform-specific types and definitions.
* *
* $Revision: 32517 $ on $Date: 2016-03-11 02:41:19 -0800 (Fri, 11 Mar 2016) $ * The master copy of khrplatform.h is maintained in the Khronos EGL
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
* The last semantic modification to khrplatform.h was at commit ID:
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
* *
* Adopters may modify this file to suit their platform. Adopters are * Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos * encouraged to submit platform specific modifications to the Khronos
* group so that they can be included in future versions of this file. * group so that they can be included in future versions of this file.
* Please submit changes by sending them to the public Khronos Bugzilla * Please submit changes by filing pull requests or issues on
* (http://khronos.org/bugzilla) by filing a bug against product * the EGL Registry repository linked above.
* "Khronos (general)" component "Registry".
*
* A predefined template which fills in some of the bug fields can be
* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
* must create a Bugzilla login first.
* *
* *
* See the Implementer's Guidelines for information about where this file * See the Implementer's Guidelines for information about where this file
@ -92,18 +90,25 @@
* int arg2) KHRONOS_APIATTRIBUTES; * int arg2) KHRONOS_APIATTRIBUTES;
*/ */
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
# define KHRONOS_STATIC 1
#endif
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* Definition of KHRONOS_APICALL * Definition of KHRONOS_APICALL
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
* This precedes the return type of the function in the function prototype. * This precedes the return type of the function in the function prototype.
*/ */
#if defined(_WIN32) && !defined(__SCITECH_SNAP__) #if defined(KHRONOS_STATIC)
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
* header compatible with static linking. */
# define KHRONOS_APICALL
#elif defined(_WIN32)
# define KHRONOS_APICALL __declspec(dllimport) # define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__) #elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C # define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__) #elif defined(__ANDROID__)
# include <sys/cdefs.h> # define KHRONOS_APICALL __attribute__((visibility("default")))
# define KHRONOS_APICALL __attribute__((visibility("default"))) __NDK_FPABI__
#else #else
# define KHRONOS_APICALL # define KHRONOS_APICALL
#endif #endif
@ -114,7 +119,7 @@
* This follows the return type of the function and precedes the function * This follows the return type of the function and precedes the function
* name in the function prototype. * name in the function prototype.
*/ */
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(KHRONOS_STATIC)
/* Win32 but not WinCE */ /* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall # define KHRONOS_APIENTRY __stdcall
#else #else

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
/* /*
GLX loader generated by glad 0.1.12a0 on Mon Sep 12 03:11:58 2016. GLX loader generated by glad 0.1.33 on Sun Aug 18 11:26:39 2019.
Language/Generator: C/C++ Language/Generator: C/C++
Specification: glx Specification: glx
@ -11,6 +11,7 @@
GLX_AMD_gpu_association, GLX_AMD_gpu_association,
GLX_ARB_context_flush_control, GLX_ARB_context_flush_control,
GLX_ARB_create_context, GLX_ARB_create_context,
GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_create_context_robustness,
GLX_ARB_fbconfig_float, GLX_ARB_fbconfig_float,
@ -21,12 +22,14 @@
GLX_ARB_robustness_share_group_isolation, GLX_ARB_robustness_share_group_isolation,
GLX_ARB_vertex_buffer_object, GLX_ARB_vertex_buffer_object,
GLX_EXT_buffer_age, GLX_EXT_buffer_age,
GLX_EXT_context_priority,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es2_profile,
GLX_EXT_create_context_es_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_fbconfig_packed_float, GLX_EXT_fbconfig_packed_float,
GLX_EXT_framebuffer_sRGB, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_import_context,
GLX_EXT_libglvnd, GLX_EXT_libglvnd,
GLX_EXT_no_config_context,
GLX_EXT_stereo_tree, GLX_EXT_stereo_tree,
GLX_EXT_swap_control, GLX_EXT_swap_control,
GLX_EXT_swap_control_tear, GLX_EXT_swap_control_tear,
@ -40,6 +43,7 @@
GLX_MESA_query_renderer, GLX_MESA_query_renderer,
GLX_MESA_release_buffers, GLX_MESA_release_buffers,
GLX_MESA_set_3dfx_mode, GLX_MESA_set_3dfx_mode,
GLX_MESA_swap_control,
GLX_NV_copy_buffer, GLX_NV_copy_buffer,
GLX_NV_copy_image, GLX_NV_copy_image,
GLX_NV_delay_before_swap, GLX_NV_delay_before_swap,
@ -72,9 +76,10 @@
Loader: True Loader: True
Local files: False Local files: False
Omit khrplatform: False Omit khrplatform: False
Reproducible: False
Commandline: Commandline:
--api="glx=1.4" --generator="c" --spec="glx" --extensions="GLX_3DFX_multisample,GLX_AMD_gpu_association,GLX_ARB_context_flush_control,GLX_ARB_create_context,GLX_ARB_create_context_profile,GLX_ARB_create_context_robustness,GLX_ARB_fbconfig_float,GLX_ARB_framebuffer_sRGB,GLX_ARB_get_proc_address,GLX_ARB_multisample,GLX_ARB_robustness_application_isolation,GLX_ARB_robustness_share_group_isolation,GLX_ARB_vertex_buffer_object,GLX_EXT_buffer_age,GLX_EXT_create_context_es2_profile,GLX_EXT_create_context_es_profile,GLX_EXT_fbconfig_packed_float,GLX_EXT_framebuffer_sRGB,GLX_EXT_import_context,GLX_EXT_libglvnd,GLX_EXT_stereo_tree,GLX_EXT_swap_control,GLX_EXT_swap_control_tear,GLX_EXT_texture_from_pixmap,GLX_EXT_visual_info,GLX_EXT_visual_rating,GLX_INTEL_swap_event,GLX_MESA_agp_offset,GLX_MESA_copy_sub_buffer,GLX_MESA_pixmap_colormap,GLX_MESA_query_renderer,GLX_MESA_release_buffers,GLX_MESA_set_3dfx_mode,GLX_NV_copy_buffer,GLX_NV_copy_image,GLX_NV_delay_before_swap,GLX_NV_float_buffer,GLX_NV_multisample_coverage,GLX_NV_present_video,GLX_NV_robustness_video_memory_purge,GLX_NV_swap_group,GLX_NV_video_capture,GLX_NV_video_out,GLX_OML_swap_method,GLX_OML_sync_control,GLX_SGIS_blended_overlay,GLX_SGIS_multisample,GLX_SGIS_shared_multisample,GLX_SGIX_dmbuffer,GLX_SGIX_fbconfig,GLX_SGIX_hyperpipe,GLX_SGIX_pbuffer,GLX_SGIX_swap_barrier,GLX_SGIX_swap_group,GLX_SGIX_video_resize,GLX_SGIX_video_source,GLX_SGIX_visual_select_group,GLX_SGI_cushion,GLX_SGI_make_current_read,GLX_SGI_swap_control,GLX_SGI_video_sync,GLX_SUN_get_transparent_index" --api="glx=1.4" --generator="c" --spec="glx" --extensions="GLX_3DFX_multisample,GLX_AMD_gpu_association,GLX_ARB_context_flush_control,GLX_ARB_create_context,GLX_ARB_create_context_no_error,GLX_ARB_create_context_profile,GLX_ARB_create_context_robustness,GLX_ARB_fbconfig_float,GLX_ARB_framebuffer_sRGB,GLX_ARB_get_proc_address,GLX_ARB_multisample,GLX_ARB_robustness_application_isolation,GLX_ARB_robustness_share_group_isolation,GLX_ARB_vertex_buffer_object,GLX_EXT_buffer_age,GLX_EXT_context_priority,GLX_EXT_create_context_es2_profile,GLX_EXT_create_context_es_profile,GLX_EXT_fbconfig_packed_float,GLX_EXT_framebuffer_sRGB,GLX_EXT_import_context,GLX_EXT_libglvnd,GLX_EXT_no_config_context,GLX_EXT_stereo_tree,GLX_EXT_swap_control,GLX_EXT_swap_control_tear,GLX_EXT_texture_from_pixmap,GLX_EXT_visual_info,GLX_EXT_visual_rating,GLX_INTEL_swap_event,GLX_MESA_agp_offset,GLX_MESA_copy_sub_buffer,GLX_MESA_pixmap_colormap,GLX_MESA_query_renderer,GLX_MESA_release_buffers,GLX_MESA_set_3dfx_mode,GLX_MESA_swap_control,GLX_NV_copy_buffer,GLX_NV_copy_image,GLX_NV_delay_before_swap,GLX_NV_float_buffer,GLX_NV_multisample_coverage,GLX_NV_present_video,GLX_NV_robustness_video_memory_purge,GLX_NV_swap_group,GLX_NV_video_capture,GLX_NV_video_out,GLX_OML_swap_method,GLX_OML_sync_control,GLX_SGIS_blended_overlay,GLX_SGIS_multisample,GLX_SGIS_shared_multisample,GLX_SGIX_dmbuffer,GLX_SGIX_fbconfig,GLX_SGIX_hyperpipe,GLX_SGIX_pbuffer,GLX_SGIX_swap_barrier,GLX_SGIX_swap_group,GLX_SGIX_video_resize,GLX_SGIX_video_source,GLX_SGIX_visual_select_group,GLX_SGI_cushion,GLX_SGI_make_current_read,GLX_SGI_swap_control,GLX_SGI_video_sync,GLX_SUN_get_transparent_index"
Online: Online:
Too many extensions Too many extensions
*/ */
@ -109,7 +114,7 @@ typedef void* (* GLADloadproc)(const char *name);
#ifndef GLAPI #ifndef GLAPI
# if defined(GLAD_GLAPI_EXPORT) # if defined(GLAD_GLAPI_EXPORT)
# if defined(WIN32) || defined(__CYGWIN__) # if defined(_WIN32) || defined(__CYGWIN__)
# if defined(GLAD_GLAPI_EXPORT_BUILD) # if defined(GLAD_GLAPI_EXPORT_BUILD)
# if defined(__GNUC__) # if defined(__GNUC__)
# define GLAPI __attribute__ ((dllexport)) extern # define GLAPI __attribute__ ((dllexport)) extern
@ -388,16 +393,16 @@ GLAPI PFNGLXISDIRECTPROC glad_glXIsDirect;
typedef int (APIENTRYP PFNGLXGETCONFIGPROC)(Display *dpy, XVisualInfo *visual, int attrib, int *value); typedef int (APIENTRYP PFNGLXGETCONFIGPROC)(Display *dpy, XVisualInfo *visual, int attrib, int *value);
GLAPI PFNGLXGETCONFIGPROC glad_glXGetConfig; GLAPI PFNGLXGETCONFIGPROC glad_glXGetConfig;
#define glXGetConfig glad_glXGetConfig #define glXGetConfig glad_glXGetConfig
typedef GLXContext (APIENTRYP PFNGLXGETCURRENTCONTEXTPROC)(); typedef GLXContext (APIENTRYP PFNGLXGETCURRENTCONTEXTPROC)(void);
GLAPI PFNGLXGETCURRENTCONTEXTPROC glad_glXGetCurrentContext; GLAPI PFNGLXGETCURRENTCONTEXTPROC glad_glXGetCurrentContext;
#define glXGetCurrentContext glad_glXGetCurrentContext #define glXGetCurrentContext glad_glXGetCurrentContext
typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTDRAWABLEPROC)(); typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTDRAWABLEPROC)(void);
GLAPI PFNGLXGETCURRENTDRAWABLEPROC glad_glXGetCurrentDrawable; GLAPI PFNGLXGETCURRENTDRAWABLEPROC glad_glXGetCurrentDrawable;
#define glXGetCurrentDrawable glad_glXGetCurrentDrawable #define glXGetCurrentDrawable glad_glXGetCurrentDrawable
typedef void (APIENTRYP PFNGLXWAITGLPROC)(); typedef void (APIENTRYP PFNGLXWAITGLPROC)(void);
GLAPI PFNGLXWAITGLPROC glad_glXWaitGL; GLAPI PFNGLXWAITGLPROC glad_glXWaitGL;
#define glXWaitGL glad_glXWaitGL #define glXWaitGL glad_glXWaitGL
typedef void (APIENTRYP PFNGLXWAITXPROC)(); typedef void (APIENTRYP PFNGLXWAITXPROC)(void);
GLAPI PFNGLXWAITXPROC glad_glXWaitX; GLAPI PFNGLXWAITXPROC glad_glXWaitX;
#define glXWaitX glad_glXWaitX #define glXWaitX glad_glXWaitX
typedef void (APIENTRYP PFNGLXUSEXFONTPROC)(Font font, int first, int count, int list); typedef void (APIENTRYP PFNGLXUSEXFONTPROC)(Font font, int first, int count, int list);
@ -420,7 +425,7 @@ GLAPI PFNGLXGETCLIENTSTRINGPROC glad_glXGetClientString;
#ifndef GLX_VERSION_1_2 #ifndef GLX_VERSION_1_2
#define GLX_VERSION_1_2 1 #define GLX_VERSION_1_2 1
GLAPI int GLAD_GLX_VERSION_1_2; GLAPI int GLAD_GLX_VERSION_1_2;
typedef Display * (APIENTRYP PFNGLXGETCURRENTDISPLAYPROC)(); typedef Display * (APIENTRYP PFNGLXGETCURRENTDISPLAYPROC)(void);
GLAPI PFNGLXGETCURRENTDISPLAYPROC glad_glXGetCurrentDisplay; GLAPI PFNGLXGETCURRENTDISPLAYPROC glad_glXGetCurrentDisplay;
#define glXGetCurrentDisplay glad_glXGetCurrentDisplay #define glXGetCurrentDisplay glad_glXGetCurrentDisplay
#endif #endif
@ -466,7 +471,7 @@ GLAPI PFNGLXCREATENEWCONTEXTPROC glad_glXCreateNewContext;
typedef Bool (APIENTRYP PFNGLXMAKECONTEXTCURRENTPROC)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); typedef Bool (APIENTRYP PFNGLXMAKECONTEXTCURRENTPROC)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
GLAPI PFNGLXMAKECONTEXTCURRENTPROC glad_glXMakeContextCurrent; GLAPI PFNGLXMAKECONTEXTCURRENTPROC glad_glXMakeContextCurrent;
#define glXMakeContextCurrent glad_glXMakeContextCurrent #define glXMakeContextCurrent glad_glXMakeContextCurrent
typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTREADDRAWABLEPROC)(); typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTREADDRAWABLEPROC)(void);
GLAPI PFNGLXGETCURRENTREADDRAWABLEPROC glad_glXGetCurrentReadDrawable; GLAPI PFNGLXGETCURRENTREADDRAWABLEPROC glad_glXGetCurrentReadDrawable;
#define glXGetCurrentReadDrawable glad_glXGetCurrentReadDrawable #define glXGetCurrentReadDrawable glad_glXGetCurrentReadDrawable
typedef int (APIENTRYP PFNGLXQUERYCONTEXTPROC)(Display *dpy, GLXContext ctx, int attribute, int *value); typedef int (APIENTRYP PFNGLXQUERYCONTEXTPROC)(Display *dpy, GLXContext ctx, int attribute, int *value);
@ -506,6 +511,7 @@ GLAPI PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress;
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
#define GLX_CONTEXT_FLAGS_ARB 0x2094 #define GLX_CONTEXT_FLAGS_ARB 0x2094
#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 #define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
@ -521,6 +527,10 @@ GLAPI PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress;
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 #define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 #define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
#define GLX_BACK_BUFFER_AGE_EXT 0x20F4 #define GLX_BACK_BUFFER_AGE_EXT 0x20F4
#define GLX_CONTEXT_PRIORITY_LEVEL_EXT 0x3100
#define GLX_CONTEXT_PRIORITY_HIGH_EXT 0x3101
#define GLX_CONTEXT_PRIORITY_MEDIUM_EXT 0x3102
#define GLX_CONTEXT_PRIORITY_LOW_EXT 0x3103
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 #define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 #define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
@ -603,7 +613,6 @@ GLAPI PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress;
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B #define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C #define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D #define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
#define GLX_RENDERER_ID_MESA 0x818E
#define GLX_3DFX_WINDOW_MODE_MESA 0x1 #define GLX_3DFX_WINDOW_MODE_MESA 0x1
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
#define GLX_FLOAT_COMPONENTS_NV 0x20B0 #define GLX_FLOAT_COMPONENTS_NV 0x20B0
@ -710,7 +719,7 @@ GLAPI PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC glad_glXDeleteAssociatedContextAMD;
typedef Bool (APIENTRYP PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)(GLXContext ctx); typedef Bool (APIENTRYP PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)(GLXContext ctx);
GLAPI PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_glXMakeAssociatedContextCurrentAMD; GLAPI PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_glXMakeAssociatedContextCurrentAMD;
#define glXMakeAssociatedContextCurrentAMD glad_glXMakeAssociatedContextCurrentAMD #define glXMakeAssociatedContextCurrentAMD glad_glXMakeAssociatedContextCurrentAMD
typedef GLXContext (APIENTRYP PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC)(); typedef GLXContext (APIENTRYP PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC)(void);
GLAPI PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_glXGetCurrentAssociatedContextAMD; GLAPI PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_glXGetCurrentAssociatedContextAMD;
#define glXGetCurrentAssociatedContextAMD glad_glXGetCurrentAssociatedContextAMD #define glXGetCurrentAssociatedContextAMD glad_glXGetCurrentAssociatedContextAMD
typedef void (APIENTRYP PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC)(GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); typedef void (APIENTRYP PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC)(GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
@ -728,6 +737,10 @@ typedef GLXContext (APIENTRYP PFNGLXCREATECONTEXTATTRIBSARBPROC)(Display *dpy, G
GLAPI PFNGLXCREATECONTEXTATTRIBSARBPROC glad_glXCreateContextAttribsARB; GLAPI PFNGLXCREATECONTEXTATTRIBSARBPROC glad_glXCreateContextAttribsARB;
#define glXCreateContextAttribsARB glad_glXCreateContextAttribsARB #define glXCreateContextAttribsARB glad_glXCreateContextAttribsARB
#endif #endif
#ifndef GLX_ARB_create_context_no_error
#define GLX_ARB_create_context_no_error 1
GLAPI int GLAD_GLX_ARB_create_context_no_error;
#endif
#ifndef GLX_ARB_create_context_profile #ifndef GLX_ARB_create_context_profile
#define GLX_ARB_create_context_profile 1 #define GLX_ARB_create_context_profile 1
GLAPI int GLAD_GLX_ARB_create_context_profile; GLAPI int GLAD_GLX_ARB_create_context_profile;
@ -771,6 +784,10 @@ GLAPI int GLAD_GLX_ARB_vertex_buffer_object;
#define GLX_EXT_buffer_age 1 #define GLX_EXT_buffer_age 1
GLAPI int GLAD_GLX_EXT_buffer_age; GLAPI int GLAD_GLX_EXT_buffer_age;
#endif #endif
#ifndef GLX_EXT_context_priority
#define GLX_EXT_context_priority 1
GLAPI int GLAD_GLX_EXT_context_priority;
#endif
#ifndef GLX_EXT_create_context_es2_profile #ifndef GLX_EXT_create_context_es2_profile
#define GLX_EXT_create_context_es2_profile 1 #define GLX_EXT_create_context_es2_profile 1
GLAPI int GLAD_GLX_EXT_create_context_es2_profile; GLAPI int GLAD_GLX_EXT_create_context_es2_profile;
@ -790,7 +807,7 @@ GLAPI int GLAD_GLX_EXT_framebuffer_sRGB;
#ifndef GLX_EXT_import_context #ifndef GLX_EXT_import_context
#define GLX_EXT_import_context 1 #define GLX_EXT_import_context 1
GLAPI int GLAD_GLX_EXT_import_context; GLAPI int GLAD_GLX_EXT_import_context;
typedef Display * (APIENTRYP PFNGLXGETCURRENTDISPLAYEXTPROC)(); typedef Display * (APIENTRYP PFNGLXGETCURRENTDISPLAYEXTPROC)(void);
GLAPI PFNGLXGETCURRENTDISPLAYEXTPROC glad_glXGetCurrentDisplayEXT; GLAPI PFNGLXGETCURRENTDISPLAYEXTPROC glad_glXGetCurrentDisplayEXT;
#define glXGetCurrentDisplayEXT glad_glXGetCurrentDisplayEXT #define glXGetCurrentDisplayEXT glad_glXGetCurrentDisplayEXT
typedef int (APIENTRYP PFNGLXQUERYCONTEXTINFOEXTPROC)(Display *dpy, GLXContext context, int attribute, int *value); typedef int (APIENTRYP PFNGLXQUERYCONTEXTINFOEXTPROC)(Display *dpy, GLXContext context, int attribute, int *value);
@ -810,6 +827,10 @@ GLAPI PFNGLXFREECONTEXTEXTPROC glad_glXFreeContextEXT;
#define GLX_EXT_libglvnd 1 #define GLX_EXT_libglvnd 1
GLAPI int GLAD_GLX_EXT_libglvnd; GLAPI int GLAD_GLX_EXT_libglvnd;
#endif #endif
#ifndef GLX_EXT_no_config_context
#define GLX_EXT_no_config_context 1
GLAPI int GLAD_GLX_EXT_no_config_context;
#endif
#ifndef GLX_EXT_stereo_tree #ifndef GLX_EXT_stereo_tree
#define GLX_EXT_stereo_tree 1 #define GLX_EXT_stereo_tree 1
GLAPI int GLAD_GLX_EXT_stereo_tree; GLAPI int GLAD_GLX_EXT_stereo_tree;
@ -894,10 +915,20 @@ GLAPI PFNGLXRELEASEBUFFERSMESAPROC glad_glXReleaseBuffersMESA;
#ifndef GLX_MESA_set_3dfx_mode #ifndef GLX_MESA_set_3dfx_mode
#define GLX_MESA_set_3dfx_mode 1 #define GLX_MESA_set_3dfx_mode 1
GLAPI int GLAD_GLX_MESA_set_3dfx_mode; GLAPI int GLAD_GLX_MESA_set_3dfx_mode;
typedef Bool (APIENTRYP PFNGLXSET3DFXMODEMESAPROC)(int mode); typedef GLboolean (APIENTRYP PFNGLXSET3DFXMODEMESAPROC)(GLint mode);
GLAPI PFNGLXSET3DFXMODEMESAPROC glad_glXSet3DfxModeMESA; GLAPI PFNGLXSET3DFXMODEMESAPROC glad_glXSet3DfxModeMESA;
#define glXSet3DfxModeMESA glad_glXSet3DfxModeMESA #define glXSet3DfxModeMESA glad_glXSet3DfxModeMESA
#endif #endif
#ifndef GLX_MESA_swap_control
#define GLX_MESA_swap_control 1
GLAPI int GLAD_GLX_MESA_swap_control;
typedef int (APIENTRYP PFNGLXGETSWAPINTERVALMESAPROC)(void);
GLAPI PFNGLXGETSWAPINTERVALMESAPROC glad_glXGetSwapIntervalMESA;
#define glXGetSwapIntervalMESA glad_glXGetSwapIntervalMESA
typedef int (APIENTRYP PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
GLAPI PFNGLXSWAPINTERVALMESAPROC glad_glXSwapIntervalMESA;
#define glXSwapIntervalMESA glad_glXSwapIntervalMESA
#endif
#ifndef GLX_NV_copy_buffer #ifndef GLX_NV_copy_buffer
#define GLX_NV_copy_buffer 1 #define GLX_NV_copy_buffer 1
GLAPI int GLAD_GLX_NV_copy_buffer; GLAPI int GLAD_GLX_NV_copy_buffer;
@ -1110,7 +1141,7 @@ GLAPI PFNGLXCREATEGLXPBUFFERSGIXPROC glad_glXCreateGLXPbufferSGIX;
typedef void (APIENTRYP PFNGLXDESTROYGLXPBUFFERSGIXPROC)(Display *dpy, GLXPbufferSGIX pbuf); typedef void (APIENTRYP PFNGLXDESTROYGLXPBUFFERSGIXPROC)(Display *dpy, GLXPbufferSGIX pbuf);
GLAPI PFNGLXDESTROYGLXPBUFFERSGIXPROC glad_glXDestroyGLXPbufferSGIX; GLAPI PFNGLXDESTROYGLXPBUFFERSGIXPROC glad_glXDestroyGLXPbufferSGIX;
#define glXDestroyGLXPbufferSGIX glad_glXDestroyGLXPbufferSGIX #define glXDestroyGLXPbufferSGIX glad_glXDestroyGLXPbufferSGIX
typedef int (APIENTRYP PFNGLXQUERYGLXPBUFFERSGIXPROC)(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); typedef void (APIENTRYP PFNGLXQUERYGLXPBUFFERSGIXPROC)(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
GLAPI PFNGLXQUERYGLXPBUFFERSGIXPROC glad_glXQueryGLXPbufferSGIX; GLAPI PFNGLXQUERYGLXPBUFFERSGIXPROC glad_glXQueryGLXPbufferSGIX;
#define glXQueryGLXPbufferSGIX glad_glXQueryGLXPbufferSGIX #define glXQueryGLXPbufferSGIX glad_glXQueryGLXPbufferSGIX
typedef void (APIENTRYP PFNGLXSELECTEVENTSGIXPROC)(Display *dpy, GLXDrawable drawable, unsigned long mask); typedef void (APIENTRYP PFNGLXSELECTEVENTSGIXPROC)(Display *dpy, GLXDrawable drawable, unsigned long mask);
@ -1185,7 +1216,7 @@ GLAPI int GLAD_GLX_SGI_make_current_read;
typedef Bool (APIENTRYP PFNGLXMAKECURRENTREADSGIPROC)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); typedef Bool (APIENTRYP PFNGLXMAKECURRENTREADSGIPROC)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
GLAPI PFNGLXMAKECURRENTREADSGIPROC glad_glXMakeCurrentReadSGI; GLAPI PFNGLXMAKECURRENTREADSGIPROC glad_glXMakeCurrentReadSGI;
#define glXMakeCurrentReadSGI glad_glXMakeCurrentReadSGI #define glXMakeCurrentReadSGI glad_glXMakeCurrentReadSGI
typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTREADDRAWABLESGIPROC)(); typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTREADDRAWABLESGIPROC)(void);
GLAPI PFNGLXGETCURRENTREADDRAWABLESGIPROC glad_glXGetCurrentReadDrawableSGI; GLAPI PFNGLXGETCURRENTREADDRAWABLESGIPROC glad_glXGetCurrentReadDrawableSGI;
#define glXGetCurrentReadDrawableSGI glad_glXGetCurrentReadDrawableSGI #define glXGetCurrentReadDrawableSGI glad_glXGetCurrentReadDrawableSGI
#endif #endif
@ -1209,7 +1240,7 @@ GLAPI PFNGLXWAITVIDEOSYNCSGIPROC glad_glXWaitVideoSyncSGI;
#ifndef GLX_SUN_get_transparent_index #ifndef GLX_SUN_get_transparent_index
#define GLX_SUN_get_transparent_index 1 #define GLX_SUN_get_transparent_index 1
GLAPI int GLAD_GLX_SUN_get_transparent_index; GLAPI int GLAD_GLX_SUN_get_transparent_index;
typedef Status (APIENTRYP PFNGLXGETTRANSPARENTINDEXSUNPROC)(Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); typedef Status (APIENTRYP PFNGLXGETTRANSPARENTINDEXSUNPROC)(Display *dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex);
GLAPI PFNGLXGETTRANSPARENTINDEXSUNPROC glad_glXGetTransparentIndexSUN; GLAPI PFNGLXGETTRANSPARENTINDEXSUNPROC glad_glXGetTransparentIndexSUN;
#define glXGetTransparentIndexSUN glad_glXGetTransparentIndexSUN #define glXGetTransparentIndexSUN glad_glXGetTransparentIndexSUN
#endif #endif

View file

@ -1,6 +1,6 @@
/* /*
WGL loader generated by glad 0.1.12a0 on Mon Sep 12 03:11:07 2016. WGL loader generated by glad 0.1.33 on Sun Aug 18 11:27:10 2019.
Language/Generator: C/C++ Language/Generator: C/C++
Specification: wgl Specification: wgl
@ -13,6 +13,7 @@
WGL_ARB_buffer_region, WGL_ARB_buffer_region,
WGL_ARB_context_flush_control, WGL_ARB_context_flush_control,
WGL_ARB_create_context, WGL_ARB_create_context,
WGL_ARB_create_context_no_error,
WGL_ARB_create_context_profile, WGL_ARB_create_context_profile,
WGL_ARB_create_context_robustness, WGL_ARB_create_context_robustness,
WGL_ARB_extensions_string, WGL_ARB_extensions_string,
@ -26,6 +27,8 @@
WGL_ARB_robustness_application_isolation, WGL_ARB_robustness_application_isolation,
WGL_ARB_robustness_share_group_isolation, WGL_ARB_robustness_share_group_isolation,
WGL_ATI_pixel_format_float, WGL_ATI_pixel_format_float,
WGL_ATI_render_texture_rectangle,
WGL_EXT_colorspace,
WGL_EXT_create_context_es2_profile, WGL_EXT_create_context_es2_profile,
WGL_EXT_create_context_es_profile, WGL_EXT_create_context_es_profile,
WGL_EXT_depth_float, WGL_EXT_depth_float,
@ -51,6 +54,7 @@
WGL_NV_delay_before_swap, WGL_NV_delay_before_swap,
WGL_NV_float_buffer, WGL_NV_float_buffer,
WGL_NV_gpu_affinity, WGL_NV_gpu_affinity,
WGL_NV_multigpu_context,
WGL_NV_multisample_coverage, WGL_NV_multisample_coverage,
WGL_NV_present_video, WGL_NV_present_video,
WGL_NV_render_depth_texture, WGL_NV_render_depth_texture,
@ -63,19 +67,23 @@
Loader: True Loader: True
Local files: False Local files: False
Omit khrplatform: False Omit khrplatform: False
Reproducible: False
Commandline: Commandline:
--api="wgl=1.0" --generator="c" --spec="wgl" --extensions="WGL_3DFX_multisample,WGL_3DL_stereo_control,WGL_AMD_gpu_association,WGL_ARB_buffer_region,WGL_ARB_context_flush_control,WGL_ARB_create_context,WGL_ARB_create_context_profile,WGL_ARB_create_context_robustness,WGL_ARB_extensions_string,WGL_ARB_framebuffer_sRGB,WGL_ARB_make_current_read,WGL_ARB_multisample,WGL_ARB_pbuffer,WGL_ARB_pixel_format,WGL_ARB_pixel_format_float,WGL_ARB_render_texture,WGL_ARB_robustness_application_isolation,WGL_ARB_robustness_share_group_isolation,WGL_ATI_pixel_format_float,WGL_EXT_create_context_es2_profile,WGL_EXT_create_context_es_profile,WGL_EXT_depth_float,WGL_EXT_display_color_table,WGL_EXT_extensions_string,WGL_EXT_framebuffer_sRGB,WGL_EXT_make_current_read,WGL_EXT_multisample,WGL_EXT_pbuffer,WGL_EXT_pixel_format,WGL_EXT_pixel_format_packed_float,WGL_EXT_swap_control,WGL_EXT_swap_control_tear,WGL_I3D_digital_video_control,WGL_I3D_gamma,WGL_I3D_genlock,WGL_I3D_image_buffer,WGL_I3D_swap_frame_lock,WGL_I3D_swap_frame_usage,WGL_NV_DX_interop,WGL_NV_DX_interop2,WGL_NV_copy_image,WGL_NV_delay_before_swap,WGL_NV_float_buffer,WGL_NV_gpu_affinity,WGL_NV_multisample_coverage,WGL_NV_present_video,WGL_NV_render_depth_texture,WGL_NV_render_texture_rectangle,WGL_NV_swap_group,WGL_NV_vertex_array_range,WGL_NV_video_capture,WGL_NV_video_output,WGL_OML_sync_control" --api="wgl=1.0" --generator="c" --spec="wgl" --extensions="WGL_3DFX_multisample,WGL_3DL_stereo_control,WGL_AMD_gpu_association,WGL_ARB_buffer_region,WGL_ARB_context_flush_control,WGL_ARB_create_context,WGL_ARB_create_context_no_error,WGL_ARB_create_context_profile,WGL_ARB_create_context_robustness,WGL_ARB_extensions_string,WGL_ARB_framebuffer_sRGB,WGL_ARB_make_current_read,WGL_ARB_multisample,WGL_ARB_pbuffer,WGL_ARB_pixel_format,WGL_ARB_pixel_format_float,WGL_ARB_render_texture,WGL_ARB_robustness_application_isolation,WGL_ARB_robustness_share_group_isolation,WGL_ATI_pixel_format_float,WGL_ATI_render_texture_rectangle,WGL_EXT_colorspace,WGL_EXT_create_context_es2_profile,WGL_EXT_create_context_es_profile,WGL_EXT_depth_float,WGL_EXT_display_color_table,WGL_EXT_extensions_string,WGL_EXT_framebuffer_sRGB,WGL_EXT_make_current_read,WGL_EXT_multisample,WGL_EXT_pbuffer,WGL_EXT_pixel_format,WGL_EXT_pixel_format_packed_float,WGL_EXT_swap_control,WGL_EXT_swap_control_tear,WGL_I3D_digital_video_control,WGL_I3D_gamma,WGL_I3D_genlock,WGL_I3D_image_buffer,WGL_I3D_swap_frame_lock,WGL_I3D_swap_frame_usage,WGL_NV_DX_interop,WGL_NV_DX_interop2,WGL_NV_copy_image,WGL_NV_delay_before_swap,WGL_NV_float_buffer,WGL_NV_gpu_affinity,WGL_NV_multigpu_context,WGL_NV_multisample_coverage,WGL_NV_present_video,WGL_NV_render_depth_texture,WGL_NV_render_texture_rectangle,WGL_NV_swap_group,WGL_NV_vertex_array_range,WGL_NV_video_capture,WGL_NV_video_output,WGL_OML_sync_control"
Online: Online:
http://glad.dav1d.de/#language=c&specification=wgl&loader=on&api=wgl%3D1.0&extensions=WGL_3DFX_multisample&extensions=WGL_3DL_stereo_control&extensions=WGL_AMD_gpu_association&extensions=WGL_ARB_buffer_region&extensions=WGL_ARB_context_flush_control&extensions=WGL_ARB_create_context&extensions=WGL_ARB_create_context_profile&extensions=WGL_ARB_create_context_robustness&extensions=WGL_ARB_extensions_string&extensions=WGL_ARB_framebuffer_sRGB&extensions=WGL_ARB_make_current_read&extensions=WGL_ARB_multisample&extensions=WGL_ARB_pbuffer&extensions=WGL_ARB_pixel_format&extensions=WGL_ARB_pixel_format_float&extensions=WGL_ARB_render_texture&extensions=WGL_ARB_robustness_application_isolation&extensions=WGL_ARB_robustness_share_group_isolation&extensions=WGL_ATI_pixel_format_float&extensions=WGL_EXT_create_context_es2_profile&extensions=WGL_EXT_create_context_es_profile&extensions=WGL_EXT_depth_float&extensions=WGL_EXT_display_color_table&extensions=WGL_EXT_extensions_string&extensions=WGL_EXT_framebuffer_sRGB&extensions=WGL_EXT_make_current_read&extensions=WGL_EXT_multisample&extensions=WGL_EXT_pbuffer&extensions=WGL_EXT_pixel_format&extensions=WGL_EXT_pixel_format_packed_float&extensions=WGL_EXT_swap_control&extensions=WGL_EXT_swap_control_tear&extensions=WGL_I3D_digital_video_control&extensions=WGL_I3D_gamma&extensions=WGL_I3D_genlock&extensions=WGL_I3D_image_buffer&extensions=WGL_I3D_swap_frame_lock&extensions=WGL_I3D_swap_frame_usage&extensions=WGL_NV_DX_interop&extensions=WGL_NV_DX_interop2&extensions=WGL_NV_copy_image&extensions=WGL_NV_delay_before_swap&extensions=WGL_NV_float_buffer&extensions=WGL_NV_gpu_affinity&extensions=WGL_NV_multisample_coverage&extensions=WGL_NV_present_video&extensions=WGL_NV_render_depth_texture&extensions=WGL_NV_render_texture_rectangle&extensions=WGL_NV_swap_group&extensions=WGL_NV_vertex_array_range&extensions=WGL_NV_video_capture&extensions=WGL_NV_video_output&extensions=WGL_OML_sync_control Too many extensions
*/ */
#ifndef WINAPI #ifndef WINAPI
# ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1 #define WIN32_LEAN_AND_MEAN 1
# endif #endif
# include <windows.h> #ifndef NOMINMAX
#define NOMINMAX 1
#endif
#include <windows.h>
#endif #endif
#include <glad/glad.h> #include <glad/glad.h>
@ -104,7 +112,7 @@ typedef void* (* GLADloadproc)(const char *name);
#ifndef GLAPI #ifndef GLAPI
# if defined(GLAD_GLAPI_EXPORT) # if defined(GLAD_GLAPI_EXPORT)
# if defined(WIN32) || defined(__CYGWIN__) # if defined(_WIN32) || defined(__CYGWIN__)
# if defined(GLAD_GLAPI_EXPORT_BUILD) # if defined(GLAD_GLAPI_EXPORT_BUILD)
# if defined(__GNUC__) # if defined(__GNUC__)
# define GLAPI __attribute__ ((dllexport)) extern # define GLAPI __attribute__ ((dllexport)) extern
@ -178,6 +186,7 @@ typedef struct _GPU_DEVICE *PGPU_DEVICE;
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_FLAGS_ARB 0x2094 #define WGL_CONTEXT_FLAGS_ARB 0x2094
#define ERROR_INVALID_VERSION_ARB 0x2095 #define ERROR_INVALID_VERSION_ARB 0x2095
#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
@ -284,6 +293,10 @@ typedef struct _GPU_DEVICE *PGPU_DEVICE;
#define WGL_AUX9_ARB 0x2090 #define WGL_AUX9_ARB 0x2090
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 #define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 #define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5
#define WGL_COLORSPACE_EXT 0x309D
#define WGL_COLORSPACE_SRGB_EXT 0x3089
#define WGL_COLORSPACE_LINEAR_EXT 0x308A
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 #define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 #define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define WGL_DEPTH_FLOAT_EXT 0x2040 #define WGL_DEPTH_FLOAT_EXT 0x2040
@ -377,6 +390,11 @@ typedef struct _GPU_DEVICE *PGPU_DEVICE;
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 #define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 #define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 #define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
#define WGL_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA
#define WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB
#define WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC
#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD
#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE
#define WGL_COVERAGE_SAMPLES_NV 0x2042 #define WGL_COVERAGE_SAMPLES_NV 0x2042
#define WGL_COLOR_SAMPLES_NV 0x20B9 #define WGL_COLOR_SAMPLES_NV 0x20B9
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 #define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
@ -420,7 +438,7 @@ GLAPI int GLAD_WGL_AMD_gpu_association;
typedef UINT (APIENTRYP PFNWGLGETGPUIDSAMDPROC)(UINT maxCount, UINT *ids); typedef UINT (APIENTRYP PFNWGLGETGPUIDSAMDPROC)(UINT maxCount, UINT *ids);
GLAPI PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD; GLAPI PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD;
#define wglGetGPUIDsAMD glad_wglGetGPUIDsAMD #define wglGetGPUIDsAMD glad_wglGetGPUIDsAMD
typedef INT (APIENTRYP PFNWGLGETGPUINFOAMDPROC)(UINT id, int property, GLenum dataType, UINT size, void *data); typedef INT (APIENTRYP PFNWGLGETGPUINFOAMDPROC)(UINT id, INT property, GLenum dataType, UINT size, void *data);
GLAPI PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD; GLAPI PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD;
#define wglGetGPUInfoAMD glad_wglGetGPUInfoAMD #define wglGetGPUInfoAMD glad_wglGetGPUInfoAMD
typedef UINT (APIENTRYP PFNWGLGETCONTEXTGPUIDAMDPROC)(HGLRC hglrc); typedef UINT (APIENTRYP PFNWGLGETCONTEXTGPUIDAMDPROC)(HGLRC hglrc);
@ -438,7 +456,7 @@ GLAPI PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC glad_wglDeleteAssociatedContextAMD;
typedef BOOL (APIENTRYP PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)(HGLRC hglrc); typedef BOOL (APIENTRYP PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)(HGLRC hglrc);
GLAPI PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD; GLAPI PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD;
#define wglMakeAssociatedContextCurrentAMD glad_wglMakeAssociatedContextCurrentAMD #define wglMakeAssociatedContextCurrentAMD glad_wglMakeAssociatedContextCurrentAMD
typedef HGLRC (APIENTRYP PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC)(); typedef HGLRC (APIENTRYP PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC)(void);
GLAPI PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD; GLAPI PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD;
#define wglGetCurrentAssociatedContextAMD glad_wglGetCurrentAssociatedContextAMD #define wglGetCurrentAssociatedContextAMD glad_wglGetCurrentAssociatedContextAMD
typedef VOID (APIENTRYP PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC)(HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); typedef VOID (APIENTRYP PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC)(HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
@ -472,6 +490,10 @@ typedef HGLRC (APIENTRYP PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC, HGLRC hShar
GLAPI PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB; GLAPI PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB;
#define wglCreateContextAttribsARB glad_wglCreateContextAttribsARB #define wglCreateContextAttribsARB glad_wglCreateContextAttribsARB
#endif #endif
#ifndef WGL_ARB_create_context_no_error
#define WGL_ARB_create_context_no_error 1
GLAPI int GLAD_WGL_ARB_create_context_no_error;
#endif
#ifndef WGL_ARB_create_context_profile #ifndef WGL_ARB_create_context_profile
#define WGL_ARB_create_context_profile 1 #define WGL_ARB_create_context_profile 1
GLAPI int GLAD_WGL_ARB_create_context_profile; GLAPI int GLAD_WGL_ARB_create_context_profile;
@ -497,7 +519,7 @@ GLAPI int GLAD_WGL_ARB_make_current_read;
typedef BOOL (APIENTRYP PFNWGLMAKECONTEXTCURRENTARBPROC)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); typedef BOOL (APIENTRYP PFNWGLMAKECONTEXTCURRENTARBPROC)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
GLAPI PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB; GLAPI PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB;
#define wglMakeContextCurrentARB glad_wglMakeContextCurrentARB #define wglMakeContextCurrentARB glad_wglMakeContextCurrentARB
typedef HDC (APIENTRYP PFNWGLGETCURRENTREADDCARBPROC)(); typedef HDC (APIENTRYP PFNWGLGETCURRENTREADDCARBPROC)(void);
GLAPI PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB; GLAPI PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB;
#define wglGetCurrentReadDCARB glad_wglGetCurrentReadDCARB #define wglGetCurrentReadDCARB glad_wglGetCurrentReadDCARB
#endif #endif
@ -566,6 +588,14 @@ GLAPI int GLAD_WGL_ARB_robustness_share_group_isolation;
#define WGL_ATI_pixel_format_float 1 #define WGL_ATI_pixel_format_float 1
GLAPI int GLAD_WGL_ATI_pixel_format_float; GLAPI int GLAD_WGL_ATI_pixel_format_float;
#endif #endif
#ifndef WGL_ATI_render_texture_rectangle
#define WGL_ATI_render_texture_rectangle 1
GLAPI int GLAD_WGL_ATI_render_texture_rectangle;
#endif
#ifndef WGL_EXT_colorspace
#define WGL_EXT_colorspace 1
GLAPI int GLAD_WGL_EXT_colorspace;
#endif
#ifndef WGL_EXT_create_context_es2_profile #ifndef WGL_EXT_create_context_es2_profile
#define WGL_EXT_create_context_es2_profile 1 #define WGL_EXT_create_context_es2_profile 1
GLAPI int GLAD_WGL_EXT_create_context_es2_profile; GLAPI int GLAD_WGL_EXT_create_context_es2_profile;
@ -597,7 +627,7 @@ GLAPI PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC glad_wglDestroyDisplayColorTableEXT;
#ifndef WGL_EXT_extensions_string #ifndef WGL_EXT_extensions_string
#define WGL_EXT_extensions_string 1 #define WGL_EXT_extensions_string 1
GLAPI int GLAD_WGL_EXT_extensions_string; GLAPI int GLAD_WGL_EXT_extensions_string;
typedef const char * (APIENTRYP PFNWGLGETEXTENSIONSSTRINGEXTPROC)(); typedef const char * (APIENTRYP PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);
GLAPI PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT; GLAPI PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT;
#define wglGetExtensionsStringEXT glad_wglGetExtensionsStringEXT #define wglGetExtensionsStringEXT glad_wglGetExtensionsStringEXT
#endif #endif
@ -611,7 +641,7 @@ GLAPI int GLAD_WGL_EXT_make_current_read;
typedef BOOL (APIENTRYP PFNWGLMAKECONTEXTCURRENTEXTPROC)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); typedef BOOL (APIENTRYP PFNWGLMAKECONTEXTCURRENTEXTPROC)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
GLAPI PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT; GLAPI PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT;
#define wglMakeContextCurrentEXT glad_wglMakeContextCurrentEXT #define wglMakeContextCurrentEXT glad_wglMakeContextCurrentEXT
typedef HDC (APIENTRYP PFNWGLGETCURRENTREADDCEXTPROC)(); typedef HDC (APIENTRYP PFNWGLGETCURRENTREADDCEXTPROC)(void);
GLAPI PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT; GLAPI PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT;
#define wglGetCurrentReadDCEXT glad_wglGetCurrentReadDCEXT #define wglGetCurrentReadDCEXT glad_wglGetCurrentReadDCEXT
#endif #endif
@ -661,7 +691,7 @@ GLAPI int GLAD_WGL_EXT_swap_control;
typedef BOOL (APIENTRYP PFNWGLSWAPINTERVALEXTPROC)(int interval); typedef BOOL (APIENTRYP PFNWGLSWAPINTERVALEXTPROC)(int interval);
GLAPI PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT; GLAPI PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT;
#define wglSwapIntervalEXT glad_wglSwapIntervalEXT #define wglSwapIntervalEXT glad_wglSwapIntervalEXT
typedef int (APIENTRYP PFNWGLGETSWAPINTERVALEXTPROC)(); typedef int (APIENTRYP PFNWGLGETSWAPINTERVALEXTPROC)(void);
GLAPI PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT; GLAPI PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT;
#define wglGetSwapIntervalEXT glad_wglGetSwapIntervalEXT #define wglGetSwapIntervalEXT glad_wglGetSwapIntervalEXT
#endif #endif
@ -754,10 +784,10 @@ GLAPI PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC glad_wglReleaseImageBufferEventsI3D;
#ifndef WGL_I3D_swap_frame_lock #ifndef WGL_I3D_swap_frame_lock
#define WGL_I3D_swap_frame_lock 1 #define WGL_I3D_swap_frame_lock 1
GLAPI int GLAD_WGL_I3D_swap_frame_lock; GLAPI int GLAD_WGL_I3D_swap_frame_lock;
typedef BOOL (APIENTRYP PFNWGLENABLEFRAMELOCKI3DPROC)(); typedef BOOL (APIENTRYP PFNWGLENABLEFRAMELOCKI3DPROC)(void);
GLAPI PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D; GLAPI PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D;
#define wglEnableFrameLockI3D glad_wglEnableFrameLockI3D #define wglEnableFrameLockI3D glad_wglEnableFrameLockI3D
typedef BOOL (APIENTRYP PFNWGLDISABLEFRAMELOCKI3DPROC)(); typedef BOOL (APIENTRYP PFNWGLDISABLEFRAMELOCKI3DPROC)(void);
GLAPI PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D; GLAPI PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D;
#define wglDisableFrameLockI3D glad_wglDisableFrameLockI3D #define wglDisableFrameLockI3D glad_wglDisableFrameLockI3D
typedef BOOL (APIENTRYP PFNWGLISENABLEDFRAMELOCKI3DPROC)(BOOL *pFlag); typedef BOOL (APIENTRYP PFNWGLISENABLEDFRAMELOCKI3DPROC)(BOOL *pFlag);
@ -773,10 +803,10 @@ GLAPI int GLAD_WGL_I3D_swap_frame_usage;
typedef BOOL (APIENTRYP PFNWGLGETFRAMEUSAGEI3DPROC)(float *pUsage); typedef BOOL (APIENTRYP PFNWGLGETFRAMEUSAGEI3DPROC)(float *pUsage);
GLAPI PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D; GLAPI PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D;
#define wglGetFrameUsageI3D glad_wglGetFrameUsageI3D #define wglGetFrameUsageI3D glad_wglGetFrameUsageI3D
typedef BOOL (APIENTRYP PFNWGLBEGINFRAMETRACKINGI3DPROC)(); typedef BOOL (APIENTRYP PFNWGLBEGINFRAMETRACKINGI3DPROC)(void);
GLAPI PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D; GLAPI PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D;
#define wglBeginFrameTrackingI3D glad_wglBeginFrameTrackingI3D #define wglBeginFrameTrackingI3D glad_wglBeginFrameTrackingI3D
typedef BOOL (APIENTRYP PFNWGLENDFRAMETRACKINGI3DPROC)(); typedef BOOL (APIENTRYP PFNWGLENDFRAMETRACKINGI3DPROC)(void);
GLAPI PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D; GLAPI PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D;
#define wglEndFrameTrackingI3D glad_wglEndFrameTrackingI3D #define wglEndFrameTrackingI3D glad_wglEndFrameTrackingI3D
typedef BOOL (APIENTRYP PFNWGLQUERYFRAMETRACKINGI3DPROC)(DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); typedef BOOL (APIENTRYP PFNWGLQUERYFRAMETRACKINGI3DPROC)(DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
@ -852,6 +882,10 @@ typedef BOOL (APIENTRYP PFNWGLDELETEDCNVPROC)(HDC hdc);
GLAPI PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV; GLAPI PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV;
#define wglDeleteDCNV glad_wglDeleteDCNV #define wglDeleteDCNV glad_wglDeleteDCNV
#endif #endif
#ifndef WGL_NV_multigpu_context
#define WGL_NV_multigpu_context 1
GLAPI int GLAD_WGL_NV_multigpu_context;
#endif
#ifndef WGL_NV_multisample_coverage #ifndef WGL_NV_multisample_coverage
#define WGL_NV_multisample_coverage 1 #define WGL_NV_multisample_coverage 1
GLAPI int GLAD_WGL_NV_multisample_coverage; GLAPI int GLAD_WGL_NV_multisample_coverage;
@ -859,10 +893,10 @@ GLAPI int GLAD_WGL_NV_multisample_coverage;
#ifndef WGL_NV_present_video #ifndef WGL_NV_present_video
#define WGL_NV_present_video 1 #define WGL_NV_present_video 1
GLAPI int GLAD_WGL_NV_present_video; GLAPI int GLAD_WGL_NV_present_video;
typedef int (APIENTRYP PFNWGLENUMERATEVIDEODEVICESNVPROC)(HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); typedef int (APIENTRYP PFNWGLENUMERATEVIDEODEVICESNVPROC)(HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList);
GLAPI PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV; GLAPI PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV;
#define wglEnumerateVideoDevicesNV glad_wglEnumerateVideoDevicesNV #define wglEnumerateVideoDevicesNV glad_wglEnumerateVideoDevicesNV
typedef BOOL (APIENTRYP PFNWGLBINDVIDEODEVICENVPROC)(HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); typedef BOOL (APIENTRYP PFNWGLBINDVIDEODEVICENVPROC)(HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
GLAPI PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV; GLAPI PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV;
#define wglBindVideoDeviceNV glad_wglBindVideoDeviceNV #define wglBindVideoDeviceNV glad_wglBindVideoDeviceNV
typedef BOOL (APIENTRYP PFNWGLQUERYCURRENTCONTEXTNVPROC)(int iAttribute, int *piValue); typedef BOOL (APIENTRYP PFNWGLQUERYCURRENTCONTEXTNVPROC)(int iAttribute, int *piValue);
@ -962,7 +996,7 @@ GLAPI PFNWGLGETMSCRATEOMLPROC glad_wglGetMscRateOML;
typedef INT64 (APIENTRYP PFNWGLSWAPBUFFERSMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); typedef INT64 (APIENTRYP PFNWGLSWAPBUFFERSMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
GLAPI PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML; GLAPI PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML;
#define wglSwapBuffersMscOML glad_wglSwapBuffersMscOML #define wglSwapBuffersMscOML glad_wglSwapBuffersMscOML
typedef INT64 (APIENTRYP PFNWGLSWAPLAYERBUFFERSMSCOMLPROC)(HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); typedef INT64 (APIENTRYP PFNWGLSWAPLAYERBUFFERSMSCOMLPROC)(HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
GLAPI PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML; GLAPI PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML;
#define wglSwapLayerBuffersMscOML glad_wglSwapLayerBuffersMscOML #define wglSwapLayerBuffersMscOML glad_wglSwapLayerBuffersMscOML
typedef BOOL (APIENTRYP PFNWGLWAITFORMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); typedef BOOL (APIENTRYP PFNWGLWAITFORMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
/* /*
GLX loader generated by glad 0.1.12a0 on Mon Sep 12 03:11:58 2016. GLX loader generated by glad 0.1.33 on Sun Aug 18 11:26:39 2019.
Language/Generator: C/C++ Language/Generator: C/C++
Specification: glx Specification: glx
@ -11,6 +11,7 @@
GLX_AMD_gpu_association, GLX_AMD_gpu_association,
GLX_ARB_context_flush_control, GLX_ARB_context_flush_control,
GLX_ARB_create_context, GLX_ARB_create_context,
GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_create_context_robustness,
GLX_ARB_fbconfig_float, GLX_ARB_fbconfig_float,
@ -21,12 +22,14 @@
GLX_ARB_robustness_share_group_isolation, GLX_ARB_robustness_share_group_isolation,
GLX_ARB_vertex_buffer_object, GLX_ARB_vertex_buffer_object,
GLX_EXT_buffer_age, GLX_EXT_buffer_age,
GLX_EXT_context_priority,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es2_profile,
GLX_EXT_create_context_es_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_fbconfig_packed_float, GLX_EXT_fbconfig_packed_float,
GLX_EXT_framebuffer_sRGB, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_import_context,
GLX_EXT_libglvnd, GLX_EXT_libglvnd,
GLX_EXT_no_config_context,
GLX_EXT_stereo_tree, GLX_EXT_stereo_tree,
GLX_EXT_swap_control, GLX_EXT_swap_control,
GLX_EXT_swap_control_tear, GLX_EXT_swap_control_tear,
@ -40,6 +43,7 @@
GLX_MESA_query_renderer, GLX_MESA_query_renderer,
GLX_MESA_release_buffers, GLX_MESA_release_buffers,
GLX_MESA_set_3dfx_mode, GLX_MESA_set_3dfx_mode,
GLX_MESA_swap_control,
GLX_NV_copy_buffer, GLX_NV_copy_buffer,
GLX_NV_copy_image, GLX_NV_copy_image,
GLX_NV_delay_before_swap, GLX_NV_delay_before_swap,
@ -72,9 +76,10 @@
Loader: True Loader: True
Local files: False Local files: False
Omit khrplatform: False Omit khrplatform: False
Reproducible: False
Commandline: Commandline:
--api="glx=1.4" --generator="c" --spec="glx" --extensions="GLX_3DFX_multisample,GLX_AMD_gpu_association,GLX_ARB_context_flush_control,GLX_ARB_create_context,GLX_ARB_create_context_profile,GLX_ARB_create_context_robustness,GLX_ARB_fbconfig_float,GLX_ARB_framebuffer_sRGB,GLX_ARB_get_proc_address,GLX_ARB_multisample,GLX_ARB_robustness_application_isolation,GLX_ARB_robustness_share_group_isolation,GLX_ARB_vertex_buffer_object,GLX_EXT_buffer_age,GLX_EXT_create_context_es2_profile,GLX_EXT_create_context_es_profile,GLX_EXT_fbconfig_packed_float,GLX_EXT_framebuffer_sRGB,GLX_EXT_import_context,GLX_EXT_libglvnd,GLX_EXT_stereo_tree,GLX_EXT_swap_control,GLX_EXT_swap_control_tear,GLX_EXT_texture_from_pixmap,GLX_EXT_visual_info,GLX_EXT_visual_rating,GLX_INTEL_swap_event,GLX_MESA_agp_offset,GLX_MESA_copy_sub_buffer,GLX_MESA_pixmap_colormap,GLX_MESA_query_renderer,GLX_MESA_release_buffers,GLX_MESA_set_3dfx_mode,GLX_NV_copy_buffer,GLX_NV_copy_image,GLX_NV_delay_before_swap,GLX_NV_float_buffer,GLX_NV_multisample_coverage,GLX_NV_present_video,GLX_NV_robustness_video_memory_purge,GLX_NV_swap_group,GLX_NV_video_capture,GLX_NV_video_out,GLX_OML_swap_method,GLX_OML_sync_control,GLX_SGIS_blended_overlay,GLX_SGIS_multisample,GLX_SGIS_shared_multisample,GLX_SGIX_dmbuffer,GLX_SGIX_fbconfig,GLX_SGIX_hyperpipe,GLX_SGIX_pbuffer,GLX_SGIX_swap_barrier,GLX_SGIX_swap_group,GLX_SGIX_video_resize,GLX_SGIX_video_source,GLX_SGIX_visual_select_group,GLX_SGI_cushion,GLX_SGI_make_current_read,GLX_SGI_swap_control,GLX_SGI_video_sync,GLX_SUN_get_transparent_index" --api="glx=1.4" --generator="c" --spec="glx" --extensions="GLX_3DFX_multisample,GLX_AMD_gpu_association,GLX_ARB_context_flush_control,GLX_ARB_create_context,GLX_ARB_create_context_no_error,GLX_ARB_create_context_profile,GLX_ARB_create_context_robustness,GLX_ARB_fbconfig_float,GLX_ARB_framebuffer_sRGB,GLX_ARB_get_proc_address,GLX_ARB_multisample,GLX_ARB_robustness_application_isolation,GLX_ARB_robustness_share_group_isolation,GLX_ARB_vertex_buffer_object,GLX_EXT_buffer_age,GLX_EXT_context_priority,GLX_EXT_create_context_es2_profile,GLX_EXT_create_context_es_profile,GLX_EXT_fbconfig_packed_float,GLX_EXT_framebuffer_sRGB,GLX_EXT_import_context,GLX_EXT_libglvnd,GLX_EXT_no_config_context,GLX_EXT_stereo_tree,GLX_EXT_swap_control,GLX_EXT_swap_control_tear,GLX_EXT_texture_from_pixmap,GLX_EXT_visual_info,GLX_EXT_visual_rating,GLX_INTEL_swap_event,GLX_MESA_agp_offset,GLX_MESA_copy_sub_buffer,GLX_MESA_pixmap_colormap,GLX_MESA_query_renderer,GLX_MESA_release_buffers,GLX_MESA_set_3dfx_mode,GLX_MESA_swap_control,GLX_NV_copy_buffer,GLX_NV_copy_image,GLX_NV_delay_before_swap,GLX_NV_float_buffer,GLX_NV_multisample_coverage,GLX_NV_present_video,GLX_NV_robustness_video_memory_purge,GLX_NV_swap_group,GLX_NV_video_capture,GLX_NV_video_out,GLX_OML_swap_method,GLX_OML_sync_control,GLX_SGIS_blended_overlay,GLX_SGIS_multisample,GLX_SGIS_shared_multisample,GLX_SGIX_dmbuffer,GLX_SGIX_fbconfig,GLX_SGIX_hyperpipe,GLX_SGIX_pbuffer,GLX_SGIX_swap_barrier,GLX_SGIX_swap_group,GLX_SGIX_video_resize,GLX_SGIX_video_source,GLX_SGIX_visual_select_group,GLX_SGI_cushion,GLX_SGI_make_current_read,GLX_SGI_swap_control,GLX_SGI_video_sync,GLX_SUN_get_transparent_index"
Online: Online:
Too many extensions Too many extensions
*/ */
@ -86,21 +91,44 @@
static void* get_proc(const char *namez); static void* get_proc(const char *namez);
#ifdef _WIN32 #if defined(_WIN32) || defined(__CYGWIN__)
#ifndef _WINDOWS_
#undef APIENTRY
#endif
#include <windows.h> #include <windows.h>
static HMODULE libGL; static HMODULE libGL;
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*); typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
#ifdef _MSC_VER
#ifdef __has_include
#if __has_include(<winapifamily.h>)
#define HAVE_WINAPIFAMILY 1
#endif
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
#define HAVE_WINAPIFAMILY 1
#endif
#endif
#ifdef HAVE_WINAPIFAMILY
#include <winapifamily.h>
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define IS_UWP 1
#endif
#endif
static static
int open_gl(void) { int open_gl(void) {
#ifndef IS_UWP
libGL = LoadLibraryW(L"opengl32.dll"); libGL = LoadLibraryW(L"opengl32.dll");
if(libGL != NULL) { if(libGL != NULL) {
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE)GetProcAddress( void (* tmp)(void);
libGL, "wglGetProcAddress"); tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress");
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp;
return gladGetProcAddressPtr != NULL; return gladGetProcAddressPtr != NULL;
} }
#endif
return 0; return 0;
} }
@ -108,7 +136,7 @@ int open_gl(void) {
static static
void close_gl(void) { void close_gl(void) {
if(libGL != NULL) { if(libGL != NULL) {
FreeLibrary(libGL); FreeLibrary((HMODULE) libGL);
libGL = NULL; libGL = NULL;
} }
} }
@ -116,9 +144,9 @@ void close_gl(void) {
#include <dlfcn.h> #include <dlfcn.h>
static void* libGL; static void* libGL;
#ifndef __APPLE__ #if !defined(__APPLE__) && !defined(__HAIKU__)
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*); typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
#endif #endif
static static
@ -139,7 +167,7 @@ int open_gl(void) {
libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL); libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
if(libGL != NULL) { if(libGL != NULL) {
#ifdef __APPLE__ #if defined(__APPLE__) || defined(__HAIKU__)
return 1; return 1;
#else #else
gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL, gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
@ -153,7 +181,7 @@ int open_gl(void) {
} }
static static
void close_gl() { void close_gl(void) {
if(libGL != NULL) { if(libGL != NULL) {
dlclose(libGL); dlclose(libGL);
libGL = NULL; libGL = NULL;
@ -166,14 +194,14 @@ void* get_proc(const char *namez) {
void* result = NULL; void* result = NULL;
if(libGL == NULL) return NULL; if(libGL == NULL) return NULL;
#ifndef __APPLE__ #if !defined(__APPLE__) && !defined(__HAIKU__)
if(gladGetProcAddressPtr != NULL) { if(gladGetProcAddressPtr != NULL) {
result = gladGetProcAddressPtr(namez); result = gladGetProcAddressPtr(namez);
} }
#endif #endif
if(result == NULL) { if(result == NULL) {
#ifdef _WIN32 #if defined(_WIN32) || defined(__CYGWIN__)
result = (void*)GetProcAddress(libGL, namez); result = (void*)GetProcAddress((HMODULE) libGL, namez);
#else #else
result = dlsym(libGL, namez); result = dlsym(libGL, namez);
#endif #endif
@ -234,209 +262,215 @@ static int has_ext(const char *ext) {
return 0; return 0;
} }
int GLAD_GLX_VERSION_1_0; int GLAD_GLX_VERSION_1_0 = 0;
int GLAD_GLX_VERSION_1_1; int GLAD_GLX_VERSION_1_1 = 0;
int GLAD_GLX_VERSION_1_2; int GLAD_GLX_VERSION_1_2 = 0;
int GLAD_GLX_VERSION_1_3; int GLAD_GLX_VERSION_1_3 = 0;
int GLAD_GLX_VERSION_1_4; int GLAD_GLX_VERSION_1_4 = 0;
PFNGLXGETSELECTEDEVENTPROC glad_glXGetSelectedEvent; PFNGLXCHOOSEFBCONFIGPROC glad_glXChooseFBConfig = NULL;
PFNGLXQUERYEXTENSIONPROC glad_glXQueryExtension; PFNGLXCHOOSEVISUALPROC glad_glXChooseVisual = NULL;
PFNGLXMAKECURRENTPROC glad_glXMakeCurrent; PFNGLXCOPYCONTEXTPROC glad_glXCopyContext = NULL;
PFNGLXSELECTEVENTPROC glad_glXSelectEvent; PFNGLXCREATECONTEXTPROC glad_glXCreateContext = NULL;
PFNGLXCREATECONTEXTPROC glad_glXCreateContext; PFNGLXCREATEGLXPIXMAPPROC glad_glXCreateGLXPixmap = NULL;
PFNGLXCREATEGLXPIXMAPPROC glad_glXCreateGLXPixmap; PFNGLXCREATENEWCONTEXTPROC glad_glXCreateNewContext = NULL;
PFNGLXQUERYVERSIONPROC glad_glXQueryVersion; PFNGLXCREATEPBUFFERPROC glad_glXCreatePbuffer = NULL;
PFNGLXGETCURRENTREADDRAWABLEPROC glad_glXGetCurrentReadDrawable; PFNGLXCREATEPIXMAPPROC glad_glXCreatePixmap = NULL;
PFNGLXDESTROYPIXMAPPROC glad_glXDestroyPixmap; PFNGLXCREATEWINDOWPROC glad_glXCreateWindow = NULL;
PFNGLXGETCURRENTCONTEXTPROC glad_glXGetCurrentContext; PFNGLXDESTROYCONTEXTPROC glad_glXDestroyContext = NULL;
PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress; PFNGLXDESTROYGLXPIXMAPPROC glad_glXDestroyGLXPixmap = NULL;
PFNGLXWAITGLPROC glad_glXWaitGL; PFNGLXDESTROYPBUFFERPROC glad_glXDestroyPbuffer = NULL;
PFNGLXISDIRECTPROC glad_glXIsDirect; PFNGLXDESTROYPIXMAPPROC glad_glXDestroyPixmap = NULL;
PFNGLXDESTROYWINDOWPROC glad_glXDestroyWindow; PFNGLXDESTROYWINDOWPROC glad_glXDestroyWindow = NULL;
PFNGLXCREATEWINDOWPROC glad_glXCreateWindow; PFNGLXGETCLIENTSTRINGPROC glad_glXGetClientString = NULL;
PFNGLXCOPYCONTEXTPROC glad_glXCopyContext; PFNGLXGETCONFIGPROC glad_glXGetConfig = NULL;
PFNGLXCREATEPBUFFERPROC glad_glXCreatePbuffer; PFNGLXGETCURRENTCONTEXTPROC glad_glXGetCurrentContext = NULL;
PFNGLXSWAPBUFFERSPROC glad_glXSwapBuffers; PFNGLXGETCURRENTDISPLAYPROC glad_glXGetCurrentDisplay = NULL;
PFNGLXGETCURRENTDISPLAYPROC glad_glXGetCurrentDisplay; PFNGLXGETCURRENTDRAWABLEPROC glad_glXGetCurrentDrawable = NULL;
PFNGLXGETCURRENTDRAWABLEPROC glad_glXGetCurrentDrawable; PFNGLXGETCURRENTREADDRAWABLEPROC glad_glXGetCurrentReadDrawable = NULL;
PFNGLXQUERYCONTEXTPROC glad_glXQueryContext; PFNGLXGETFBCONFIGATTRIBPROC glad_glXGetFBConfigAttrib = NULL;
PFNGLXCHOOSEVISUALPROC glad_glXChooseVisual; PFNGLXGETFBCONFIGSPROC glad_glXGetFBConfigs = NULL;
PFNGLXQUERYSERVERSTRINGPROC glad_glXQueryServerString; PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress = NULL;
PFNGLXDESTROYCONTEXTPROC glad_glXDestroyContext; PFNGLXGETSELECTEDEVENTPROC glad_glXGetSelectedEvent = NULL;
PFNGLXDESTROYGLXPIXMAPPROC glad_glXDestroyGLXPixmap; PFNGLXGETVISUALFROMFBCONFIGPROC glad_glXGetVisualFromFBConfig = NULL;
PFNGLXGETFBCONFIGATTRIBPROC glad_glXGetFBConfigAttrib; PFNGLXISDIRECTPROC glad_glXIsDirect = NULL;
PFNGLXUSEXFONTPROC glad_glXUseXFont; PFNGLXMAKECONTEXTCURRENTPROC glad_glXMakeContextCurrent = NULL;
PFNGLXDESTROYPBUFFERPROC glad_glXDestroyPbuffer; PFNGLXMAKECURRENTPROC glad_glXMakeCurrent = NULL;
PFNGLXCHOOSEFBCONFIGPROC glad_glXChooseFBConfig; PFNGLXQUERYCONTEXTPROC glad_glXQueryContext = NULL;
PFNGLXCREATENEWCONTEXTPROC glad_glXCreateNewContext; PFNGLXQUERYDRAWABLEPROC glad_glXQueryDrawable = NULL;
PFNGLXMAKECONTEXTCURRENTPROC glad_glXMakeContextCurrent; PFNGLXQUERYEXTENSIONPROC glad_glXQueryExtension = NULL;
PFNGLXGETCONFIGPROC glad_glXGetConfig; PFNGLXQUERYEXTENSIONSSTRINGPROC glad_glXQueryExtensionsString = NULL;
PFNGLXGETFBCONFIGSPROC glad_glXGetFBConfigs; PFNGLXQUERYSERVERSTRINGPROC glad_glXQueryServerString = NULL;
PFNGLXCREATEPIXMAPPROC glad_glXCreatePixmap; PFNGLXQUERYVERSIONPROC glad_glXQueryVersion = NULL;
PFNGLXWAITXPROC glad_glXWaitX; PFNGLXSELECTEVENTPROC glad_glXSelectEvent = NULL;
PFNGLXGETVISUALFROMFBCONFIGPROC glad_glXGetVisualFromFBConfig; PFNGLXSWAPBUFFERSPROC glad_glXSwapBuffers = NULL;
PFNGLXQUERYDRAWABLEPROC glad_glXQueryDrawable; PFNGLXUSEXFONTPROC glad_glXUseXFont = NULL;
PFNGLXQUERYEXTENSIONSSTRINGPROC glad_glXQueryExtensionsString; PFNGLXWAITGLPROC glad_glXWaitGL = NULL;
PFNGLXGETCLIENTSTRINGPROC glad_glXGetClientString; PFNGLXWAITXPROC glad_glXWaitX = NULL;
int GLAD_GLX_ARB_framebuffer_sRGB; int GLAD_GLX_3DFX_multisample = 0;
int GLAD_GLX_EXT_import_context; int GLAD_GLX_AMD_gpu_association = 0;
int GLAD_GLX_EXT_libglvnd; int GLAD_GLX_ARB_context_flush_control = 0;
int GLAD_GLX_SGIS_shared_multisample; int GLAD_GLX_ARB_create_context = 0;
int GLAD_GLX_SGIX_pbuffer; int GLAD_GLX_ARB_create_context_no_error = 0;
int GLAD_GLX_EXT_swap_control_tear; int GLAD_GLX_ARB_create_context_profile = 0;
int GLAD_GLX_ARB_fbconfig_float; int GLAD_GLX_ARB_create_context_robustness = 0;
int GLAD_GLX_SGIX_hyperpipe; int GLAD_GLX_ARB_fbconfig_float = 0;
int GLAD_GLX_MESA_set_3dfx_mode; int GLAD_GLX_ARB_framebuffer_sRGB = 0;
int GLAD_GLX_INTEL_swap_event; int GLAD_GLX_ARB_get_proc_address = 0;
int GLAD_GLX_SGIX_video_resize; int GLAD_GLX_ARB_multisample = 0;
int GLAD_GLX_MESA_pixmap_colormap; int GLAD_GLX_ARB_robustness_application_isolation = 0;
int GLAD_GLX_EXT_create_context_es2_profile; int GLAD_GLX_ARB_robustness_share_group_isolation = 0;
int GLAD_GLX_ARB_robustness_application_isolation; int GLAD_GLX_ARB_vertex_buffer_object = 0;
int GLAD_GLX_NV_copy_image; int GLAD_GLX_EXT_buffer_age = 0;
int GLAD_GLX_NV_swap_group; int GLAD_GLX_EXT_context_priority = 0;
int GLAD_GLX_OML_sync_control; int GLAD_GLX_EXT_create_context_es2_profile = 0;
int GLAD_GLX_EXT_framebuffer_sRGB; int GLAD_GLX_EXT_create_context_es_profile = 0;
int GLAD_GLX_ARB_create_context_robustness; int GLAD_GLX_EXT_fbconfig_packed_float = 0;
int GLAD_GLX_OML_swap_method; int GLAD_GLX_EXT_framebuffer_sRGB = 0;
int GLAD_GLX_EXT_fbconfig_packed_float; int GLAD_GLX_EXT_import_context = 0;
int GLAD_GLX_EXT_buffer_age; int GLAD_GLX_EXT_libglvnd = 0;
int GLAD_GLX_3DFX_multisample; int GLAD_GLX_EXT_no_config_context = 0;
int GLAD_GLX_EXT_visual_info; int GLAD_GLX_EXT_stereo_tree = 0;
int GLAD_GLX_SGI_video_sync; int GLAD_GLX_EXT_swap_control = 0;
int GLAD_GLX_NV_video_capture; int GLAD_GLX_EXT_swap_control_tear = 0;
int GLAD_GLX_SGIS_multisample; int GLAD_GLX_EXT_texture_from_pixmap = 0;
int GLAD_GLX_EXT_texture_from_pixmap; int GLAD_GLX_EXT_visual_info = 0;
int GLAD_GLX_NV_video_out; int GLAD_GLX_EXT_visual_rating = 0;
int GLAD_GLX_ARB_multisample; int GLAD_GLX_INTEL_swap_event = 0;
int GLAD_GLX_NV_delay_before_swap; int GLAD_GLX_MESA_agp_offset = 0;
int GLAD_GLX_SGI_make_current_read; int GLAD_GLX_MESA_copy_sub_buffer = 0;
int GLAD_GLX_SGIX_swap_group; int GLAD_GLX_MESA_pixmap_colormap = 0;
int GLAD_GLX_EXT_swap_control; int GLAD_GLX_MESA_query_renderer = 0;
int GLAD_GLX_SGIX_video_source; int GLAD_GLX_MESA_release_buffers = 0;
int GLAD_GLX_MESA_query_renderer; int GLAD_GLX_MESA_set_3dfx_mode = 0;
int GLAD_GLX_NV_robustness_video_memory_purge; int GLAD_GLX_MESA_swap_control = 0;
int GLAD_GLX_ARB_create_context; int GLAD_GLX_NV_copy_buffer = 0;
int GLAD_GLX_ARB_context_flush_control; int GLAD_GLX_NV_copy_image = 0;
int GLAD_GLX_ARB_robustness_share_group_isolation; int GLAD_GLX_NV_delay_before_swap = 0;
int GLAD_GLX_EXT_stereo_tree; int GLAD_GLX_NV_float_buffer = 0;
int GLAD_GLX_SGI_swap_control; int GLAD_GLX_NV_multisample_coverage = 0;
int GLAD_GLX_SGIX_dmbuffer; int GLAD_GLX_NV_present_video = 0;
int GLAD_GLX_SGIX_visual_select_group; int GLAD_GLX_NV_robustness_video_memory_purge = 0;
int GLAD_GLX_SGIS_blended_overlay; int GLAD_GLX_NV_swap_group = 0;
int GLAD_GLX_NV_multisample_coverage; int GLAD_GLX_NV_video_capture = 0;
int GLAD_GLX_EXT_create_context_es_profile; int GLAD_GLX_NV_video_out = 0;
int GLAD_GLX_SGIX_fbconfig; int GLAD_GLX_OML_swap_method = 0;
int GLAD_GLX_NV_float_buffer; int GLAD_GLX_OML_sync_control = 0;
int GLAD_GLX_SGI_cushion; int GLAD_GLX_SGIS_blended_overlay = 0;
int GLAD_GLX_MESA_release_buffers; int GLAD_GLX_SGIS_multisample = 0;
int GLAD_GLX_EXT_visual_rating; int GLAD_GLX_SGIS_shared_multisample = 0;
int GLAD_GLX_MESA_copy_sub_buffer; int GLAD_GLX_SGIX_dmbuffer = 0;
int GLAD_GLX_MESA_agp_offset; int GLAD_GLX_SGIX_fbconfig = 0;
int GLAD_GLX_NV_copy_buffer; int GLAD_GLX_SGIX_hyperpipe = 0;
int GLAD_GLX_NV_present_video; int GLAD_GLX_SGIX_pbuffer = 0;
int GLAD_GLX_SUN_get_transparent_index; int GLAD_GLX_SGIX_swap_barrier = 0;
int GLAD_GLX_AMD_gpu_association; int GLAD_GLX_SGIX_swap_group = 0;
int GLAD_GLX_ARB_create_context_profile; int GLAD_GLX_SGIX_video_resize = 0;
int GLAD_GLX_SGIX_swap_barrier; int GLAD_GLX_SGIX_video_source = 0;
int GLAD_GLX_ARB_get_proc_address; int GLAD_GLX_SGIX_visual_select_group = 0;
int GLAD_GLX_ARB_vertex_buffer_object; int GLAD_GLX_SGI_cushion = 0;
PFNGLXGETGPUIDSAMDPROC glad_glXGetGPUIDsAMD; int GLAD_GLX_SGI_make_current_read = 0;
PFNGLXGETGPUINFOAMDPROC glad_glXGetGPUInfoAMD; int GLAD_GLX_SGI_swap_control = 0;
PFNGLXGETCONTEXTGPUIDAMDPROC glad_glXGetContextGPUIDAMD; int GLAD_GLX_SGI_video_sync = 0;
PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC glad_glXCreateAssociatedContextAMD; int GLAD_GLX_SUN_get_transparent_index = 0;
PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_glXCreateAssociatedContextAttribsAMD; PFNGLXGETGPUIDSAMDPROC glad_glXGetGPUIDsAMD = NULL;
PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC glad_glXDeleteAssociatedContextAMD; PFNGLXGETGPUINFOAMDPROC glad_glXGetGPUInfoAMD = NULL;
PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_glXMakeAssociatedContextCurrentAMD; PFNGLXGETCONTEXTGPUIDAMDPROC glad_glXGetContextGPUIDAMD = NULL;
PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_glXGetCurrentAssociatedContextAMD; PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC glad_glXCreateAssociatedContextAMD = NULL;
PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC glad_glXBlitContextFramebufferAMD; PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_glXCreateAssociatedContextAttribsAMD = NULL;
PFNGLXCREATECONTEXTATTRIBSARBPROC glad_glXCreateContextAttribsARB; PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC glad_glXDeleteAssociatedContextAMD = NULL;
PFNGLXGETPROCADDRESSARBPROC glad_glXGetProcAddressARB; PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_glXMakeAssociatedContextCurrentAMD = NULL;
PFNGLXGETCURRENTDISPLAYEXTPROC glad_glXGetCurrentDisplayEXT; PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_glXGetCurrentAssociatedContextAMD = NULL;
PFNGLXQUERYCONTEXTINFOEXTPROC glad_glXQueryContextInfoEXT; PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC glad_glXBlitContextFramebufferAMD = NULL;
PFNGLXGETCONTEXTIDEXTPROC glad_glXGetContextIDEXT; PFNGLXCREATECONTEXTATTRIBSARBPROC glad_glXCreateContextAttribsARB = NULL;
PFNGLXIMPORTCONTEXTEXTPROC glad_glXImportContextEXT; PFNGLXGETPROCADDRESSARBPROC glad_glXGetProcAddressARB = NULL;
PFNGLXFREECONTEXTEXTPROC glad_glXFreeContextEXT; PFNGLXGETCURRENTDISPLAYEXTPROC glad_glXGetCurrentDisplayEXT = NULL;
PFNGLXSWAPINTERVALEXTPROC glad_glXSwapIntervalEXT; PFNGLXQUERYCONTEXTINFOEXTPROC glad_glXQueryContextInfoEXT = NULL;
PFNGLXBINDTEXIMAGEEXTPROC glad_glXBindTexImageEXT; PFNGLXGETCONTEXTIDEXTPROC glad_glXGetContextIDEXT = NULL;
PFNGLXRELEASETEXIMAGEEXTPROC glad_glXReleaseTexImageEXT; PFNGLXIMPORTCONTEXTEXTPROC glad_glXImportContextEXT = NULL;
PFNGLXGETAGPOFFSETMESAPROC glad_glXGetAGPOffsetMESA; PFNGLXFREECONTEXTEXTPROC glad_glXFreeContextEXT = NULL;
PFNGLXCOPYSUBBUFFERMESAPROC glad_glXCopySubBufferMESA; PFNGLXSWAPINTERVALEXTPROC glad_glXSwapIntervalEXT = NULL;
PFNGLXCREATEGLXPIXMAPMESAPROC glad_glXCreateGLXPixmapMESA; PFNGLXBINDTEXIMAGEEXTPROC glad_glXBindTexImageEXT = NULL;
PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC glad_glXQueryCurrentRendererIntegerMESA; PFNGLXRELEASETEXIMAGEEXTPROC glad_glXReleaseTexImageEXT = NULL;
PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC glad_glXQueryCurrentRendererStringMESA; PFNGLXGETAGPOFFSETMESAPROC glad_glXGetAGPOffsetMESA = NULL;
PFNGLXQUERYRENDERERINTEGERMESAPROC glad_glXQueryRendererIntegerMESA; PFNGLXCOPYSUBBUFFERMESAPROC glad_glXCopySubBufferMESA = NULL;
PFNGLXQUERYRENDERERSTRINGMESAPROC glad_glXQueryRendererStringMESA; PFNGLXCREATEGLXPIXMAPMESAPROC glad_glXCreateGLXPixmapMESA = NULL;
PFNGLXRELEASEBUFFERSMESAPROC glad_glXReleaseBuffersMESA; PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC glad_glXQueryCurrentRendererIntegerMESA = NULL;
PFNGLXSET3DFXMODEMESAPROC glad_glXSet3DfxModeMESA; PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC glad_glXQueryCurrentRendererStringMESA = NULL;
PFNGLXCOPYBUFFERSUBDATANVPROC glad_glXCopyBufferSubDataNV; PFNGLXQUERYRENDERERINTEGERMESAPROC glad_glXQueryRendererIntegerMESA = NULL;
PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC glad_glXNamedCopyBufferSubDataNV; PFNGLXQUERYRENDERERSTRINGMESAPROC glad_glXQueryRendererStringMESA = NULL;
PFNGLXCOPYIMAGESUBDATANVPROC glad_glXCopyImageSubDataNV; PFNGLXRELEASEBUFFERSMESAPROC glad_glXReleaseBuffersMESA = NULL;
PFNGLXDELAYBEFORESWAPNVPROC glad_glXDelayBeforeSwapNV; PFNGLXSET3DFXMODEMESAPROC glad_glXSet3DfxModeMESA = NULL;
PFNGLXENUMERATEVIDEODEVICESNVPROC glad_glXEnumerateVideoDevicesNV; PFNGLXGETSWAPINTERVALMESAPROC glad_glXGetSwapIntervalMESA = NULL;
PFNGLXBINDVIDEODEVICENVPROC glad_glXBindVideoDeviceNV; PFNGLXSWAPINTERVALMESAPROC glad_glXSwapIntervalMESA = NULL;
PFNGLXJOINSWAPGROUPNVPROC glad_glXJoinSwapGroupNV; PFNGLXCOPYBUFFERSUBDATANVPROC glad_glXCopyBufferSubDataNV = NULL;
PFNGLXBINDSWAPBARRIERNVPROC glad_glXBindSwapBarrierNV; PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC glad_glXNamedCopyBufferSubDataNV = NULL;
PFNGLXQUERYSWAPGROUPNVPROC glad_glXQuerySwapGroupNV; PFNGLXCOPYIMAGESUBDATANVPROC glad_glXCopyImageSubDataNV = NULL;
PFNGLXQUERYMAXSWAPGROUPSNVPROC glad_glXQueryMaxSwapGroupsNV; PFNGLXDELAYBEFORESWAPNVPROC glad_glXDelayBeforeSwapNV = NULL;
PFNGLXQUERYFRAMECOUNTNVPROC glad_glXQueryFrameCountNV; PFNGLXENUMERATEVIDEODEVICESNVPROC glad_glXEnumerateVideoDevicesNV = NULL;
PFNGLXRESETFRAMECOUNTNVPROC glad_glXResetFrameCountNV; PFNGLXBINDVIDEODEVICENVPROC glad_glXBindVideoDeviceNV = NULL;
PFNGLXBINDVIDEOCAPTUREDEVICENVPROC glad_glXBindVideoCaptureDeviceNV; PFNGLXJOINSWAPGROUPNVPROC glad_glXJoinSwapGroupNV = NULL;
PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_glXEnumerateVideoCaptureDevicesNV; PFNGLXBINDSWAPBARRIERNVPROC glad_glXBindSwapBarrierNV = NULL;
PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC glad_glXLockVideoCaptureDeviceNV; PFNGLXQUERYSWAPGROUPNVPROC glad_glXQuerySwapGroupNV = NULL;
PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC glad_glXQueryVideoCaptureDeviceNV; PFNGLXQUERYMAXSWAPGROUPSNVPROC glad_glXQueryMaxSwapGroupsNV = NULL;
PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC glad_glXReleaseVideoCaptureDeviceNV; PFNGLXQUERYFRAMECOUNTNVPROC glad_glXQueryFrameCountNV = NULL;
PFNGLXGETVIDEODEVICENVPROC glad_glXGetVideoDeviceNV; PFNGLXRESETFRAMECOUNTNVPROC glad_glXResetFrameCountNV = NULL;
PFNGLXRELEASEVIDEODEVICENVPROC glad_glXReleaseVideoDeviceNV; PFNGLXBINDVIDEOCAPTUREDEVICENVPROC glad_glXBindVideoCaptureDeviceNV = NULL;
PFNGLXBINDVIDEOIMAGENVPROC glad_glXBindVideoImageNV; PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_glXEnumerateVideoCaptureDevicesNV = NULL;
PFNGLXRELEASEVIDEOIMAGENVPROC glad_glXReleaseVideoImageNV; PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC glad_glXLockVideoCaptureDeviceNV = NULL;
PFNGLXSENDPBUFFERTOVIDEONVPROC glad_glXSendPbufferToVideoNV; PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC glad_glXQueryVideoCaptureDeviceNV = NULL;
PFNGLXGETVIDEOINFONVPROC glad_glXGetVideoInfoNV; PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC glad_glXReleaseVideoCaptureDeviceNV = NULL;
PFNGLXGETSYNCVALUESOMLPROC glad_glXGetSyncValuesOML; PFNGLXGETVIDEODEVICENVPROC glad_glXGetVideoDeviceNV = NULL;
PFNGLXGETMSCRATEOMLPROC glad_glXGetMscRateOML; PFNGLXRELEASEVIDEODEVICENVPROC glad_glXReleaseVideoDeviceNV = NULL;
PFNGLXSWAPBUFFERSMSCOMLPROC glad_glXSwapBuffersMscOML; PFNGLXBINDVIDEOIMAGENVPROC glad_glXBindVideoImageNV = NULL;
PFNGLXWAITFORMSCOMLPROC glad_glXWaitForMscOML; PFNGLXRELEASEVIDEOIMAGENVPROC glad_glXReleaseVideoImageNV = NULL;
PFNGLXWAITFORSBCOMLPROC glad_glXWaitForSbcOML; PFNGLXSENDPBUFFERTOVIDEONVPROC glad_glXSendPbufferToVideoNV = NULL;
PFNGLXGETVIDEOINFONVPROC glad_glXGetVideoInfoNV = NULL;
PFNGLXGETSYNCVALUESOMLPROC glad_glXGetSyncValuesOML = NULL;
PFNGLXGETMSCRATEOMLPROC glad_glXGetMscRateOML = NULL;
PFNGLXSWAPBUFFERSMSCOMLPROC glad_glXSwapBuffersMscOML = NULL;
PFNGLXWAITFORMSCOMLPROC glad_glXWaitForMscOML = NULL;
PFNGLXWAITFORSBCOMLPROC glad_glXWaitForSbcOML = NULL;
#ifdef _DM_BUFFER_H_ #ifdef _DM_BUFFER_H_
PFNGLXASSOCIATEDMPBUFFERSGIXPROC glad_glXAssociateDMPbufferSGIX; PFNGLXASSOCIATEDMPBUFFERSGIXPROC glad_glXAssociateDMPbufferSGIX = NULL;
#endif #endif
PFNGLXGETFBCONFIGATTRIBSGIXPROC glad_glXGetFBConfigAttribSGIX; PFNGLXGETFBCONFIGATTRIBSGIXPROC glad_glXGetFBConfigAttribSGIX = NULL;
PFNGLXCHOOSEFBCONFIGSGIXPROC glad_glXChooseFBConfigSGIX; PFNGLXCHOOSEFBCONFIGSGIXPROC glad_glXChooseFBConfigSGIX = NULL;
PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC glad_glXCreateGLXPixmapWithConfigSGIX; PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC glad_glXCreateGLXPixmapWithConfigSGIX = NULL;
PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC glad_glXCreateContextWithConfigSGIX; PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC glad_glXCreateContextWithConfigSGIX = NULL;
PFNGLXGETVISUALFROMFBCONFIGSGIXPROC glad_glXGetVisualFromFBConfigSGIX; PFNGLXGETVISUALFROMFBCONFIGSGIXPROC glad_glXGetVisualFromFBConfigSGIX = NULL;
PFNGLXGETFBCONFIGFROMVISUALSGIXPROC glad_glXGetFBConfigFromVisualSGIX; PFNGLXGETFBCONFIGFROMVISUALSGIXPROC glad_glXGetFBConfigFromVisualSGIX = NULL;
PFNGLXQUERYHYPERPIPENETWORKSGIXPROC glad_glXQueryHyperpipeNetworkSGIX; PFNGLXQUERYHYPERPIPENETWORKSGIXPROC glad_glXQueryHyperpipeNetworkSGIX = NULL;
PFNGLXHYPERPIPECONFIGSGIXPROC glad_glXHyperpipeConfigSGIX; PFNGLXHYPERPIPECONFIGSGIXPROC glad_glXHyperpipeConfigSGIX = NULL;
PFNGLXQUERYHYPERPIPECONFIGSGIXPROC glad_glXQueryHyperpipeConfigSGIX; PFNGLXQUERYHYPERPIPECONFIGSGIXPROC glad_glXQueryHyperpipeConfigSGIX = NULL;
PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC glad_glXDestroyHyperpipeConfigSGIX; PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC glad_glXDestroyHyperpipeConfigSGIX = NULL;
PFNGLXBINDHYPERPIPESGIXPROC glad_glXBindHyperpipeSGIX; PFNGLXBINDHYPERPIPESGIXPROC glad_glXBindHyperpipeSGIX = NULL;
PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC glad_glXQueryHyperpipeBestAttribSGIX; PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC glad_glXQueryHyperpipeBestAttribSGIX = NULL;
PFNGLXHYPERPIPEATTRIBSGIXPROC glad_glXHyperpipeAttribSGIX; PFNGLXHYPERPIPEATTRIBSGIXPROC glad_glXHyperpipeAttribSGIX = NULL;
PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC glad_glXQueryHyperpipeAttribSGIX; PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC glad_glXQueryHyperpipeAttribSGIX = NULL;
PFNGLXCREATEGLXPBUFFERSGIXPROC glad_glXCreateGLXPbufferSGIX; PFNGLXCREATEGLXPBUFFERSGIXPROC glad_glXCreateGLXPbufferSGIX = NULL;
PFNGLXDESTROYGLXPBUFFERSGIXPROC glad_glXDestroyGLXPbufferSGIX; PFNGLXDESTROYGLXPBUFFERSGIXPROC glad_glXDestroyGLXPbufferSGIX = NULL;
PFNGLXQUERYGLXPBUFFERSGIXPROC glad_glXQueryGLXPbufferSGIX; PFNGLXQUERYGLXPBUFFERSGIXPROC glad_glXQueryGLXPbufferSGIX = NULL;
PFNGLXSELECTEVENTSGIXPROC glad_glXSelectEventSGIX; PFNGLXSELECTEVENTSGIXPROC glad_glXSelectEventSGIX = NULL;
PFNGLXGETSELECTEDEVENTSGIXPROC glad_glXGetSelectedEventSGIX; PFNGLXGETSELECTEDEVENTSGIXPROC glad_glXGetSelectedEventSGIX = NULL;
PFNGLXBINDSWAPBARRIERSGIXPROC glad_glXBindSwapBarrierSGIX; PFNGLXBINDSWAPBARRIERSGIXPROC glad_glXBindSwapBarrierSGIX = NULL;
PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC glad_glXQueryMaxSwapBarriersSGIX; PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC glad_glXQueryMaxSwapBarriersSGIX = NULL;
PFNGLXJOINSWAPGROUPSGIXPROC glad_glXJoinSwapGroupSGIX; PFNGLXJOINSWAPGROUPSGIXPROC glad_glXJoinSwapGroupSGIX = NULL;
PFNGLXBINDCHANNELTOWINDOWSGIXPROC glad_glXBindChannelToWindowSGIX; PFNGLXBINDCHANNELTOWINDOWSGIXPROC glad_glXBindChannelToWindowSGIX = NULL;
PFNGLXCHANNELRECTSGIXPROC glad_glXChannelRectSGIX; PFNGLXCHANNELRECTSGIXPROC glad_glXChannelRectSGIX = NULL;
PFNGLXQUERYCHANNELRECTSGIXPROC glad_glXQueryChannelRectSGIX; PFNGLXQUERYCHANNELRECTSGIXPROC glad_glXQueryChannelRectSGIX = NULL;
PFNGLXQUERYCHANNELDELTASSGIXPROC glad_glXQueryChannelDeltasSGIX; PFNGLXQUERYCHANNELDELTASSGIXPROC glad_glXQueryChannelDeltasSGIX = NULL;
PFNGLXCHANNELRECTSYNCSGIXPROC glad_glXChannelRectSyncSGIX; PFNGLXCHANNELRECTSYNCSGIXPROC glad_glXChannelRectSyncSGIX = NULL;
#ifdef _VL_H_ #ifdef _VL_H_
PFNGLXCREATEGLXVIDEOSOURCESGIXPROC glad_glXCreateGLXVideoSourceSGIX; PFNGLXCREATEGLXVIDEOSOURCESGIXPROC glad_glXCreateGLXVideoSourceSGIX = NULL;
PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC glad_glXDestroyGLXVideoSourceSGIX; PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC glad_glXDestroyGLXVideoSourceSGIX = NULL;
#endif #endif
PFNGLXCUSHIONSGIPROC glad_glXCushionSGI; PFNGLXCUSHIONSGIPROC glad_glXCushionSGI = NULL;
PFNGLXMAKECURRENTREADSGIPROC glad_glXMakeCurrentReadSGI; PFNGLXMAKECURRENTREADSGIPROC glad_glXMakeCurrentReadSGI = NULL;
PFNGLXGETCURRENTREADDRAWABLESGIPROC glad_glXGetCurrentReadDrawableSGI; PFNGLXGETCURRENTREADDRAWABLESGIPROC glad_glXGetCurrentReadDrawableSGI = NULL;
PFNGLXSWAPINTERVALSGIPROC glad_glXSwapIntervalSGI; PFNGLXSWAPINTERVALSGIPROC glad_glXSwapIntervalSGI = NULL;
PFNGLXGETVIDEOSYNCSGIPROC glad_glXGetVideoSyncSGI; PFNGLXGETVIDEOSYNCSGIPROC glad_glXGetVideoSyncSGI = NULL;
PFNGLXWAITVIDEOSYNCSGIPROC glad_glXWaitVideoSyncSGI; PFNGLXWAITVIDEOSYNCSGIPROC glad_glXWaitVideoSyncSGI = NULL;
PFNGLXGETTRANSPARENTINDEXSUNPROC glad_glXGetTransparentIndexSUN; PFNGLXGETTRANSPARENTINDEXSUNPROC glad_glXGetTransparentIndexSUN = NULL;
static void load_GLX_VERSION_1_0(GLADloadproc load) { static void load_GLX_VERSION_1_0(GLADloadproc load) {
if(!GLAD_GLX_VERSION_1_0) return; if(!GLAD_GLX_VERSION_1_0) return;
glad_glXChooseVisual = (PFNGLXCHOOSEVISUALPROC)load("glXChooseVisual"); glad_glXChooseVisual = (PFNGLXCHOOSEVISUALPROC)load("glXChooseVisual");
@ -555,6 +589,11 @@ static void load_GLX_MESA_set_3dfx_mode(GLADloadproc load) {
if(!GLAD_GLX_MESA_set_3dfx_mode) return; if(!GLAD_GLX_MESA_set_3dfx_mode) return;
glad_glXSet3DfxModeMESA = (PFNGLXSET3DFXMODEMESAPROC)load("glXSet3DfxModeMESA"); glad_glXSet3DfxModeMESA = (PFNGLXSET3DFXMODEMESAPROC)load("glXSet3DfxModeMESA");
} }
static void load_GLX_MESA_swap_control(GLADloadproc load) {
if(!GLAD_GLX_MESA_swap_control) return;
glad_glXGetSwapIntervalMESA = (PFNGLXGETSWAPINTERVALMESAPROC)load("glXGetSwapIntervalMESA");
glad_glXSwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)load("glXSwapIntervalMESA");
}
static void load_GLX_NV_copy_buffer(GLADloadproc load) { static void load_GLX_NV_copy_buffer(GLADloadproc load) {
if(!GLAD_GLX_NV_copy_buffer) return; if(!GLAD_GLX_NV_copy_buffer) return;
glad_glXCopyBufferSubDataNV = (PFNGLXCOPYBUFFERSUBDATANVPROC)load("glXCopyBufferSubDataNV"); glad_glXCopyBufferSubDataNV = (PFNGLXCOPYBUFFERSUBDATANVPROC)load("glXCopyBufferSubDataNV");
@ -697,6 +736,7 @@ static int find_extensionsGLX(void) {
GLAD_GLX_AMD_gpu_association = has_ext("GLX_AMD_gpu_association"); GLAD_GLX_AMD_gpu_association = has_ext("GLX_AMD_gpu_association");
GLAD_GLX_ARB_context_flush_control = has_ext("GLX_ARB_context_flush_control"); GLAD_GLX_ARB_context_flush_control = has_ext("GLX_ARB_context_flush_control");
GLAD_GLX_ARB_create_context = has_ext("GLX_ARB_create_context"); GLAD_GLX_ARB_create_context = has_ext("GLX_ARB_create_context");
GLAD_GLX_ARB_create_context_no_error = has_ext("GLX_ARB_create_context_no_error");
GLAD_GLX_ARB_create_context_profile = has_ext("GLX_ARB_create_context_profile"); GLAD_GLX_ARB_create_context_profile = has_ext("GLX_ARB_create_context_profile");
GLAD_GLX_ARB_create_context_robustness = has_ext("GLX_ARB_create_context_robustness"); GLAD_GLX_ARB_create_context_robustness = has_ext("GLX_ARB_create_context_robustness");
GLAD_GLX_ARB_fbconfig_float = has_ext("GLX_ARB_fbconfig_float"); GLAD_GLX_ARB_fbconfig_float = has_ext("GLX_ARB_fbconfig_float");
@ -707,12 +747,14 @@ static int find_extensionsGLX(void) {
GLAD_GLX_ARB_robustness_share_group_isolation = has_ext("GLX_ARB_robustness_share_group_isolation"); GLAD_GLX_ARB_robustness_share_group_isolation = has_ext("GLX_ARB_robustness_share_group_isolation");
GLAD_GLX_ARB_vertex_buffer_object = has_ext("GLX_ARB_vertex_buffer_object"); GLAD_GLX_ARB_vertex_buffer_object = has_ext("GLX_ARB_vertex_buffer_object");
GLAD_GLX_EXT_buffer_age = has_ext("GLX_EXT_buffer_age"); GLAD_GLX_EXT_buffer_age = has_ext("GLX_EXT_buffer_age");
GLAD_GLX_EXT_context_priority = has_ext("GLX_EXT_context_priority");
GLAD_GLX_EXT_create_context_es2_profile = has_ext("GLX_EXT_create_context_es2_profile"); GLAD_GLX_EXT_create_context_es2_profile = has_ext("GLX_EXT_create_context_es2_profile");
GLAD_GLX_EXT_create_context_es_profile = has_ext("GLX_EXT_create_context_es_profile"); GLAD_GLX_EXT_create_context_es_profile = has_ext("GLX_EXT_create_context_es_profile");
GLAD_GLX_EXT_fbconfig_packed_float = has_ext("GLX_EXT_fbconfig_packed_float"); GLAD_GLX_EXT_fbconfig_packed_float = has_ext("GLX_EXT_fbconfig_packed_float");
GLAD_GLX_EXT_framebuffer_sRGB = has_ext("GLX_EXT_framebuffer_sRGB"); GLAD_GLX_EXT_framebuffer_sRGB = has_ext("GLX_EXT_framebuffer_sRGB");
GLAD_GLX_EXT_import_context = has_ext("GLX_EXT_import_context"); GLAD_GLX_EXT_import_context = has_ext("GLX_EXT_import_context");
GLAD_GLX_EXT_libglvnd = has_ext("GLX_EXT_libglvnd"); GLAD_GLX_EXT_libglvnd = has_ext("GLX_EXT_libglvnd");
GLAD_GLX_EXT_no_config_context = has_ext("GLX_EXT_no_config_context");
GLAD_GLX_EXT_stereo_tree = has_ext("GLX_EXT_stereo_tree"); GLAD_GLX_EXT_stereo_tree = has_ext("GLX_EXT_stereo_tree");
GLAD_GLX_EXT_swap_control = has_ext("GLX_EXT_swap_control"); GLAD_GLX_EXT_swap_control = has_ext("GLX_EXT_swap_control");
GLAD_GLX_EXT_swap_control_tear = has_ext("GLX_EXT_swap_control_tear"); GLAD_GLX_EXT_swap_control_tear = has_ext("GLX_EXT_swap_control_tear");
@ -726,6 +768,7 @@ static int find_extensionsGLX(void) {
GLAD_GLX_MESA_query_renderer = has_ext("GLX_MESA_query_renderer"); GLAD_GLX_MESA_query_renderer = has_ext("GLX_MESA_query_renderer");
GLAD_GLX_MESA_release_buffers = has_ext("GLX_MESA_release_buffers"); GLAD_GLX_MESA_release_buffers = has_ext("GLX_MESA_release_buffers");
GLAD_GLX_MESA_set_3dfx_mode = has_ext("GLX_MESA_set_3dfx_mode"); GLAD_GLX_MESA_set_3dfx_mode = has_ext("GLX_MESA_set_3dfx_mode");
GLAD_GLX_MESA_swap_control = has_ext("GLX_MESA_swap_control");
GLAD_GLX_NV_copy_buffer = has_ext("GLX_NV_copy_buffer"); GLAD_GLX_NV_copy_buffer = has_ext("GLX_NV_copy_buffer");
GLAD_GLX_NV_copy_image = has_ext("GLX_NV_copy_image"); GLAD_GLX_NV_copy_image = has_ext("GLX_NV_copy_image");
GLAD_GLX_NV_delay_before_swap = has_ext("GLX_NV_delay_before_swap"); GLAD_GLX_NV_delay_before_swap = has_ext("GLX_NV_delay_before_swap");
@ -801,6 +844,7 @@ int gladLoadGLXLoader(GLADloadproc load, Display *dpy, int screen) {
load_GLX_MESA_query_renderer(load); load_GLX_MESA_query_renderer(load);
load_GLX_MESA_release_buffers(load); load_GLX_MESA_release_buffers(load);
load_GLX_MESA_set_3dfx_mode(load); load_GLX_MESA_set_3dfx_mode(load);
load_GLX_MESA_swap_control(load);
load_GLX_NV_copy_buffer(load); load_GLX_NV_copy_buffer(load);
load_GLX_NV_copy_image(load); load_GLX_NV_copy_image(load);
load_GLX_NV_delay_before_swap(load); load_GLX_NV_delay_before_swap(load);

View file

@ -1,6 +1,6 @@
/* /*
WGL loader generated by glad 0.1.12a0 on Mon Sep 12 03:11:07 2016. WGL loader generated by glad 0.1.33 on Sun Aug 18 11:27:10 2019.
Language/Generator: C/C++ Language/Generator: C/C++
Specification: wgl Specification: wgl
@ -13,6 +13,7 @@
WGL_ARB_buffer_region, WGL_ARB_buffer_region,
WGL_ARB_context_flush_control, WGL_ARB_context_flush_control,
WGL_ARB_create_context, WGL_ARB_create_context,
WGL_ARB_create_context_no_error,
WGL_ARB_create_context_profile, WGL_ARB_create_context_profile,
WGL_ARB_create_context_robustness, WGL_ARB_create_context_robustness,
WGL_ARB_extensions_string, WGL_ARB_extensions_string,
@ -26,6 +27,8 @@
WGL_ARB_robustness_application_isolation, WGL_ARB_robustness_application_isolation,
WGL_ARB_robustness_share_group_isolation, WGL_ARB_robustness_share_group_isolation,
WGL_ATI_pixel_format_float, WGL_ATI_pixel_format_float,
WGL_ATI_render_texture_rectangle,
WGL_EXT_colorspace,
WGL_EXT_create_context_es2_profile, WGL_EXT_create_context_es2_profile,
WGL_EXT_create_context_es_profile, WGL_EXT_create_context_es_profile,
WGL_EXT_depth_float, WGL_EXT_depth_float,
@ -51,6 +54,7 @@
WGL_NV_delay_before_swap, WGL_NV_delay_before_swap,
WGL_NV_float_buffer, WGL_NV_float_buffer,
WGL_NV_gpu_affinity, WGL_NV_gpu_affinity,
WGL_NV_multigpu_context,
WGL_NV_multisample_coverage, WGL_NV_multisample_coverage,
WGL_NV_present_video, WGL_NV_present_video,
WGL_NV_render_depth_texture, WGL_NV_render_depth_texture,
@ -63,11 +67,12 @@
Loader: True Loader: True
Local files: False Local files: False
Omit khrplatform: False Omit khrplatform: False
Reproducible: False
Commandline: Commandline:
--api="wgl=1.0" --generator="c" --spec="wgl" --extensions="WGL_3DFX_multisample,WGL_3DL_stereo_control,WGL_AMD_gpu_association,WGL_ARB_buffer_region,WGL_ARB_context_flush_control,WGL_ARB_create_context,WGL_ARB_create_context_profile,WGL_ARB_create_context_robustness,WGL_ARB_extensions_string,WGL_ARB_framebuffer_sRGB,WGL_ARB_make_current_read,WGL_ARB_multisample,WGL_ARB_pbuffer,WGL_ARB_pixel_format,WGL_ARB_pixel_format_float,WGL_ARB_render_texture,WGL_ARB_robustness_application_isolation,WGL_ARB_robustness_share_group_isolation,WGL_ATI_pixel_format_float,WGL_EXT_create_context_es2_profile,WGL_EXT_create_context_es_profile,WGL_EXT_depth_float,WGL_EXT_display_color_table,WGL_EXT_extensions_string,WGL_EXT_framebuffer_sRGB,WGL_EXT_make_current_read,WGL_EXT_multisample,WGL_EXT_pbuffer,WGL_EXT_pixel_format,WGL_EXT_pixel_format_packed_float,WGL_EXT_swap_control,WGL_EXT_swap_control_tear,WGL_I3D_digital_video_control,WGL_I3D_gamma,WGL_I3D_genlock,WGL_I3D_image_buffer,WGL_I3D_swap_frame_lock,WGL_I3D_swap_frame_usage,WGL_NV_DX_interop,WGL_NV_DX_interop2,WGL_NV_copy_image,WGL_NV_delay_before_swap,WGL_NV_float_buffer,WGL_NV_gpu_affinity,WGL_NV_multisample_coverage,WGL_NV_present_video,WGL_NV_render_depth_texture,WGL_NV_render_texture_rectangle,WGL_NV_swap_group,WGL_NV_vertex_array_range,WGL_NV_video_capture,WGL_NV_video_output,WGL_OML_sync_control" --api="wgl=1.0" --generator="c" --spec="wgl" --extensions="WGL_3DFX_multisample,WGL_3DL_stereo_control,WGL_AMD_gpu_association,WGL_ARB_buffer_region,WGL_ARB_context_flush_control,WGL_ARB_create_context,WGL_ARB_create_context_no_error,WGL_ARB_create_context_profile,WGL_ARB_create_context_robustness,WGL_ARB_extensions_string,WGL_ARB_framebuffer_sRGB,WGL_ARB_make_current_read,WGL_ARB_multisample,WGL_ARB_pbuffer,WGL_ARB_pixel_format,WGL_ARB_pixel_format_float,WGL_ARB_render_texture,WGL_ARB_robustness_application_isolation,WGL_ARB_robustness_share_group_isolation,WGL_ATI_pixel_format_float,WGL_ATI_render_texture_rectangle,WGL_EXT_colorspace,WGL_EXT_create_context_es2_profile,WGL_EXT_create_context_es_profile,WGL_EXT_depth_float,WGL_EXT_display_color_table,WGL_EXT_extensions_string,WGL_EXT_framebuffer_sRGB,WGL_EXT_make_current_read,WGL_EXT_multisample,WGL_EXT_pbuffer,WGL_EXT_pixel_format,WGL_EXT_pixel_format_packed_float,WGL_EXT_swap_control,WGL_EXT_swap_control_tear,WGL_I3D_digital_video_control,WGL_I3D_gamma,WGL_I3D_genlock,WGL_I3D_image_buffer,WGL_I3D_swap_frame_lock,WGL_I3D_swap_frame_usage,WGL_NV_DX_interop,WGL_NV_DX_interop2,WGL_NV_copy_image,WGL_NV_delay_before_swap,WGL_NV_float_buffer,WGL_NV_gpu_affinity,WGL_NV_multigpu_context,WGL_NV_multisample_coverage,WGL_NV_present_video,WGL_NV_render_depth_texture,WGL_NV_render_texture_rectangle,WGL_NV_swap_group,WGL_NV_vertex_array_range,WGL_NV_video_capture,WGL_NV_video_output,WGL_OML_sync_control"
Online: Online:
http://glad.dav1d.de/#language=c&specification=wgl&loader=on&api=wgl%3D1.0&extensions=WGL_3DFX_multisample&extensions=WGL_3DL_stereo_control&extensions=WGL_AMD_gpu_association&extensions=WGL_ARB_buffer_region&extensions=WGL_ARB_context_flush_control&extensions=WGL_ARB_create_context&extensions=WGL_ARB_create_context_profile&extensions=WGL_ARB_create_context_robustness&extensions=WGL_ARB_extensions_string&extensions=WGL_ARB_framebuffer_sRGB&extensions=WGL_ARB_make_current_read&extensions=WGL_ARB_multisample&extensions=WGL_ARB_pbuffer&extensions=WGL_ARB_pixel_format&extensions=WGL_ARB_pixel_format_float&extensions=WGL_ARB_render_texture&extensions=WGL_ARB_robustness_application_isolation&extensions=WGL_ARB_robustness_share_group_isolation&extensions=WGL_ATI_pixel_format_float&extensions=WGL_EXT_create_context_es2_profile&extensions=WGL_EXT_create_context_es_profile&extensions=WGL_EXT_depth_float&extensions=WGL_EXT_display_color_table&extensions=WGL_EXT_extensions_string&extensions=WGL_EXT_framebuffer_sRGB&extensions=WGL_EXT_make_current_read&extensions=WGL_EXT_multisample&extensions=WGL_EXT_pbuffer&extensions=WGL_EXT_pixel_format&extensions=WGL_EXT_pixel_format_packed_float&extensions=WGL_EXT_swap_control&extensions=WGL_EXT_swap_control_tear&extensions=WGL_I3D_digital_video_control&extensions=WGL_I3D_gamma&extensions=WGL_I3D_genlock&extensions=WGL_I3D_image_buffer&extensions=WGL_I3D_swap_frame_lock&extensions=WGL_I3D_swap_frame_usage&extensions=WGL_NV_DX_interop&extensions=WGL_NV_DX_interop2&extensions=WGL_NV_copy_image&extensions=WGL_NV_delay_before_swap&extensions=WGL_NV_float_buffer&extensions=WGL_NV_gpu_affinity&extensions=WGL_NV_multisample_coverage&extensions=WGL_NV_present_video&extensions=WGL_NV_render_depth_texture&extensions=WGL_NV_render_texture_rectangle&extensions=WGL_NV_swap_group&extensions=WGL_NV_vertex_array_range&extensions=WGL_NV_video_capture&extensions=WGL_NV_video_output&extensions=WGL_OML_sync_control Too many extensions
*/ */
#include <stdio.h> #include <stdio.h>
@ -77,21 +82,44 @@
static void* get_proc(const char *namez); static void* get_proc(const char *namez);
#ifdef _WIN32 #if defined(_WIN32) || defined(__CYGWIN__)
#ifndef _WINDOWS_
#undef APIENTRY
#endif
#include <windows.h> #include <windows.h>
static HMODULE libGL; static HMODULE libGL;
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*); typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
#ifdef _MSC_VER
#ifdef __has_include
#if __has_include(<winapifamily.h>)
#define HAVE_WINAPIFAMILY 1
#endif
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
#define HAVE_WINAPIFAMILY 1
#endif
#endif
#ifdef HAVE_WINAPIFAMILY
#include <winapifamily.h>
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define IS_UWP 1
#endif
#endif
static static
int open_gl(void) { int open_gl(void) {
#ifndef IS_UWP
libGL = LoadLibraryW(L"opengl32.dll"); libGL = LoadLibraryW(L"opengl32.dll");
if(libGL != NULL) { if(libGL != NULL) {
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE)GetProcAddress( void (* tmp)(void);
libGL, "wglGetProcAddress"); tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress");
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp;
return gladGetProcAddressPtr != NULL; return gladGetProcAddressPtr != NULL;
} }
#endif
return 0; return 0;
} }
@ -99,7 +127,7 @@ int open_gl(void) {
static static
void close_gl(void) { void close_gl(void) {
if(libGL != NULL) { if(libGL != NULL) {
FreeLibrary(libGL); FreeLibrary((HMODULE) libGL);
libGL = NULL; libGL = NULL;
} }
} }
@ -107,9 +135,9 @@ void close_gl(void) {
#include <dlfcn.h> #include <dlfcn.h>
static void* libGL; static void* libGL;
#ifndef __APPLE__ #if !defined(__APPLE__) && !defined(__HAIKU__)
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*); typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
#endif #endif
static static
@ -130,7 +158,7 @@ int open_gl(void) {
libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL); libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
if(libGL != NULL) { if(libGL != NULL) {
#ifdef __APPLE__ #if defined(__APPLE__) || defined(__HAIKU__)
return 1; return 1;
#else #else
gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL, gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
@ -144,7 +172,7 @@ int open_gl(void) {
} }
static static
void close_gl() { void close_gl(void) {
if(libGL != NULL) { if(libGL != NULL) {
dlclose(libGL); dlclose(libGL);
libGL = NULL; libGL = NULL;
@ -157,14 +185,14 @@ void* get_proc(const char *namez) {
void* result = NULL; void* result = NULL;
if(libGL == NULL) return NULL; if(libGL == NULL) return NULL;
#ifndef __APPLE__ #if !defined(__APPLE__) && !defined(__HAIKU__)
if(gladGetProcAddressPtr != NULL) { if(gladGetProcAddressPtr != NULL) {
result = gladGetProcAddressPtr(namez); result = gladGetProcAddressPtr(namez);
} }
#endif #endif
if(result == NULL) { if(result == NULL) {
#ifdef _WIN32 #if defined(_WIN32) || defined(__CYGWIN__)
result = (void*)GetProcAddress(libGL, namez); result = (void*)GetProcAddress((HMODULE) libGL, namez);
#else #else
result = dlsym(libGL, namez); result = dlsym(libGL, namez);
#endif #endif
@ -226,179 +254,183 @@ static int has_ext(const char *ext) {
return 0; return 0;
} }
int GLAD_WGL_VERSION_1_0; int GLAD_WGL_VERSION_1_0 = 0;
int GLAD_WGL_NV_multisample_coverage; int GLAD_WGL_3DFX_multisample = 0;
int GLAD_WGL_I3D_image_buffer; int GLAD_WGL_3DL_stereo_control = 0;
int GLAD_WGL_I3D_swap_frame_usage; int GLAD_WGL_AMD_gpu_association = 0;
int GLAD_WGL_NV_DX_interop2; int GLAD_WGL_ARB_buffer_region = 0;
int GLAD_WGL_OML_sync_control; int GLAD_WGL_ARB_context_flush_control = 0;
int GLAD_WGL_NV_float_buffer; int GLAD_WGL_ARB_create_context = 0;
int GLAD_WGL_NV_delay_before_swap; int GLAD_WGL_ARB_create_context_no_error = 0;
int GLAD_WGL_NV_video_capture; int GLAD_WGL_ARB_create_context_profile = 0;
int GLAD_WGL_ARB_pixel_format_float; int GLAD_WGL_ARB_create_context_robustness = 0;
int GLAD_WGL_ARB_create_context_profile; int GLAD_WGL_ARB_extensions_string = 0;
int GLAD_WGL_NV_swap_group; int GLAD_WGL_ARB_framebuffer_sRGB = 0;
int GLAD_WGL_NV_gpu_affinity; int GLAD_WGL_ARB_make_current_read = 0;
int GLAD_WGL_EXT_pixel_format; int GLAD_WGL_ARB_multisample = 0;
int GLAD_WGL_ARB_extensions_string; int GLAD_WGL_ARB_pbuffer = 0;
int GLAD_WGL_NV_render_texture_rectangle; int GLAD_WGL_ARB_pixel_format = 0;
int GLAD_WGL_EXT_create_context_es_profile; int GLAD_WGL_ARB_pixel_format_float = 0;
int GLAD_WGL_ARB_robustness_share_group_isolation; int GLAD_WGL_ARB_render_texture = 0;
int GLAD_WGL_ARB_create_context_robustness; int GLAD_WGL_ARB_robustness_application_isolation = 0;
int GLAD_WGL_EXT_depth_float; int GLAD_WGL_ARB_robustness_share_group_isolation = 0;
int GLAD_WGL_EXT_swap_control_tear; int GLAD_WGL_ATI_pixel_format_float = 0;
int GLAD_WGL_ARB_context_flush_control; int GLAD_WGL_ATI_render_texture_rectangle = 0;
int GLAD_WGL_ARB_pixel_format; int GLAD_WGL_EXT_colorspace = 0;
int GLAD_WGL_ARB_multisample; int GLAD_WGL_EXT_create_context_es2_profile = 0;
int GLAD_WGL_I3D_genlock; int GLAD_WGL_EXT_create_context_es_profile = 0;
int GLAD_WGL_NV_vertex_array_range; int GLAD_WGL_EXT_depth_float = 0;
int GLAD_WGL_3DL_stereo_control; int GLAD_WGL_EXT_display_color_table = 0;
int GLAD_WGL_EXT_pbuffer; int GLAD_WGL_EXT_extensions_string = 0;
int GLAD_WGL_EXT_display_color_table; int GLAD_WGL_EXT_framebuffer_sRGB = 0;
int GLAD_WGL_NV_video_output; int GLAD_WGL_EXT_make_current_read = 0;
int GLAD_WGL_ARB_robustness_application_isolation; int GLAD_WGL_EXT_multisample = 0;
int GLAD_WGL_3DFX_multisample; int GLAD_WGL_EXT_pbuffer = 0;
int GLAD_WGL_I3D_gamma; int GLAD_WGL_EXT_pixel_format = 0;
int GLAD_WGL_ARB_framebuffer_sRGB; int GLAD_WGL_EXT_pixel_format_packed_float = 0;
int GLAD_WGL_NV_copy_image; int GLAD_WGL_EXT_swap_control = 0;
int GLAD_WGL_EXT_framebuffer_sRGB; int GLAD_WGL_EXT_swap_control_tear = 0;
int GLAD_WGL_NV_present_video; int GLAD_WGL_I3D_digital_video_control = 0;
int GLAD_WGL_EXT_create_context_es2_profile; int GLAD_WGL_I3D_gamma = 0;
int GLAD_WGL_ARB_render_texture; int GLAD_WGL_I3D_genlock = 0;
int GLAD_WGL_ARB_make_current_read; int GLAD_WGL_I3D_image_buffer = 0;
int GLAD_WGL_EXT_multisample; int GLAD_WGL_I3D_swap_frame_lock = 0;
int GLAD_WGL_ARB_create_context; int GLAD_WGL_I3D_swap_frame_usage = 0;
int GLAD_WGL_EXT_extensions_string; int GLAD_WGL_NV_DX_interop = 0;
int GLAD_WGL_NV_render_depth_texture; int GLAD_WGL_NV_DX_interop2 = 0;
int GLAD_WGL_ATI_pixel_format_float; int GLAD_WGL_NV_copy_image = 0;
int GLAD_WGL_EXT_swap_control; int GLAD_WGL_NV_delay_before_swap = 0;
int GLAD_WGL_I3D_digital_video_control; int GLAD_WGL_NV_float_buffer = 0;
int GLAD_WGL_ARB_pbuffer; int GLAD_WGL_NV_gpu_affinity = 0;
int GLAD_WGL_NV_DX_interop; int GLAD_WGL_NV_multigpu_context = 0;
int GLAD_WGL_AMD_gpu_association; int GLAD_WGL_NV_multisample_coverage = 0;
int GLAD_WGL_EXT_pixel_format_packed_float; int GLAD_WGL_NV_present_video = 0;
int GLAD_WGL_EXT_make_current_read; int GLAD_WGL_NV_render_depth_texture = 0;
int GLAD_WGL_I3D_swap_frame_lock; int GLAD_WGL_NV_render_texture_rectangle = 0;
int GLAD_WGL_ARB_buffer_region; int GLAD_WGL_NV_swap_group = 0;
PFNWGLSETSTEREOEMITTERSTATE3DLPROC glad_wglSetStereoEmitterState3DL; int GLAD_WGL_NV_vertex_array_range = 0;
PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD; int GLAD_WGL_NV_video_capture = 0;
PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD; int GLAD_WGL_NV_video_output = 0;
PFNWGLGETCONTEXTGPUIDAMDPROC glad_wglGetContextGPUIDAMD; int GLAD_WGL_OML_sync_control = 0;
PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC glad_wglCreateAssociatedContextAMD; PFNWGLSETSTEREOEMITTERSTATE3DLPROC glad_wglSetStereoEmitterState3DL = NULL;
PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_wglCreateAssociatedContextAttribsAMD; PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD = NULL;
PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC glad_wglDeleteAssociatedContextAMD; PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD = NULL;
PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD; PFNWGLGETCONTEXTGPUIDAMDPROC glad_wglGetContextGPUIDAMD = NULL;
PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD; PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC glad_wglCreateAssociatedContextAMD = NULL;
PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC glad_wglBlitContextFramebufferAMD; PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_wglCreateAssociatedContextAttribsAMD = NULL;
PFNWGLCREATEBUFFERREGIONARBPROC glad_wglCreateBufferRegionARB; PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC glad_wglDeleteAssociatedContextAMD = NULL;
PFNWGLDELETEBUFFERREGIONARBPROC glad_wglDeleteBufferRegionARB; PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD = NULL;
PFNWGLSAVEBUFFERREGIONARBPROC glad_wglSaveBufferRegionARB; PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD = NULL;
PFNWGLRESTOREBUFFERREGIONARBPROC glad_wglRestoreBufferRegionARB; PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC glad_wglBlitContextFramebufferAMD = NULL;
PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB; PFNWGLCREATEBUFFERREGIONARBPROC glad_wglCreateBufferRegionARB = NULL;
PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB; PFNWGLDELETEBUFFERREGIONARBPROC glad_wglDeleteBufferRegionARB = NULL;
PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB; PFNWGLSAVEBUFFERREGIONARBPROC glad_wglSaveBufferRegionARB = NULL;
PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB; PFNWGLRESTOREBUFFERREGIONARBPROC glad_wglRestoreBufferRegionARB = NULL;
PFNWGLCREATEPBUFFERARBPROC glad_wglCreatePbufferARB; PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB = NULL;
PFNWGLGETPBUFFERDCARBPROC glad_wglGetPbufferDCARB; PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB = NULL;
PFNWGLRELEASEPBUFFERDCARBPROC glad_wglReleasePbufferDCARB; PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB = NULL;
PFNWGLDESTROYPBUFFERARBPROC glad_wglDestroyPbufferARB; PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB = NULL;
PFNWGLQUERYPBUFFERARBPROC glad_wglQueryPbufferARB; PFNWGLCREATEPBUFFERARBPROC glad_wglCreatePbufferARB = NULL;
PFNWGLGETPIXELFORMATATTRIBIVARBPROC glad_wglGetPixelFormatAttribivARB; PFNWGLGETPBUFFERDCARBPROC glad_wglGetPbufferDCARB = NULL;
PFNWGLGETPIXELFORMATATTRIBFVARBPROC glad_wglGetPixelFormatAttribfvARB; PFNWGLRELEASEPBUFFERDCARBPROC glad_wglReleasePbufferDCARB = NULL;
PFNWGLCHOOSEPIXELFORMATARBPROC glad_wglChoosePixelFormatARB; PFNWGLDESTROYPBUFFERARBPROC glad_wglDestroyPbufferARB = NULL;
PFNWGLBINDTEXIMAGEARBPROC glad_wglBindTexImageARB; PFNWGLQUERYPBUFFERARBPROC glad_wglQueryPbufferARB = NULL;
PFNWGLRELEASETEXIMAGEARBPROC glad_wglReleaseTexImageARB; PFNWGLGETPIXELFORMATATTRIBIVARBPROC glad_wglGetPixelFormatAttribivARB = NULL;
PFNWGLSETPBUFFERATTRIBARBPROC glad_wglSetPbufferAttribARB; PFNWGLGETPIXELFORMATATTRIBFVARBPROC glad_wglGetPixelFormatAttribfvARB = NULL;
PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC glad_wglCreateDisplayColorTableEXT; PFNWGLCHOOSEPIXELFORMATARBPROC glad_wglChoosePixelFormatARB = NULL;
PFNWGLLOADDISPLAYCOLORTABLEEXTPROC glad_wglLoadDisplayColorTableEXT; PFNWGLBINDTEXIMAGEARBPROC glad_wglBindTexImageARB = NULL;
PFNWGLBINDDISPLAYCOLORTABLEEXTPROC glad_wglBindDisplayColorTableEXT; PFNWGLRELEASETEXIMAGEARBPROC glad_wglReleaseTexImageARB = NULL;
PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC glad_wglDestroyDisplayColorTableEXT; PFNWGLSETPBUFFERATTRIBARBPROC glad_wglSetPbufferAttribARB = NULL;
PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT; PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC glad_wglCreateDisplayColorTableEXT = NULL;
PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT; PFNWGLLOADDISPLAYCOLORTABLEEXTPROC glad_wglLoadDisplayColorTableEXT = NULL;
PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT; PFNWGLBINDDISPLAYCOLORTABLEEXTPROC glad_wglBindDisplayColorTableEXT = NULL;
PFNWGLCREATEPBUFFEREXTPROC glad_wglCreatePbufferEXT; PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC glad_wglDestroyDisplayColorTableEXT = NULL;
PFNWGLGETPBUFFERDCEXTPROC glad_wglGetPbufferDCEXT; PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT = NULL;
PFNWGLRELEASEPBUFFERDCEXTPROC glad_wglReleasePbufferDCEXT; PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT = NULL;
PFNWGLDESTROYPBUFFEREXTPROC glad_wglDestroyPbufferEXT; PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT = NULL;
PFNWGLQUERYPBUFFEREXTPROC glad_wglQueryPbufferEXT; PFNWGLCREATEPBUFFEREXTPROC glad_wglCreatePbufferEXT = NULL;
PFNWGLGETPIXELFORMATATTRIBIVEXTPROC glad_wglGetPixelFormatAttribivEXT; PFNWGLGETPBUFFERDCEXTPROC glad_wglGetPbufferDCEXT = NULL;
PFNWGLGETPIXELFORMATATTRIBFVEXTPROC glad_wglGetPixelFormatAttribfvEXT; PFNWGLRELEASEPBUFFERDCEXTPROC glad_wglReleasePbufferDCEXT = NULL;
PFNWGLCHOOSEPIXELFORMATEXTPROC glad_wglChoosePixelFormatEXT; PFNWGLDESTROYPBUFFEREXTPROC glad_wglDestroyPbufferEXT = NULL;
PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT; PFNWGLQUERYPBUFFEREXTPROC glad_wglQueryPbufferEXT = NULL;
PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT; PFNWGLGETPIXELFORMATATTRIBIVEXTPROC glad_wglGetPixelFormatAttribivEXT = NULL;
PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC glad_wglGetDigitalVideoParametersI3D; PFNWGLGETPIXELFORMATATTRIBFVEXTPROC glad_wglGetPixelFormatAttribfvEXT = NULL;
PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC glad_wglSetDigitalVideoParametersI3D; PFNWGLCHOOSEPIXELFORMATEXTPROC glad_wglChoosePixelFormatEXT = NULL;
PFNWGLGETGAMMATABLEPARAMETERSI3DPROC glad_wglGetGammaTableParametersI3D; PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT = NULL;
PFNWGLSETGAMMATABLEPARAMETERSI3DPROC glad_wglSetGammaTableParametersI3D; PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT = NULL;
PFNWGLGETGAMMATABLEI3DPROC glad_wglGetGammaTableI3D; PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC glad_wglGetDigitalVideoParametersI3D = NULL;
PFNWGLSETGAMMATABLEI3DPROC glad_wglSetGammaTableI3D; PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC glad_wglSetDigitalVideoParametersI3D = NULL;
PFNWGLENABLEGENLOCKI3DPROC glad_wglEnableGenlockI3D; PFNWGLGETGAMMATABLEPARAMETERSI3DPROC glad_wglGetGammaTableParametersI3D = NULL;
PFNWGLDISABLEGENLOCKI3DPROC glad_wglDisableGenlockI3D; PFNWGLSETGAMMATABLEPARAMETERSI3DPROC glad_wglSetGammaTableParametersI3D = NULL;
PFNWGLISENABLEDGENLOCKI3DPROC glad_wglIsEnabledGenlockI3D; PFNWGLGETGAMMATABLEI3DPROC glad_wglGetGammaTableI3D = NULL;
PFNWGLGENLOCKSOURCEI3DPROC glad_wglGenlockSourceI3D; PFNWGLSETGAMMATABLEI3DPROC glad_wglSetGammaTableI3D = NULL;
PFNWGLGETGENLOCKSOURCEI3DPROC glad_wglGetGenlockSourceI3D; PFNWGLENABLEGENLOCKI3DPROC glad_wglEnableGenlockI3D = NULL;
PFNWGLGENLOCKSOURCEEDGEI3DPROC glad_wglGenlockSourceEdgeI3D; PFNWGLDISABLEGENLOCKI3DPROC glad_wglDisableGenlockI3D = NULL;
PFNWGLGETGENLOCKSOURCEEDGEI3DPROC glad_wglGetGenlockSourceEdgeI3D; PFNWGLISENABLEDGENLOCKI3DPROC glad_wglIsEnabledGenlockI3D = NULL;
PFNWGLGENLOCKSAMPLERATEI3DPROC glad_wglGenlockSampleRateI3D; PFNWGLGENLOCKSOURCEI3DPROC glad_wglGenlockSourceI3D = NULL;
PFNWGLGETGENLOCKSAMPLERATEI3DPROC glad_wglGetGenlockSampleRateI3D; PFNWGLGETGENLOCKSOURCEI3DPROC glad_wglGetGenlockSourceI3D = NULL;
PFNWGLGENLOCKSOURCEDELAYI3DPROC glad_wglGenlockSourceDelayI3D; PFNWGLGENLOCKSOURCEEDGEI3DPROC glad_wglGenlockSourceEdgeI3D = NULL;
PFNWGLGETGENLOCKSOURCEDELAYI3DPROC glad_wglGetGenlockSourceDelayI3D; PFNWGLGETGENLOCKSOURCEEDGEI3DPROC glad_wglGetGenlockSourceEdgeI3D = NULL;
PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC glad_wglQueryGenlockMaxSourceDelayI3D; PFNWGLGENLOCKSAMPLERATEI3DPROC glad_wglGenlockSampleRateI3D = NULL;
PFNWGLCREATEIMAGEBUFFERI3DPROC glad_wglCreateImageBufferI3D; PFNWGLGETGENLOCKSAMPLERATEI3DPROC glad_wglGetGenlockSampleRateI3D = NULL;
PFNWGLDESTROYIMAGEBUFFERI3DPROC glad_wglDestroyImageBufferI3D; PFNWGLGENLOCKSOURCEDELAYI3DPROC glad_wglGenlockSourceDelayI3D = NULL;
PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC glad_wglAssociateImageBufferEventsI3D; PFNWGLGETGENLOCKSOURCEDELAYI3DPROC glad_wglGetGenlockSourceDelayI3D = NULL;
PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC glad_wglReleaseImageBufferEventsI3D; PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC glad_wglQueryGenlockMaxSourceDelayI3D = NULL;
PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D; PFNWGLCREATEIMAGEBUFFERI3DPROC glad_wglCreateImageBufferI3D = NULL;
PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D; PFNWGLDESTROYIMAGEBUFFERI3DPROC glad_wglDestroyImageBufferI3D = NULL;
PFNWGLISENABLEDFRAMELOCKI3DPROC glad_wglIsEnabledFrameLockI3D; PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC glad_wglAssociateImageBufferEventsI3D = NULL;
PFNWGLQUERYFRAMELOCKMASTERI3DPROC glad_wglQueryFrameLockMasterI3D; PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC glad_wglReleaseImageBufferEventsI3D = NULL;
PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D; PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D = NULL;
PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D; PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D = NULL;
PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D; PFNWGLISENABLEDFRAMELOCKI3DPROC glad_wglIsEnabledFrameLockI3D = NULL;
PFNWGLQUERYFRAMETRACKINGI3DPROC glad_wglQueryFrameTrackingI3D; PFNWGLQUERYFRAMELOCKMASTERI3DPROC glad_wglQueryFrameLockMasterI3D = NULL;
PFNWGLDXSETRESOURCESHAREHANDLENVPROC glad_wglDXSetResourceShareHandleNV; PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D = NULL;
PFNWGLDXOPENDEVICENVPROC glad_wglDXOpenDeviceNV; PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D = NULL;
PFNWGLDXCLOSEDEVICENVPROC glad_wglDXCloseDeviceNV; PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D = NULL;
PFNWGLDXREGISTEROBJECTNVPROC glad_wglDXRegisterObjectNV; PFNWGLQUERYFRAMETRACKINGI3DPROC glad_wglQueryFrameTrackingI3D = NULL;
PFNWGLDXUNREGISTEROBJECTNVPROC glad_wglDXUnregisterObjectNV; PFNWGLDXSETRESOURCESHAREHANDLENVPROC glad_wglDXSetResourceShareHandleNV = NULL;
PFNWGLDXOBJECTACCESSNVPROC glad_wglDXObjectAccessNV; PFNWGLDXOPENDEVICENVPROC glad_wglDXOpenDeviceNV = NULL;
PFNWGLDXLOCKOBJECTSNVPROC glad_wglDXLockObjectsNV; PFNWGLDXCLOSEDEVICENVPROC glad_wglDXCloseDeviceNV = NULL;
PFNWGLDXUNLOCKOBJECTSNVPROC glad_wglDXUnlockObjectsNV; PFNWGLDXREGISTEROBJECTNVPROC glad_wglDXRegisterObjectNV = NULL;
PFNWGLCOPYIMAGESUBDATANVPROC glad_wglCopyImageSubDataNV; PFNWGLDXUNREGISTEROBJECTNVPROC glad_wglDXUnregisterObjectNV = NULL;
PFNWGLDELAYBEFORESWAPNVPROC glad_wglDelayBeforeSwapNV; PFNWGLDXOBJECTACCESSNVPROC glad_wglDXObjectAccessNV = NULL;
PFNWGLENUMGPUSNVPROC glad_wglEnumGpusNV; PFNWGLDXLOCKOBJECTSNVPROC glad_wglDXLockObjectsNV = NULL;
PFNWGLENUMGPUDEVICESNVPROC glad_wglEnumGpuDevicesNV; PFNWGLDXUNLOCKOBJECTSNVPROC glad_wglDXUnlockObjectsNV = NULL;
PFNWGLCREATEAFFINITYDCNVPROC glad_wglCreateAffinityDCNV; PFNWGLCOPYIMAGESUBDATANVPROC glad_wglCopyImageSubDataNV = NULL;
PFNWGLENUMGPUSFROMAFFINITYDCNVPROC glad_wglEnumGpusFromAffinityDCNV; PFNWGLDELAYBEFORESWAPNVPROC glad_wglDelayBeforeSwapNV = NULL;
PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV; PFNWGLENUMGPUSNVPROC glad_wglEnumGpusNV = NULL;
PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV; PFNWGLENUMGPUDEVICESNVPROC glad_wglEnumGpuDevicesNV = NULL;
PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV; PFNWGLCREATEAFFINITYDCNVPROC glad_wglCreateAffinityDCNV = NULL;
PFNWGLQUERYCURRENTCONTEXTNVPROC glad_wglQueryCurrentContextNV; PFNWGLENUMGPUSFROMAFFINITYDCNVPROC glad_wglEnumGpusFromAffinityDCNV = NULL;
PFNWGLJOINSWAPGROUPNVPROC glad_wglJoinSwapGroupNV; PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV = NULL;
PFNWGLBINDSWAPBARRIERNVPROC glad_wglBindSwapBarrierNV; PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV = NULL;
PFNWGLQUERYSWAPGROUPNVPROC glad_wglQuerySwapGroupNV; PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV = NULL;
PFNWGLQUERYMAXSWAPGROUPSNVPROC glad_wglQueryMaxSwapGroupsNV; PFNWGLQUERYCURRENTCONTEXTNVPROC glad_wglQueryCurrentContextNV = NULL;
PFNWGLQUERYFRAMECOUNTNVPROC glad_wglQueryFrameCountNV; PFNWGLJOINSWAPGROUPNVPROC glad_wglJoinSwapGroupNV = NULL;
PFNWGLRESETFRAMECOUNTNVPROC glad_wglResetFrameCountNV; PFNWGLBINDSWAPBARRIERNVPROC glad_wglBindSwapBarrierNV = NULL;
PFNWGLALLOCATEMEMORYNVPROC glad_wglAllocateMemoryNV; PFNWGLQUERYSWAPGROUPNVPROC glad_wglQuerySwapGroupNV = NULL;
PFNWGLFREEMEMORYNVPROC glad_wglFreeMemoryNV; PFNWGLQUERYMAXSWAPGROUPSNVPROC glad_wglQueryMaxSwapGroupsNV = NULL;
PFNWGLBINDVIDEOCAPTUREDEVICENVPROC glad_wglBindVideoCaptureDeviceNV; PFNWGLQUERYFRAMECOUNTNVPROC glad_wglQueryFrameCountNV = NULL;
PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_wglEnumerateVideoCaptureDevicesNV; PFNWGLRESETFRAMECOUNTNVPROC glad_wglResetFrameCountNV = NULL;
PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC glad_wglLockVideoCaptureDeviceNV; PFNWGLALLOCATEMEMORYNVPROC glad_wglAllocateMemoryNV = NULL;
PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC glad_wglQueryVideoCaptureDeviceNV; PFNWGLFREEMEMORYNVPROC glad_wglFreeMemoryNV = NULL;
PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC glad_wglReleaseVideoCaptureDeviceNV; PFNWGLBINDVIDEOCAPTUREDEVICENVPROC glad_wglBindVideoCaptureDeviceNV = NULL;
PFNWGLGETVIDEODEVICENVPROC glad_wglGetVideoDeviceNV; PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_wglEnumerateVideoCaptureDevicesNV = NULL;
PFNWGLRELEASEVIDEODEVICENVPROC glad_wglReleaseVideoDeviceNV; PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC glad_wglLockVideoCaptureDeviceNV = NULL;
PFNWGLBINDVIDEOIMAGENVPROC glad_wglBindVideoImageNV; PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC glad_wglQueryVideoCaptureDeviceNV = NULL;
PFNWGLRELEASEVIDEOIMAGENVPROC glad_wglReleaseVideoImageNV; PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC glad_wglReleaseVideoCaptureDeviceNV = NULL;
PFNWGLSENDPBUFFERTOVIDEONVPROC glad_wglSendPbufferToVideoNV; PFNWGLGETVIDEODEVICENVPROC glad_wglGetVideoDeviceNV = NULL;
PFNWGLGETVIDEOINFONVPROC glad_wglGetVideoInfoNV; PFNWGLRELEASEVIDEODEVICENVPROC glad_wglReleaseVideoDeviceNV = NULL;
PFNWGLGETSYNCVALUESOMLPROC glad_wglGetSyncValuesOML; PFNWGLBINDVIDEOIMAGENVPROC glad_wglBindVideoImageNV = NULL;
PFNWGLGETMSCRATEOMLPROC glad_wglGetMscRateOML; PFNWGLRELEASEVIDEOIMAGENVPROC glad_wglReleaseVideoImageNV = NULL;
PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML; PFNWGLSENDPBUFFERTOVIDEONVPROC glad_wglSendPbufferToVideoNV = NULL;
PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML; PFNWGLGETVIDEOINFONVPROC glad_wglGetVideoInfoNV = NULL;
PFNWGLWAITFORMSCOMLPROC glad_wglWaitForMscOML; PFNWGLGETSYNCVALUESOMLPROC glad_wglGetSyncValuesOML = NULL;
PFNWGLWAITFORSBCOMLPROC glad_wglWaitForSbcOML; PFNWGLGETMSCRATEOMLPROC glad_wglGetMscRateOML = NULL;
PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML = NULL;
PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML = NULL;
PFNWGLWAITFORMSCOMLPROC glad_wglWaitForMscOML = NULL;
PFNWGLWAITFORSBCOMLPROC glad_wglWaitForSbcOML = NULL;
static void load_WGL_3DL_stereo_control(GLADloadproc load) { static void load_WGL_3DL_stereo_control(GLADloadproc load) {
if(!GLAD_WGL_3DL_stereo_control) return; if(!GLAD_WGL_3DL_stereo_control) return;
glad_wglSetStereoEmitterState3DL = (PFNWGLSETSTEREOEMITTERSTATE3DLPROC)load("wglSetStereoEmitterState3DL"); glad_wglSetStereoEmitterState3DL = (PFNWGLSETSTEREOEMITTERSTATE3DLPROC)load("wglSetStereoEmitterState3DL");
@ -619,6 +651,7 @@ static int find_extensionsWGL(void) {
GLAD_WGL_ARB_buffer_region = has_ext("WGL_ARB_buffer_region"); GLAD_WGL_ARB_buffer_region = has_ext("WGL_ARB_buffer_region");
GLAD_WGL_ARB_context_flush_control = has_ext("WGL_ARB_context_flush_control"); GLAD_WGL_ARB_context_flush_control = has_ext("WGL_ARB_context_flush_control");
GLAD_WGL_ARB_create_context = has_ext("WGL_ARB_create_context"); GLAD_WGL_ARB_create_context = has_ext("WGL_ARB_create_context");
GLAD_WGL_ARB_create_context_no_error = has_ext("WGL_ARB_create_context_no_error");
GLAD_WGL_ARB_create_context_profile = has_ext("WGL_ARB_create_context_profile"); GLAD_WGL_ARB_create_context_profile = has_ext("WGL_ARB_create_context_profile");
GLAD_WGL_ARB_create_context_robustness = has_ext("WGL_ARB_create_context_robustness"); GLAD_WGL_ARB_create_context_robustness = has_ext("WGL_ARB_create_context_robustness");
GLAD_WGL_ARB_extensions_string = has_ext("WGL_ARB_extensions_string"); GLAD_WGL_ARB_extensions_string = has_ext("WGL_ARB_extensions_string");
@ -632,6 +665,8 @@ static int find_extensionsWGL(void) {
GLAD_WGL_ARB_robustness_application_isolation = has_ext("WGL_ARB_robustness_application_isolation"); GLAD_WGL_ARB_robustness_application_isolation = has_ext("WGL_ARB_robustness_application_isolation");
GLAD_WGL_ARB_robustness_share_group_isolation = has_ext("WGL_ARB_robustness_share_group_isolation"); GLAD_WGL_ARB_robustness_share_group_isolation = has_ext("WGL_ARB_robustness_share_group_isolation");
GLAD_WGL_ATI_pixel_format_float = has_ext("WGL_ATI_pixel_format_float"); GLAD_WGL_ATI_pixel_format_float = has_ext("WGL_ATI_pixel_format_float");
GLAD_WGL_ATI_render_texture_rectangle = has_ext("WGL_ATI_render_texture_rectangle");
GLAD_WGL_EXT_colorspace = has_ext("WGL_EXT_colorspace");
GLAD_WGL_EXT_create_context_es2_profile = has_ext("WGL_EXT_create_context_es2_profile"); GLAD_WGL_EXT_create_context_es2_profile = has_ext("WGL_EXT_create_context_es2_profile");
GLAD_WGL_EXT_create_context_es_profile = has_ext("WGL_EXT_create_context_es_profile"); GLAD_WGL_EXT_create_context_es_profile = has_ext("WGL_EXT_create_context_es_profile");
GLAD_WGL_EXT_depth_float = has_ext("WGL_EXT_depth_float"); GLAD_WGL_EXT_depth_float = has_ext("WGL_EXT_depth_float");
@ -657,6 +692,7 @@ static int find_extensionsWGL(void) {
GLAD_WGL_NV_delay_before_swap = has_ext("WGL_NV_delay_before_swap"); GLAD_WGL_NV_delay_before_swap = has_ext("WGL_NV_delay_before_swap");
GLAD_WGL_NV_float_buffer = has_ext("WGL_NV_float_buffer"); GLAD_WGL_NV_float_buffer = has_ext("WGL_NV_float_buffer");
GLAD_WGL_NV_gpu_affinity = has_ext("WGL_NV_gpu_affinity"); GLAD_WGL_NV_gpu_affinity = has_ext("WGL_NV_gpu_affinity");
GLAD_WGL_NV_multigpu_context = has_ext("WGL_NV_multigpu_context");
GLAD_WGL_NV_multisample_coverage = has_ext("WGL_NV_multisample_coverage"); GLAD_WGL_NV_multisample_coverage = has_ext("WGL_NV_multisample_coverage");
GLAD_WGL_NV_present_video = has_ext("WGL_NV_present_video"); GLAD_WGL_NV_present_video = has_ext("WGL_NV_present_video");
GLAD_WGL_NV_render_depth_texture = has_ext("WGL_NV_render_depth_texture"); GLAD_WGL_NV_render_depth_texture = has_ext("WGL_NV_render_depth_texture");

View file

@ -20,6 +20,7 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \ $(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \ $(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \ $(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \ $(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
@ -31,11 +32,13 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \ $(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
$(LOCAL_PATH)/src/joystick/steam/SDL_steamcontroller.c \ $(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \ $(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/*.c) \ $(wildcard $(LOCAL_PATH)/src/power/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/sensor/*.c) \
$(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*.c) \ $(wildcard $(LOCAL_PATH)/src/render/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \ $(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \ $(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
@ -48,10 +51,32 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \ $(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
$(wildcard $(LOCAL_PATH)/src/test/*.c)) $(wildcard $(LOCAL_PATH)/src/test/*.c))
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES LOCAL_SHARED_LIBRARIES := hidapi
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
cmd-strip := LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_CFLAGS += \
-Wall -Wextra \
-Wdocumentation \
-Wdocumentation-unknown-command \
-Wmissing-prototypes \
-Wunreachable-code-break \
-Wunneeded-internal-declaration \
-Wmissing-variable-declarations \
-Wfloat-conversion \
-Wshorten-64-to-32 \
-Wunreachable-code-return
# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
ifeq ($(NDK_DEBUG),1)
cmd-strip :=
endif
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
@ -86,4 +111,22 @@ LOCAL_MODULE_FILENAME := libSDL2main
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
###########################
#
# hidapi library
#
###########################
include $(CLEAR_VARS)
LOCAL_CPPFLAGS += -std=c++11
LOCAL_SRC_FILES := src/hidapi/android/hid.cpp
LOCAL_MODULE := libhidapi
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/cpufeatures)

View file

@ -3,7 +3,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif() endif()
cmake_minimum_required(VERSION 2.8.11) cmake_minimum_required(VERSION 2.8.11)
project(SDL2 C) project(SDL2 C CXX)
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
# !!! FIXME: for the SDL2 shared library (so you get an # !!! FIXME: for the SDL2 shared library (so you get an
@ -42,10 +42,13 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0. # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
set(SDL_MAJOR_VERSION 2) set(SDL_MAJOR_VERSION 2)
set(SDL_MINOR_VERSION 0) set(SDL_MINOR_VERSION 0)
set(SDL_MICRO_VERSION 8) set(SDL_MICRO_VERSION 10)
set(SDL_INTERFACE_AGE 0) set(SDL_INTERFACE_AGE 0)
set(SDL_BINARY_AGE 8) set(SDL_BINARY_AGE 10)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}") set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
# the following should match the versions in Xcode project file:
set(DYLIB_CURRENT_VERSION 10.0.0)
set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
# Set defaults preventing destination file conflicts # Set defaults preventing destination file conflicts
set(SDL_CMAKE_DEBUG_POSTFIX "d" set(SDL_CMAKE_DEBUG_POSTFIX "d"
@ -61,7 +64,7 @@ set(LT_REVISION "${SDL_INTERFACE_AGE}")
set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}") set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}") set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}")
message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}") #message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")
# General settings & flags # General settings & flags
set(LIBRARY_OUTPUT_DIRECTORY "build") set(LIBRARY_OUTPUT_DIRECTORY "build")
@ -152,6 +155,20 @@ if(UNIX OR MINGW OR MSYS)
set(OPT_DEF_LIBC ON) set(OPT_DEF_LIBC ON)
endif() endif()
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
# so we'll just use libusb when it's available. Except that libusb
# requires root permissions to open devices, so that's not generally
# useful, and we'll disable this by default on Unix. Windows and macOS
# can use it without root access, though, so enable by default there.
if(WINDOWS OR APPLE OR ANDROID)
set(HIDAPI_SKIP_LIBUSB TRUE)
else()
set(HIDAPI_SKIP_LIBUSB FALSE)
endif()
if (HIDAPI_SKIP_LIBUSB)
set(OPT_DEF_HIDAPI ON)
endif()
# Compiler info # Compiler info
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
set(USE_GCC TRUE) set(USE_GCC TRUE)
@ -210,8 +227,14 @@ endif()
set(SDL_LIBS "-lSDL2") set(SDL_LIBS "-lSDL2")
set(SDL_CFLAGS "") set(SDL_CFLAGS "")
# Emscripten toolchain has a nonempty default value for this, and the checks # When building shared lib for Windows with MinGW,
# in this file need to change that, so remember the original value, and # avoid the DLL having a "lib" prefix
if(WINDOWS)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
endif()
# Emscripten toolchain has a nonempty default value for this, and the checks
# in this file need to change that, so remember the original value, and
# restore back to that afterwards. For check_function_exists() to work in # restore back to that afterwards. For check_function_exists() to work in
# Emscripten, this value must be at its default value. # Emscripten, this value must be at its default value.
set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
@ -244,7 +267,7 @@ endif()
set(OPT_DEF_ASM TRUE) set(OPT_DEF_ASM TRUE)
if(EMSCRIPTEN) if(EMSCRIPTEN)
# Set up default values for the currently supported set of subsystems: # Set up default values for the currently supported set of subsystems:
# Emscripten/Javascript does not have assembly support, a dynamic library # Emscripten/Javascript does not have assembly support, a dynamic library
# loading architecture, low-level CPU inspection or multithreading. # loading architecture, low-level CPU inspection or multithreading.
set(OPT_DEF_ASM FALSE) set(OPT_DEF_ASM FALSE)
set(SDL_SHARED_ENABLED_BY_DEFAULT OFF) set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
@ -255,13 +278,28 @@ if(EMSCRIPTEN)
set(SDL_DLOPEN_ENABLED_BY_DEFAULT OFF) set(SDL_DLOPEN_ENABLED_BY_DEFAULT OFF)
endif() endif()
# When defined, respect CMake's BUILD_SHARED_LIBS setting:
set(SDL_STATIC_ENABLED_BY_DEFAULT ON)
if (NOT DEFINED SDL_SHARED_ENABLED_BY_DEFAULT) if (NOT DEFINED SDL_SHARED_ENABLED_BY_DEFAULT)
# ...unless decided already (as for EMSCRIPTEN)
set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
if (NOT DEFINED BUILD_SHARED_LIBS)
# No preference? Build both, just like the AC/AM configure
set(SDL_SHARED_ENABLED_BY_DEFAULT ON) set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
elseif (BUILD_SHARED_LIBS)
# In this case, we assume the user wants a shared lib and don't build
# the static one
set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
set(SDL_STATIC_ENABLED_BY_DEFAULT OFF)
endif()
endif() endif()
set(SDL_SUBSYSTEMS set(SDL_SUBSYSTEMS
Atomic Audio Video Render Events Joystick Haptic Power Threads Timers Atomic Audio Video Render Events Joystick Haptic Power Threads Timers
File Loadso CPUinfo Filesystem Dlopen) File Loadso CPUinfo Filesystem Dlopen Sensor)
foreach(_SUB ${SDL_SUBSYSTEMS}) foreach(_SUB ${SDL_SUBSYSTEMS})
string(TOUPPER ${_SUB} _OPT) string(TOUPPER ${_SUB} _OPT)
if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT) if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT)
@ -317,8 +355,6 @@ set_option(VIDEO_X11 "Use X11 video driver" ${UNIX_SYS})
set_option(VIDEO_WAYLAND "Use Wayland video driver" ${UNIX_SYS}) set_option(VIDEO_WAYLAND "Use Wayland video driver" ${UNIX_SYS})
dep_option(WAYLAND_SHARED "Dynamically load Wayland support" ON "VIDEO_WAYLAND" OFF) dep_option(WAYLAND_SHARED "Dynamically load Wayland support" ON "VIDEO_WAYLAND" OFF)
dep_option(VIDEO_WAYLAND_QT_TOUCH "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF) dep_option(VIDEO_WAYLAND_QT_TOUCH "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF)
set_option(VIDEO_MIR "Use Mir video driver" ${UNIX_SYS})
dep_option(MIR_SHARED "Dynamically load Mir support" ON "VIDEO_MIR" OFF)
set_option(VIDEO_RPI "Use Raspberry Pi video driver" ${UNIX_SYS}) set_option(VIDEO_RPI "Use Raspberry Pi video driver" ${UNIX_SYS})
dep_option(X11_SHARED "Dynamically load X11 support" ON "VIDEO_X11" OFF) dep_option(X11_SHARED "Dynamically load X11 support" ON "VIDEO_X11" OFF)
set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm) set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm)
@ -328,16 +364,18 @@ foreach(_SUB ${SDL_X11_OPTIONS})
endforeach() endforeach()
set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE}) set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE})
set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS}) set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS})
set_option(WASAPI "Use the Windows WASAPI audio driver" ${WINDOWS})
set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS}) set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS})
set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS}) set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS})
dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF) dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
set_option(VIDEO_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS}) set_option(VIDEO_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS})
dep_option(KMSDRM_SHARED "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF) dep_option(KMSDRM_SHARED "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF)
option_string(BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" "OFF")
option_string(FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" "OFF")
set_option(HIDAPI "Use HIDAPI for low level joystick drivers" ${OPT_DEF_HIDAPI})
# TODO: We should (should we?) respect cmake's ${BUILD_SHARED_LIBS} flag here
# The options below are for compatibility to configure's default behaviour.
set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library") set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library")
set(SDL_STATIC ON CACHE BOOL "Build a static version of the library") set(SDL_STATIC ${SDL_STATIC_ENABLED_BY_DEFAULT} CACHE BOOL "Build a static version of the library")
dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF) dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF)
set_option(SDL_TEST "Build the test directory" OFF) set_option(SDL_TEST "Build the test directory" OFF)
@ -376,6 +414,14 @@ else()
endif() endif()
set(HAVE_ASSERTIONS ${ASSERTIONS}) set(HAVE_ASSERTIONS ${ASSERTIONS})
if(NOT BACKGROUNDING_SIGNAL STREQUAL "OFF")
add_definitions("-DSDL_BACKGROUNDING_SIGNAL=${BACKGROUNDING_SIGNAL}")
endif()
if(NOT FOREGROUNDING_SIGNAL STREQUAL "OFF")
add_definitions("-DSDL_FOREGROUNDING_SIGNAL=${FOREGROUNDING_SIGNAL}")
endif()
# Compiler option evaluation # Compiler option evaluation
if(USE_GCC OR USE_CLANG) if(USE_GCC OR USE_CLANG)
# Check for -Wall first, so later things can override pieces of it. # Check for -Wall first, so later things can override pieces of it.
@ -387,6 +433,11 @@ if(USE_GCC OR USE_CLANG)
endif() endif()
endif() endif()
check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
if(HAVE_GCC_NO_STRICT_ALIASING)
list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
endif()
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT) check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT) if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT) check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT)
@ -444,6 +495,8 @@ if(USE_GCC OR USE_CLANG)
if(APPLE) if(APPLE)
list(APPEND EXTRA_LDFLAGS "-Wl,-undefined,error") list(APPEND EXTRA_LDFLAGS "-Wl,-undefined,error")
list(APPEND EXTRA_LDFLAGS "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}")
list(APPEND EXTRA_LDFLAGS "-Wl,-current_version,${DYLIB_CURRENT_VERSION}")
else() else()
set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined") set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
check_c_compiler_flag("" HAVE_NO_UNDEFINED) check_c_compiler_flag("" HAVE_NO_UNDEFINED)
@ -643,7 +696,7 @@ if(LIBC)
_ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp _ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
_stricmp _strnicmp sscanf _stricmp _strnicmp sscanf
acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf
copysign copysignf cos cosf fabs fabsf floor floorf fmod fmodf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf
log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf) log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
string(TOUPPER ${_FN} _UPPER) string(TOUPPER ${_FN} _UPPER)
set(HAVE_${_UPPER} 1) set(HAVE_${_UPPER} 1)
@ -679,7 +732,7 @@ if(LIBC)
_uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
nanosleep sysconf sysctlbyname getauxval poll nanosleep sysconf sysctlbyname getauxval poll _Exit
) )
string(TOUPPER ${_FN} _UPPER) string(TOUPPER ${_FN} _UPPER)
set(_HAVEVAR "HAVE_${_UPPER}") set(_HAVEVAR "HAVE_${_UPPER}")
@ -743,11 +796,15 @@ if(SDL_HAPTIC)
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/*.c) file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
endif() endif()
if(SDL_SENSOR)
file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES})
endif()
if(SDL_POWER) if(SDL_POWER)
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c) file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
endif() endif()
# TODO: in configure.in, the test for LOADSO and SDL_DLOPEN is a bit weird: # TODO: in configure.ac, the test for LOADSO and SDL_DLOPEN is a bit weird:
# if LOADSO is not wanted, SDL_LOADSO_DISABLED is set # if LOADSO is not wanted, SDL_LOADSO_DISABLED is set
# If however on Unix or APPLE dlopen() is detected via CheckDLOPEN(), # If however on Unix or APPLE dlopen() is detected via CheckDLOPEN(),
# SDL_LOADSO_DISABLED will not be set, regardless of the LOADSO settings # SDL_LOADSO_DISABLED will not be set, regardless of the LOADSO settings
@ -786,6 +843,7 @@ if(SDL_VIDEO)
endif() endif()
endif() endif()
# Platform-specific options and settings
if(ANDROID) if(ANDROID)
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c) file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
@ -821,6 +879,7 @@ if(ANDROID)
set(HAVE_SDL_HAPTIC TRUE) set(HAVE_SDL_HAPTIC TRUE)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
CheckHIDAPI()
set(SDL_JOYSTICK_ANDROID 1) set(SDL_JOYSTICK_ANDROID 1)
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c) file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES})
@ -844,6 +903,12 @@ if(ANDROID)
set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif() endif()
if(SDL_SENSOR)
set(SDL_SENSOR_ANDROID 1)
set(HAVE_SDL_SENSORS TRUE)
file(GLOB ANDROID_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_SENSOR_SOURCES})
endif()
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_ANDROID 1) set(SDL_VIDEO_DRIVER_ANDROID 1)
file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c) file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
@ -861,6 +926,8 @@ if(ANDROID)
if(VIDEO_OPENGLES) if(VIDEO_OPENGLES)
set(SDL_VIDEO_OPENGL_EGL 1) set(SDL_VIDEO_OPENGL_EGL 1)
set(HAVE_VIDEO_OPENGLES TRUE) set(HAVE_VIDEO_OPENGLES TRUE)
set(SDL_VIDEO_OPENGL_ES 1)
set(SDL_VIDEO_RENDER_OGL_ES 1)
set(SDL_VIDEO_OPENGL_ES2 1) set(SDL_VIDEO_OPENGL_ES2 1)
set(SDL_VIDEO_RENDER_OGL_ES2 1) set(SDL_VIDEO_RENDER_OGL_ES2 1)
@ -886,10 +953,7 @@ if(ANDROID)
CheckPTHREAD() CheckPTHREAD()
endif() elseif(EMSCRIPTEN)
# Platform-specific options and settings
if(EMSCRIPTEN)
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new # Hide noisy warnings that intend to aid mostly during initial stages of porting a new
# project. Uncomment at will for verbose cross-compiling -I/../ path info. # project. Uncomment at will for verbose cross-compiling -I/../ path info.
add_definitions(-Wno-warn-absolute-paths) add_definitions(-Wno-warn-absolute-paths)
@ -941,6 +1005,7 @@ if(EMSCRIPTEN)
set(SDL_VIDEO_RENDER_OGL_ES2 1) set(SDL_VIDEO_RENDER_OGL_ES2 1)
endif() endif()
endif() endif()
elseif(UNIX AND NOT APPLE AND NOT ANDROID) elseif(UNIX AND NOT APPLE AND NOT ANDROID)
if(SDL_AUDIO) if(SDL_AUDIO)
if(SYSV5 OR SOLARIS OR HPUX) if(SYSV5 OR SOLARIS OR HPUX)
@ -975,7 +1040,6 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
# Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails! # Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails!
CheckRPI() CheckRPI()
CheckX11() CheckX11()
CheckMir()
CheckDirectFB() CheckDirectFB()
CheckOpenGLX11() CheckOpenGLX11()
CheckOpenGLESX11() CheckOpenGLESX11()
@ -1001,7 +1065,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
#include <linux/kd.h> #include <linux/kd.h>
#include <linux/keyboard.h> #include <linux/keyboard.h>
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
struct kbentry kbe; struct kbentry kbe;
kbe.kb_table = KG_CTRL; kbe.kb_table = KG_CTRL;
@ -1042,6 +1106,12 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
include_directories(${IBUS_INCLUDE_DIRS}) include_directories(${IBUS_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES}) list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES})
endif() endif()
if(HAVE_LIBUNWIND_H)
# We've already found the header, so REQUIRE the lib to be present
pkg_search_module(UNWIND REQUIRED libunwind)
pkg_search_module(UNWIND_GENERIC REQUIRED libunwind-generic)
list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES})
endif()
endif() endif()
check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H) check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H)
@ -1059,6 +1129,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only? CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
CheckHIDAPI()
if(LINUX AND NOT ANDROID) if(LINUX AND NOT ANDROID)
set(SDL_JOYSTICK_LINUX 1) set(SDL_JOYSTICK_LINUX 1)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c) file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
@ -1183,8 +1254,6 @@ elseif(WINDOWS)
check_include_file(ddraw.h HAVE_DDRAW_H) check_include_file(ddraw.h HAVE_DDRAW_H)
check_include_file(dsound.h HAVE_DSOUND_H) check_include_file(dsound.h HAVE_DSOUND_H)
check_include_file(dinput.h HAVE_DINPUT_H) check_include_file(dinput.h HAVE_DINPUT_H)
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
check_include_file(dxgi.h HAVE_DXGI_H) check_include_file(dxgi.h HAVE_DXGI_H)
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H) if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
set(HAVE_DIRECTX TRUE) set(HAVE_DIRECTX TRUE)
@ -1197,6 +1266,11 @@ elseif(WINDOWS)
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
endif() endif()
# headers needed elsewhere ...
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
if(SDL_AUDIO) if(SDL_AUDIO)
set(SDL_AUDIO_DRIVER_WINMM 1) set(SDL_AUDIO_DRIVER_WINMM 1)
file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c) file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
@ -1209,7 +1283,7 @@ elseif(WINDOWS)
set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
endif() endif()
if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H) if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
set(SDL_AUDIO_DRIVER_WASAPI 1) set(SDL_AUDIO_DRIVER_WASAPI 1)
file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c) file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
@ -1261,9 +1335,9 @@ elseif(WINDOWS)
endif() endif()
# Libraries for Win32 native and MinGW # Libraries for Win32 native and MinGW
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid) list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
# TODO: in configure.in the check for timers is set on # TODO: in configure.ac the check for timers is set on
# cygwin | mingw32* - does this include mingw32CE? # cygwin | mingw32* - does this include mingw32CE?
if(SDL_TIMERS) if(SDL_TIMERS)
set(SDL_TIMER_WINDOWS 1) set(SDL_TIMER_WINDOWS 1)
@ -1299,6 +1373,10 @@ elseif(WINDOWS)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
CheckHIDAPI()
if(HAVE_HIDAPI)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/windows/hid.c)
endif()
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/windows/*.c) file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
if(HAVE_DINPUT_H) if(HAVE_DINPUT_H)
@ -1344,6 +1422,7 @@ elseif(WINDOWS)
set(SDL_CFLAGS "${SDL_CFLAGS} -Dmain=SDL_main") set(SDL_CFLAGS "${SDL_CFLAGS} -Dmain=SDL_main")
list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows") list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows")
endif() endif()
elseif(APPLE) elseif(APPLE)
# TODO: rework this all for proper MacOS X, iOS and Darwin support # TODO: rework this all for proper MacOS X, iOS and Darwin support
@ -1381,6 +1460,14 @@ elseif(APPLE)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
CheckHIDAPI()
if(HAVE_HIDAPI)
if(IOS)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
else()
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/mac/hid.c)
endif()
endif()
set(SDL_JOYSTICK_IOKIT 1) set(SDL_JOYSTICK_IOKIT 1)
if (IOS) if (IOS)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c) file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
@ -1493,6 +1580,7 @@ elseif(APPLE)
endif() endif()
CheckPTHREAD() CheckPTHREAD()
elseif(HAIKU) elseif(HAIKU)
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_HAIKU 1) set(SDL_VIDEO_DRIVER_HAIKU 1)
@ -1527,10 +1615,11 @@ endif()
if(VIDEO_VULKAN) if(VIDEO_VULKAN)
set(SDL_VIDEO_VULKAN 1) set(SDL_VIDEO_VULKAN 1)
set(HAVE_VIDEO_VULKAN TRUE)
endif() endif()
# Dummies # Dummies
# configure.in does it differently: # configure.ac does it differently:
# if not have X # if not have X
# if enable_X { SDL_X_DISABLED = 1 } # if enable_X { SDL_X_DISABLED = 1 }
# [add dummy sources] # [add dummy sources]
@ -1538,7 +1627,7 @@ endif()
# This leads to missing internal references on building, since the # This leads to missing internal references on building, since the
# src/X/*.c does not get included. # src/X/*.c does not get included.
if(NOT HAVE_SDL_JOYSTICK) if(NOT HAVE_SDL_JOYSTICK)
set(SDL_JOYSTICK_DISABLED 1) set(SDL_JOYSTICK_DUMMY 1)
if(SDL_JOYSTICK AND NOT APPLE) # results in unresolved symbols on OSX if(SDL_JOYSTICK AND NOT APPLE) # results in unresolved symbols on OSX
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/dummy/*.c) file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/dummy/*.c)
@ -1546,10 +1635,15 @@ if(NOT HAVE_SDL_JOYSTICK)
endif() endif()
endif() endif()
if(NOT HAVE_SDL_HAPTIC) if(NOT HAVE_SDL_HAPTIC)
set(SDL_HAPTIC_DISABLED 1) set(SDL_HAPTIC_DUMMY 1)
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c) file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
endif() endif()
if(NOT HAVE_SDL_SENSORS)
set(SDL_SENSOR_DUMMY 1)
file(GLOB SENSORS_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/dummy/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${SENSORS_SOURCES})
endif()
if(NOT HAVE_SDL_LOADSO) if(NOT HAVE_SDL_LOADSO)
set(SDL_LOADSO_DISABLED 1) set(SDL_LOADSO_DISABLED 1)
file(GLOB LOADSO_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/dummy/*.c) file(GLOB LOADSO_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/dummy/*.c)
@ -1695,7 +1789,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
# Always build SDLmain # Always build SDLmain
add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>) target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
set(_INSTALL_LIBS "SDL2main") set(_INSTALL_LIBS "SDL2main")
if (NOT ANDROID) if (NOT ANDROID)
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
@ -1704,7 +1798,9 @@ endif()
if(SDL_SHARED) if(SDL_SHARED)
add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES}) add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
if(APPLE) if(APPLE)
set_target_properties(SDL2 PROPERTIES MACOSX_RPATH 1) set_target_properties(SDL2 PROPERTIES
MACOSX_RPATH 1
OUTPUT_NAME "SDL2-${LT_RELEASE}")
elseif(UNIX AND NOT ANDROID) elseif(UNIX AND NOT ANDROID)
set_target_properties(SDL2 PROPERTIES set_target_properties(SDL2 PROPERTIES
VERSION ${LT_VERSION} VERSION ${LT_VERSION}
@ -1723,13 +1819,30 @@ if(SDL_SHARED)
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
endif() endif()
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS}) set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) target_link_libraries(SDL2 PUBLIC ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include>) if(MSVC_VERSION GREATER_EQUAL 1920)
target_link_libraries(SDL2 PRIVATE optimized vcruntime)
endif()
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
if (NOT ANDROID) if (NOT ANDROID)
set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
endif() endif()
endif() endif()
if(ANDROID)
if(HAVE_HIDAPI)
add_library(hidapi SHARED ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
endif()
if(MSVC AND NOT LIBC)
# Don't try to link with the default set of libraries.
set_target_properties(hidapi PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
set_target_properties(hidapi PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
set_target_properties(hidapi PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
endif()
target_link_libraries(hidapi log)
endif()
if(SDL_STATIC) if(SDL_STATIC)
set (BUILD_SHARED_LIBS FALSE) set (BUILD_SHARED_LIBS FALSE)
add_library(SDL2-static STATIC ${SOURCE_FILES}) add_library(SDL2-static STATIC ${SOURCE_FILES})
@ -1750,7 +1863,7 @@ if(SDL_STATIC)
# libraries - do we need to consider this? # libraries - do we need to consider this?
set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS}) set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include>) target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
if (NOT ANDROID) if (NOT ANDROID)
set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
endif() endif()
@ -1761,7 +1874,7 @@ endif()
if(SDL_TEST) if(SDL_TEST)
file(GLOB TEST_SOURCES ${SDL2_SOURCE_DIR}/src/test/*.c) file(GLOB TEST_SOURCES ${SDL2_SOURCE_DIR}/src/test/*.c)
add_library(SDL2_test STATIC ${TEST_SOURCES}) add_library(SDL2_test STATIC ${TEST_SOURCES})
add_subdirectory(test) add_subdirectory(test)
endif() endif()
@ -1772,9 +1885,7 @@ install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets
RUNTIME DESTINATION bin) RUNTIME DESTINATION bin)
##### Export files ##### ##### Export files #####
if (APPLE) if (WINDOWS)
set(PKG_PREFIX "SDL2.framework/Resources")
elseif (WINDOWS)
set(PKG_PREFIX "cmake") set(PKG_PREFIX "cmake")
else () else ()
set(PKG_PREFIX "lib/cmake/SDL2") set(PKG_PREFIX "lib/cmake/SDL2")
@ -1808,18 +1919,23 @@ endforeach()
list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES}) list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES})
install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2) install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)
string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
if (UPPER_BUILD_TYPE MATCHES DEBUG)
set(SOPOSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
else()
set(SOPOSTFIX "")
endif()
if(NOT (WINDOWS OR CYGWIN)) if(NOT (WINDOWS OR CYGWIN))
if(SDL_SHARED) if(SDL_SHARED)
if (APPLE) set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc.
set(SOEXT "dylib") get_target_property(SONAME SDL2 OUTPUT_NAME)
else()
set(SOEXT "so")
endif()
if(NOT ANDROID) if(NOT ANDROID)
install(CODE " install(CODE "
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
\"libSDL2-2.0.${SOEXT}\" \"libSDL2.${SOEXT}\")") \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\"
install(FILES ${SDL2_BINARY_DIR}/libSDL2.${SOEXT} DESTINATION "lib${LIB_SUFFIX}") WORKING_DIRECTORY \"${SDL2_BINARY_DIR}\")")
install(FILES ${SDL2_BINARY_DIR}/libSDL2${SOPOSTFIX}${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
endif() endif()
endif() endif()
if(FREEBSD) if(FREEBSD)

View file

@ -1,6 +1,6 @@
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -44,7 +44,9 @@ SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
WAYLAND_SCANNER = @WAYLAND_SCANNER@ WAYLAND_SCANNER = @WAYLAND_SCANNER@
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
GEN_DIST = SDL2.spec GEN_DIST = SDL2.spec
ifneq ($V,1) ifneq ($V,1)
@ -101,6 +103,7 @@ HDRS = \
SDL_render.h \ SDL_render.h \
SDL_rwops.h \ SDL_rwops.h \
SDL_scancode.h \ SDL_scancode.h \
SDL_sensor.h \
SDL_shape.h \ SDL_shape.h \
SDL_stdinc.h \ SDL_stdinc.h \
SDL_surface.h \ SDL_surface.h \
@ -124,9 +127,9 @@ LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@ LT_REVISION = @LT_REVISION@
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET) all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/configure: $(srcdir)/configure.ac
@echo "Warning, configure is out of date, please re-run autogen.sh" @echo "Warning, configure is out of date, please re-run autogen.sh"
Makefile: $(srcdir)/Makefile.in Makefile: $(srcdir)/Makefile.in
@ -134,8 +137,9 @@ Makefile: $(srcdir)/Makefile.in
Makefile.in:; Makefile.in:;
$(objects): $(objects)/.created:
$(SHELL) $(auxdir)/mkinstalldirs $@ $(SHELL) $(auxdir)/mkinstalldirs $(objects)
touch $@
update-revision: update-revision:
$(SHELL) $(auxdir)/updaterev.sh $(SHELL) $(auxdir)/updaterev.sh
@ -153,8 +157,11 @@ $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
install: all install-bin install-hdrs install-lib install-data install: all install-bin install-hdrs install-lib install-data
install-bin: install-bin:
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir) $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config $(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
endif
install-hdrs: update-revision install-hdrs: update-revision
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2 $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
for file in $(HDRS) $(SDLTEST_HDRS); do \ for file in $(HDRS) $(SDLTEST_HDRS); do \
@ -177,8 +184,10 @@ install-data:
$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4 $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig $(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2 $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2 $(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
endif
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
uninstall-bin: uninstall-bin:

View file

@ -22,6 +22,8 @@ SOURCES = \
src/filesystem/dummy/*.c \ src/filesystem/dummy/*.c \
src/render/*.c \ src/render/*.c \
src/render/software/*.c \ src/render/software/*.c \
src/sensor/*.c \
src/sensor/dummy/*.c \
src/stdlib/*.c \ src/stdlib/*.c \
src/thread/*.c \ src/thread/*.c \
src/thread/generic/*.c \ src/thread/generic/*.c \

137
Engine/lib/sdl/Makefile.os2 Normal file
View file

@ -0,0 +1,137 @@
# Open Watcom makefile to build SDL2.dll for OS/2:
# wmake -f Makefile.os2
LIBNAME = SDL2
VERSION = 2.0.10
DESCRIPTION = Simple DirectMedia Layer 2
LIBHOME = .
LIBPATH = $(LIBHOME)/lib
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
LNKFILE = $(LIBNAME).lnk
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
INCPATH+= -I"$(LIBHOME)/h"
INCPATH+= -Iinclude
LIBM = libm.lib
LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
# max warnings:
CFLAGS+= -wx
# building dll:
CFLAGS+= -bd
# the include paths :
CFLAGS+= $(INCPATH)
# building SDL itself (for DECLSPEC):
CFLAGS+= -DBUILD_SDL
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
SRCS+= SDL_rwops.c SDL_power.c
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
SDL_sensor.c SDL_touch.c
SRCS+= SDL_haptic.c SDL_gamecontroller.c SDL_joystick.c
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
SDL_render_sw.c SDL_rotate.c
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
SRCS+= SDL_systimer.c
SRCS+= SDL_sysloadso.c
SRCS+= SDL_sysfilesystem.c
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
SRCS+= SDL_dummysensor.c
SRCS+= SDL_dynapi.c
OBJS = $(SRCS:.c=.obj)
MOBJS= $(MSRCS:.c=.obj)
.extensions:
.extensions: .lib .dll .obj .c .asm
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
.c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;
all: $(DLLFILE) $(LIBFILE) .symbolic
$(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
@echo * Linking: $@
wlink @$(LNKFILE)
$(LIBFILE): $(DLLFILE)
@echo * Creating LIB file: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
.c.obj:
wcc386 $(CFLAGS) -fo=$^@ $<
SDL_cpuinfo.obj: SDL_cpuinfo.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
SDL_rwops.obj: SDL_rwops.c
wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
SDL_blendfillrect.obj: SDL_blendfillrect.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
SDL_blendline.obj: SDL_blendline.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
SDL_blendpoint.obj: SDL_blendpoint.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
SDL_RLEaccel.obj: SDL_RLEaccel.c
wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
.c: ./src/libm;
$(LIBM): $(MOBJS)
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
$(LNKFILE):
@echo * Creating linker file: $@
@%create $@
@%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
@%append $@ NAME $(DLLFILE)
@for %i in ($(OBJS)) do @%append $@ FILE %i
@%append $@ LIBPATH $(%LIB);$(LIBPATH)
@for %i in ($(LIBS)) do @%append $@ LIB %i
@%append $@ OPTION QUIET
@%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp
@%append $@ OPTION MAP=$(LIBHOME)/$^&.map
@%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
@%append $@ OPTION QUIET
@%append $@ OPTION ELIMINATE
@%append $@ OPTION MANYAUTODATA
@%append $@ OPTION OSNAME='OS/2 and eComStation'
@%append $@ OPTION SHOWDEAD
clean: .SYMBOLIC
@ echo * Clean: $(LIBNAME)
@if exist *.obj rm *.obj
@if exist *.err rm *.err
@if exist $(LNKFILE) rm $(LNKFILE)
@if exist $(LIBM) rm $(LIBM)
distclean: .SYMBOLIC clean
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
@if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
@if exist $(LIBFILE) rm $(LIBFILE)
@if exist $(DLLFILE) rm $(DLLFILE)

View file

@ -12,15 +12,38 @@ CFLAGS = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp
TARGET = libSDL.a TARGET = libSDL.a
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \ SOURCES =
./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \ ./src/*.c \
./src/joystick/*.c ./src/haptic/*.c ./src/power/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \ ./src/atomic/*.c \
./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \ ./src/audio/*.c \
./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \ ./src/audio/disk/*.c \
./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \ ./src/audio/dsp/*.c \
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \ ./src/audio/dummy/*.c \
./src/atomic/*.c ./src/filesystem/unix/*.c \ ./src/cpuinfo/*.c \
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o ./src/video/x11/*.c ./src/events/*.c \
./src/file/*.c \
./src/filesystem/unix/*.c \
./src/haptic/*.c \
./src/haptic/linux/*.c \
./src/joystick/*.c \
./src/joystick/linux/*.c \
./src/loadso/dlopen/*.c \
./src/power/*.c \
./src/sensor/*.c \
./src/sensor/dummy/*.c \
./src/stdlib/*.c \
./src/thread/*.c \
./src/thread/pthread/SDL_syscond.c \
./src/thread/pthread/SDL_sysmutex.c \
./src/thread/pthread/SDL_syssem.c \
./src/thread/pthread/SDL_systhread.c \
./src/timer/*.c \
./src/timer/unix/*.c \
./src/video/*.c \
./src/video/dummy/*.c \
./src/video/pandora/SDL_pandora.o \
./src/video/pandora/SDL_pandora_events.o \
./src/video/x11/*.c \
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g') OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')

View file

@ -42,6 +42,8 @@ OBJS= src/SDL.o \
src/render/software/SDL_drawpoint.o \ src/render/software/SDL_drawpoint.o \
src/render/software/SDL_render_sw.o \ src/render/software/SDL_render_sw.o \
src/render/software/SDL_rotate.o \ src/render/software/SDL_rotate.o \
src/sensor/SDL_sensor.o \
src/sensor/dummy/SDL_dummysensor.o \
src/stdlib/SDL_getenv.o \ src/stdlib/SDL_getenv.o \
src/stdlib/SDL_iconv.o \ src/stdlib/SDL_iconv.o \
src/stdlib/SDL_malloc.o \ src/stdlib/SDL_malloc.o \

View file

@ -12,14 +12,33 @@ CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
TARGET_STATIC = libSDL2.a TARGET_STATIC = libSDL2.a
TARGET_SHARED = libSDL2.so TARGET_SHARED = libSDL2.so
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \ SOURCES = \
./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \ ./src/*.c \
./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \ ./src/audio/*.c \
./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \ ./src/audio/disk/*.c \
./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \ ./src/audio/dsp/*.c \
./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \ ./src/audio/dummy/*.c \
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \ ./src/cpuinfo/*.c \
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o ./src/events/*.c \
./src/file/*.c \
./src/haptic/*.c \
./src/haptic/linux/*.c \
./src/joystick/*.c \
./src/joystick/linux/*.c \
./src/loadso/dlopen/*.c \
./src/sensor/*.c \
./src/sensor/dummy/*.c \
./src/stdlib/*.c \
./src/thread/*.c \
./src/thread/pthread/SDL_syscond.c \
./src/thread/pthread/SDL_sysmutex.c \
./src/thread/pthread/SDL_syssem.c \
./src/thread/pthread/SDL_systhread.c \
./src/timer/*.c \
./src/timer/unix/*.c \
./src/video/*.c \
./src/video/dummy/*.c \
./src/video/pandora/*.c \
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g') OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')

View file

@ -1,6 +1,6 @@
Summary: Simple DirectMedia Layer Summary: Simple DirectMedia Layer
Name: SDL2 Name: SDL2
Version: 2.0.8 Version: 2.0.10
Release: 2 Release: 2
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
URL: http://www.libsdl.org/ URL: http://www.libsdl.org/
@ -74,7 +74,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lib*.la %{_libdir}/lib*.la
%{_libdir}/lib*.%{__soext} %{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h %{_includedir}/*/*.h
%{_libdir}/pkgconfig/* %{_libdir}/cmake/*
%{_libdir}/pkgconfig/SDL2/*
%{_datadir}/aclocal/* %{_datadir}/aclocal/*
%changelog %changelog

View file

@ -74,7 +74,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lib*.la %{_libdir}/lib*.la
%{_libdir}/lib*.%{__soext} %{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h %{_includedir}/*/*.h
%{_libdir}/pkgconfig/* %{_libdir}/cmake/*
%{_libdir}/pkgconfig/SDL2/*
%{_datadir}/aclocal/* %{_datadir}/aclocal/*
%changelog %changelog

View file

@ -0,0 +1,79 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_GCC_X86_CPUID(OP)
#
# DESCRIPTION
#
# On Pentium and later x86 processors, with gcc or a compiler that has a
# compatible syntax for inline assembly instructions, run a small program
# that executes the cpuid instruction with input OP. This can be used to
# detect the CPU type.
#
# On output, the values of the eax, ebx, ecx, and edx registers are stored
# as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable
# ax_cv_gcc_x86_cpuid_OP.
#
# If the cpuid instruction fails (because you are running a
# cross-compiler, or because you are not using gcc, or because you are on
# a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP
# is set to the string "unknown".
#
# This macro mainly exists to be used in AX_GCC_ARCHFLAG.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2008 Matteo Frigo
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 7
AC_DEFUN([AX_GCC_X86_CPUID],
[AC_REQUIRE([AC_PROG_CC])
AC_LANG_PUSH([C])
AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
int op = $1, eax, ebx, ecx, edx;
FILE *f;
__asm__("cpuid"
: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
: "a" (op));
f = fopen("conftest_cpuid", "w"); if (!f) return 1;
fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
fclose(f);
return 0;
])],
[ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
[ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
[ax_cv_gcc_x86_cpuid_$1=unknown])])
AC_LANG_POP([C])
])

View file

@ -0,0 +1,133 @@
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])# PKG_CHECK_MODULES

View file

@ -69,6 +69,6 @@ ndk-build \
NDK_LIBS_OUT=$lib \ NDK_LIBS_OUT=$lib \
APP_BUILD_SCRIPT=Android.mk \ APP_BUILD_SCRIPT=Android.mk \
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \ APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
APP_PLATFORM=android-14 \ APP_PLATFORM=android-16 \
APP_MODULES="SDL2 SDL2_main" \ APP_MODULES="SDL2 SDL2_main" \
$ndk_args $ndk_args

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2005-02-02.21 scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -35,42 +35,72 @@ scriptversion=2005-02-02.21
# FSF changes to this file are in the public domain. # FSF changes to this file are in the public domain.
# #
# Calling this script install-sh is preferred over install.sh, to prevent # Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it # 'make' implicit rules from creating a file called install from it
# when there is no Makefile. # when there is no Makefile.
# #
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction # from scratch.
# shared with many OS's install programs.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script # set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it. # Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}" doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# put in absolute paths if you don't have them in your path; or use env. vars. # Put in absolute file names if you don't have them in your path;
# or use environment vars.
mvprog="${MVPROG-mv}" chgrpprog=${CHGRPPROG-chgrp}
cpprog="${CPPROG-cp}" chmodprog=${CHMODPROG-chmod}
chmodprog="${CHMODPROG-chmod}" chownprog=${CHOWNPROG-chown}
chownprog="${CHOWNPROG-chown}" cmpprog=${CMPPROG-cmp}
chgrpprog="${CHGRPPROG-chgrp}" cpprog=${CPPROG-cp}
stripprog="${STRIPPROG-strip}" mkdirprog=${MKDIRPROG-mkdir}
rmprog="${RMPROG-rm}" mvprog=${MVPROG-mv}
mkdirprog="${MKDIRPROG-mkdir}" rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd= chgrpcmd=
stripcmd= chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f" rmcmd="$rmprog -f"
mvcmd="$mvprog" stripcmd=
src= src=
dst= dst=
dir_arg= dir_arg=
dstarg= dst_arg=
copy_on_change=false
no_target_directory= no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES... or: $0 [OPTION]... -d DIRECTORIES...
@ -80,108 +110,148 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES. In the 4th, create DIRECTORIES.
Options: Options:
-c (ignored) --help display this help and exit.
-d create directories instead of installing files. --version display version info and exit.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -c (ignored)
-o USER $chownprog installed files to USER. -C install only if different (preserve the last data modification time)
-s $stripprog installed files. -d create directories instead of installing files.
-t DIRECTORY install into DIRECTORY. -g GROUP $chgrpprog installed files to GROUP.
-T report an error if DSTFILE is a directory. -m MODE $chmodprog installed files to MODE.
--help display this help and exit. -o USER $chownprog installed files to USER.
--version display version info and exit. -s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
" "
while test -n "$1"; do while test $# -ne 0; do
case $1 in case $1 in
-c) shift -c) ;;
continue;;
-d) dir_arg=true -C) copy_on_change=true;;
shift
continue;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift shift;;
shift
continue;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2" -m) mode=$2
shift case $mode in
shift *' '* | *' '* | *'
continue;; '* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift shift;;
shift
continue;;
-s) stripcmd=$stripprog -s) stripcmd=$stripprog;;
shift
continue;;
-t) dstarg=$2 -t) dst_arg=$2
shift # Protect names problematic for 'test' and other utilities.
shift case $dst_arg in
continue;; -* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true -T) no_target_directory=true;;
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create. --) shift
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;; break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac esac
shift
done done
if test -z "$1"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2 echo "$0: no input file specified." >&2
exit 1 exit 1
fi fi
# It's OK to call `install-sh -d' without argument. # It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories. # This can happen when creating conditional directories.
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src for src
do do
# Protect names starting with `-'. # Protect names problematic for 'test' and other utilities.
case $src in case $src in
-*) src=./$src ;; -* | [=\(\)!]) src=./$src;;
esac esac
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
dst=$src dst=$src
src= dstdir=$dst
test -d "$dstdir"
if test -d "$dst"; then dstdir_status=$?
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad # might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'. # if $src (and thus $dsttmp) contains '*'.
@ -190,71 +260,194 @@ do
exit 1 exit 1
fi fi
if test -z "$dstarg"; then if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2 echo "$0: no destination specified." >&2
exit 1 exit 1
fi fi
dst=$dst_arg
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored. # if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dst=$dst/`basename "$src"` dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi fi
fi fi
# This sed command emulates the dirname command. obsolete_mkdir_used=false
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists. if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
# Skip lots of stat calls in the usual case. *[0-7])
if test ! -d "$dstdir"; then mkdir_umask=`expr $umask + 22 \
defaultIFS=' - $umask % 100 % 40 + $umask % 20 \
' - $umask % 10 % 4 + $umask % 2
IFS="${IFS-$defaultIFS}" `;;
*) mkdir_umask=$umask,go-w;;
esac
oIFS=$IFS # With -d, create the new directory with the user-specified mode.
# Some sh's can't handle IFS=/ for some reason. # Otherwise, rely on $mkdir_umask.
IFS='%' if test -n "$dir_arg"; then
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` mkdir_mode=-m$mode
shift else
IFS=$oIFS mkdir_mode=
fi
pathcomp= posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
while test $# -ne 0 ; do if (umask $mkdir_umask &&
pathcomp=$pathcomp$1 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift shift
if test ! -d "$pathcomp"; then $posix_glob set +f
$mkdirprog "$pathcomp" IFS=$oIFS
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This prefixes=
# is OK.
test -d "$pathcomp" || exit for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi fi
pathcomp=$pathcomp/ fi
done
fi fi
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=$dstdir/_inst.$$_
@ -262,10 +455,9 @@ do
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name. # Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" && (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -273,51 +465,63 @@ do
# ignore errors from any of these, just make sure not to ignore # ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command. # errors from the above "$doit $cpprog $src $dsttmp" command.
# #
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination. # If -C, don't bother to copy if it wouldn't change the file.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ if $copy_on_change &&
|| { old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
# The rename failed, perhaps because mv can't rename something else new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location. eval "$initialize_posix_glob" &&
# We try this two ways since rm can't unlink itself on some $posix_glob set -f &&
# systems and the destination file might be busy for other set X $old && old=:$2:$4:$5:$6 &&
# reasons. In this case, the final cleanup might fail but the new set X $new && new=:$2:$4:$5:$6 &&
# file should still install successfully. $posix_glob set +f &&
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination. test "$old" = "$new" &&
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile" $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
} then
} rm -f "$dsttmp"
fi || { (exit 1); exit 1; } else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$" # time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: # End:

View file

@ -1,29 +1,59 @@
#! /bin/sh #! /bin/sh
# mkinstalldirs --- make directory hierarchy # mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
scriptversion=2009-04-28.21; # UTC
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0 errstatus=0
dirmode="" dirmode=
usage="\ usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments # process command line arguments
while test $# -gt 0 ; do while test $# -gt 0 ; do
case "${1}" in case $1 in
-h | --help | --h* ) # -h for help -h | --help | --h*) # -h for help
echo "${usage}" 1>&2; exit 0 ;; echo "$usage"
-m ) # -m PERM arg exit $?
shift ;;
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } -m) # -m PERM arg
dirmode="${1}" shift
shift ;; test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-- ) shift; break ;; # stop option processing dirmode=$1
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option shift
* ) break ;; # first non-opt arg ;;
esac --version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done done
for file for file
@ -36,64 +66,97 @@ do
done done
case $# in case $# in
0) exit 0 ;; 0) exit 0 ;;
esac esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in case $dirmode in
'') '')
if mkdir -p -- . 2>/dev/null; then if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*" echo "mkdir -p -- $*"
exec mkdir -p -- "$@" exec mkdir -p -- "$@"
fi ;; else
*) # On NextStep and OpenStep, the 'mkdir' command does not
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then # recognize any option. It will interpret all options as
echo "mkdir -m $dirmode -p -- $*" # directories to create, and then abort because '.' already
exec mkdir -m "$dirmode" -p -- "$@" # exists.
fi ;; test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac esac
for file for file
do do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` case $file in
shift /*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
pathcomp= for d
for d do
do test "x$d" = x && continue
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then pathcomp=$pathcomp$d
echo "mkdir $pathcomp" case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
if test ! -d "$pathcomp"; then mkdir "$pathcomp" || lasterr=$?
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr="" if test ! -d "$pathcomp"; then
chmod "$dirmode" "$pathcomp" || lasterr=$? errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then if test ! -z "$lasterr"; then
errstatus=$lasterr errstatus=$lasterr
fi
fi fi
fi fi
fi fi
fi
pathcomp="$pathcomp/" pathcomp=$pathcomp/
done done
done done
exit $errstatus exit $errstatus
# Local Variables: # Local Variables:
# mode: shell-script # mode: shell-script
# sh-indentation: 3 # sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: # End:
# mkinstalldirs ends here

View file

@ -0,0 +1,42 @@
#!/bin/bash
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
# x86 Linux to OS/2, using OpenWatcom.
# The final zipfile can be unpacked on any machine that supports OpenWatcom
# (Windows, Linux, OS/2, etc). Point the compiler at the include directory
# and link against the SDL2.lib file. Ship the SDL2.dll with your app.
if [ -z "$WATCOM" ]; then
echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2
echo "This is often something like '/usr/local/share/watcom'" 1>&2
exit 1
fi
export PATH="$WATCOM/binl:$PATH"
ZIPFILE="$1"
if [ -z $1 ]; then
ZIPFILE=sdl-os2.zip
fi
ZIPDIR=SDL2-os2
set -e
set -x
cd `dirname "$0"`
cd ..
rm -f $ZIPFILE
wmake -f Makefile.os2
rm -rf $ZIPDIR
mkdir $ZIPDIR
chmod a+r SDL2.lib SDL2.dll
mv SDL2.lib SDL2.dll $ZIPDIR/
cp -R include $ZIPDIR/
zip -9r "$ZIPFILE" $ZIPDIR
wmake -f Makefile.os2 distclean
set +x
echo "All done. Final installable is in $ZIPFILE ...";

View file

@ -42,7 +42,7 @@ SYSROOT="/opt/rpi-sysroot"
export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib" export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib"
# -L$SYSROOT/usr/lib/arm-linux-gnueabihf" # -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
# !!! FIXME: shouldn't have to --disable-* things here. # !!! FIXME: shouldn't have to --disable-* things here.
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-wayland
$MAKE $MAKE
$MAKE install $MAKE install
# Fix up a few things to a real install path on a real Raspberry Pi... # Fix up a few things to a real install path on a real Raspberry Pi...

View file

@ -39,7 +39,7 @@
# #
# Base version of SDL, used for packaging purposes # Base version of SDL, used for packaging purposes
$SDLVersion = "2.0.7" $SDLVersion = "2.0.10"
# Gets the .bat file that sets up an MSBuild environment, given one of # Gets the .bat file that sets up an MSBuild environment, given one of
# Visual Studio's, "PlatformToolset"s. # Visual Studio's, "PlatformToolset"s.

View file

@ -381,9 +381,21 @@ macro(CheckX11)
FindLibraryAndSONAME("${_LIB}") FindLibraryAndSONAME("${_LIB}")
endforeach() endforeach()
find_path(X_INCLUDEDIR X11/Xlib.h) find_path(X_INCLUDEDIR X11/Xlib.h
/usr/pkg/xorg/include
/usr/X11R6/include
/usr/X11R7/include
/usr/local/include/X11
/usr/include/X11
/usr/openwin/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include
/opt/X11/include
)
if(X_INCLUDEDIR) if(X_INCLUDEDIR)
set(X_CFLAGS "-I${X_INCLUDEDIR}") list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}")
list(APPEND CMAKE_REQUIRED_INCLUDES "${X_INCLUDEDIR}")
endif() endif()
check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H) check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H)
@ -420,7 +432,7 @@ macro(CheckX11)
endif() endif()
if(NOT HAVE_SHMAT) if(NOT HAVE_SHMAT)
add_definitions(-DNO_SHARED_MEMORY) add_definitions(-DNO_SHARED_MEMORY)
set(X_CFLAGS "${X_CFLAGS} -DNO_SHARED_MEMORY") list(APPEND EXTRA_CFLAGS "-DNO_SHARED_MEMORY")
endif() endif()
endif() endif()
@ -439,8 +451,6 @@ macro(CheckX11)
endif() endif()
endif() endif()
set(SDL_CFLAGS "${SDL_CFLAGS} ${X_CFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB}) set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})
check_c_source_compiles(" check_c_source_compiles("
#include <X11/Xlib.h> #include <X11/Xlib.h>
@ -554,46 +564,6 @@ macro(CheckX11)
endif() endif()
endmacro() endmacro()
# Requires:
# - EGL
# - PkgCheckModules
# Optional:
# - MIR_SHARED opt
# - HAVE_DLOPEN opt
macro(CheckMir)
if(VIDEO_MIR)
find_library(MIR_LIB mirclient mircommon egl)
pkg_check_modules(MIR_TOOLKIT mirclient>=0.26 mircommon)
pkg_check_modules(EGL egl)
pkg_check_modules(XKB xkbcommon)
if (MIR_LIB AND MIR_TOOLKIT_FOUND AND EGL_FOUND AND XKB_FOUND)
set(HAVE_VIDEO_MIR TRUE)
set(HAVE_SDL_VIDEO TRUE)
file(GLOB MIR_SOURCES ${SDL2_SOURCE_DIR}/src/video/mir/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
set(SDL_VIDEO_DRIVER_MIR 1)
list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS})
if(MIR_SHARED)
if(NOT HAVE_DLOPEN)
message_warn("You must have SDL_LoadObject() support for dynamic Mir loading")
else()
FindLibraryAndSONAME(mirclient)
FindLibraryAndSONAME(xkbcommon)
set(SDL_VIDEO_DRIVER_MIR_DYNAMIC "\"${MIRCLIENT_LIB_SONAME}\"")
set(SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
set(HAVE_MIR_SHARED TRUE)
endif()
else()
set(EXTRA_LIBS ${MIR_TOOLKIT_LIBRARIES} ${EXTRA_LIBS})
endif()
endif()
endif()
endmacro()
macro(WaylandProtocolGen _SCANNER _XML _PROTL) macro(WaylandProtocolGen _SCANNER _XML _PROTL)
set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c") set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h") set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h")
@ -625,35 +595,6 @@ macro(CheckWayland)
if(VIDEO_WAYLAND) if(VIDEO_WAYLAND)
pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon) pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon)
# We have to generate some protocol interface code for some various Wayland features.
if(WAYLAND_FOUND)
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-client
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
RESULT_VARIABLE WAYLAND_CORE_PROTOCOL_DIR_RC
OUTPUT_VARIABLE WAYLAND_CORE_PROTOCOL_DIR
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT WAYLAND_CORE_PROTOCOL_DIR_RC EQUAL 0)
set(WAYLAND_FOUND FALSE)
endif()
endif()
if(WAYLAND_FOUND)
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
RESULT_VARIABLE WAYLAND_PROTOCOLS_DIR_RC
OUTPUT_VARIABLE WAYLAND_PROTOCOLS_DIR
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT WAYLAND_PROTOCOLS_DIR_RC EQUAL 0)
set(WAYLAND_FOUND FALSE)
endif()
endif()
if(WAYLAND_FOUND) if(WAYLAND_FOUND)
execute_process( execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner
@ -685,11 +626,10 @@ macro(CheckWayland)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols") file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
include_directories("${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols") include_directories("${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_CORE_PROTOCOL_DIR}/wayland.xml" "wayland") file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL2_SOURCE_DIR}/wayland-protocols/" "${SDL2_SOURCE_DIR}/wayland-protocols/*.xml")
foreach(_XML ${WAYLAND_PROTOCOLS_XML})
foreach(_PROTL relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6) string(REGEX REPLACE "\\.xml$" "" _PROTL "${_XML}")
string(REGEX REPLACE "\\-unstable\\-.*$" "" PROTSUBDIR ${_PROTL}) WaylandProtocolGen("${WAYLAND_SCANNER}" "${SDL2_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}")
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_PROTOCOLS_DIR}/unstable/${PROTSUBDIR}/${_PROTL}.xml" "${_PROTL}")
endforeach() endforeach()
if(VIDEO_WAYLAND_QT_TOUCH) if(VIDEO_WAYLAND_QT_TOUCH)
@ -1125,6 +1065,37 @@ macro(CheckUSBHID)
endif() endif()
endmacro() endmacro()
# Check for HIDAPI joystick drivers. This is currently a Unix thing, not Windows or macOS!
macro(CheckHIDAPI)
if(HIDAPI)
if(HIDAPI_SKIP_LIBUSB)
set(HAVE_HIDAPI TRUE)
else()
set(HAVE_HIDAPI FALSE)
pkg_check_modules(LIBUSB libusb)
if (LIBUSB_FOUND)
check_include_file(libusb.h HAVE_LIBUSB_H)
if (HAVE_LIBUSB_H)
set(HAVE_HIDAPI TRUE)
endif()
endif()
endif()
if(HAVE_HIDAPI)
set(SDL_JOYSTICK_HIDAPI 1)
set(HAVE_SDL_JOYSTICK TRUE)
file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi")
if(NOT HIDAPI_SKIP_LIBUSB)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
endif()
endif()
endif()
endmacro()
# Requires: # Requires:
# - n/a # - n/a
macro(CheckRPI) macro(CheckRPI)

2267
Engine/lib/sdl/configure vendored

File diff suppressed because it is too large Load diff

4225
Engine/lib/sdl/configure.ac Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,15 @@
libsdl2 (2.0.10) UNRELEASED; urgency=low
* Updated SDL to version 2.0.10
-- Sam Lantinga <slouken@libsdl.org> Mon, 17 Jun 2018 08:48:47 -0800
libsdl2 (2.0.9) UNRELEASED; urgency=low
* Updated SDL to version 2.0.9
-- Sam Lantinga <slouken@libsdl.org> Wed, 26 Sep 2018 10:02:21 -0800
libsdl2 (2.0.8) UNRELEASED; urgency=low libsdl2 (2.0.8) UNRELEASED; urgency=low
* Updated SDL to version 2.0.8 * Updated SDL to version 2.0.8

View file

@ -4,7 +4,7 @@ Upstream-Contact: Sam Lantinga <slouken@libsdl.org>
Source: http://www.libsdl.org/ Source: http://www.libsdl.org/
Files: * Files: *
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
License: zlib/libpng License: zlib/libpng
Files: src/libm/* Files: src/libm/*
@ -12,7 +12,7 @@ Copyright: 1993 by Sun Microsystems, Inc. All rights reserved.
License: SunPro License: SunPro
Files: src/main/windows/SDL_windows_main.c Files: src/main/windows/SDL_windows_main.c
Copyright: 2018 Sam Lantinga Copyright: 2019 Sam Lantinga
License: PublicDomain_Sam_Lantinga License: PublicDomain_Sam_Lantinga
Comment: SDL_main.c, placed in the public domain by Sam Lantinga 4/13/98 Comment: SDL_main.c, placed in the public domain by Sam Lantinga 4/13/98
@ -32,7 +32,7 @@ Copyright: 1995 Erik Corry
License: BrownUn_UnCalifornia_ErikCorry License: BrownUn_UnCalifornia_ErikCorry
Files: src/test/SDL_test_md5.c Files: src/test/SDL_test_md5.c
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
1990 RSA Data Security, Inc. 1990 RSA Data Security, Inc.
License: zlib/libpng and RSA_Data_Security License: zlib/libpng and RSA_Data_Security
@ -46,12 +46,12 @@ Copyright: 1994-2003 The XFree86 Project, Inc.
License: MIT/X11 License: MIT/X11
Files: test/testhaptic.c Files: test/testhaptic.c
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
2008 Edgar Simo Serra 2008 Edgar Simo Serra
License: BSD_3_clause License: BSD_3_clause
Files: test/testrumble.c Files: test/testrumble.c
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
2011 Edgar Simo Serra 2011 Edgar Simo Serra
License: BSD_3_clause License: BSD_3_clause
@ -169,7 +169,7 @@ License: BSD_3_clause
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Comment: Comment:
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
. .
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -4,9 +4,22 @@ DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
confflags = --disable-rpath --disable-video-directfb \ confflags = --disable-rpath --disable-video-directfb \
--disable-nas --disable-esd --disable-arts \ --disable-nas --disable-esd --disable-arts
--disable-alsa-shared --disable-pulseaudio-shared \
--disable-x11-shared # These flags can be used to create a package directly linking with external libraries and having the appropriate package dependencies
#confflags += --disable-alsa-shared
#confflags += --disable-arts-shared
#confflags += --disable-directfb-shared
#confflags += --disable-esd-shared
#confflags += --disable-fusionsound-shared
#confflags += --disable-jack-shared
#confflags += --disable-kmsdrm-shared
#confflags += --disable-libsamplerate-shared
#confflags += --disable-nas-shared
#confflags += --disable-pulseaudio-shared
#confflags += --disable-sndio-shared
#confflags += --disable-wayland-shared
#confflags += --disable-x11-shared
%: %:
dh $@ --parallel dh $@ --parallel

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -51,6 +51,7 @@
#include "SDL_power.h" #include "SDL_power.h"
#include "SDL_render.h" #include "SDL_render.h"
#include "SDL_rwops.h" #include "SDL_rwops.h"
#include "SDL_sensor.h"
#include "SDL_shape.h" #include "SDL_shape.h"
#include "SDL_system.h" #include "SDL_system.h"
#include "SDL_thread.h" #include "SDL_thread.h"
@ -80,10 +81,11 @@ extern "C" {
#define SDL_INIT_HAPTIC 0x00001000u #define SDL_INIT_HAPTIC 0x00001000u
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */ #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
#define SDL_INIT_EVENTS 0x00004000u #define SDL_INIT_EVENTS 0x00004000u
#define SDL_INIT_SENSOR 0x00008000u
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */ #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
#define SDL_INIT_EVERYTHING ( \ #define SDL_INIT_EVERYTHING ( \
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \ SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \ SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
) )
/* @} */ /* @} */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -162,12 +162,29 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__GNUC__) && defined(__arm__) #elif defined(__GNUC__) && defined(__arm__)
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) #if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
/* Information from:
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
The Linux kernel provides a helper function which provides the right code for a memory barrier,
hard-coded at address 0xffff0fa0
*/
typedef void (*SDL_KernelMemoryBarrierFunc)();
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
#elif 0 /* defined(__QNXNTO__) */
#include <sys/cpuinline.h>
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
#else
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__) #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
#ifdef __thumb__ #ifdef __thumb__
/* The mcr instruction isn't available in thumb mode, use real functions */ /* The mcr instruction isn't available in thumb mode, use real functions */
#define SDL_MEMORY_BARRIER_USES_FUNCTION
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction() #define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction() #define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
#else #else
@ -177,6 +194,7 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
#else #else
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory") #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
#endif /* __LINUX__ || __ANDROID__ */
#endif /* __GNUC__ && __arm__ */ #endif /* __GNUC__ && __arm__ */
#else #else
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120)) #if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -140,7 +140,8 @@ typedef Uint16 SDL_AudioFormat;
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001 #define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002 #define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004 #define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE) #define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
/* @} */ /* @} */
/* @} *//* Audio flags */ /* @} *//* Audio flags */
@ -419,23 +420,56 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
/* @} *//* Pause audio functions */ /* @} *//* Pause audio functions */
/** /**
* This function loads a WAVE from the data source, automatically freeing * \brief Load the audio data of a WAVE file into memory
* that source if \c freesrc is non-zero. For example, to load a WAVE file, *
* you could do: * Loading a WAVE file requires \c src, \c spec, \c audio_buf and \c audio_len
* to be valid pointers. The entire data portion of the file is then loaded
* into memory and decoded if necessary.
*
* If \c freesrc is non-zero, the data source gets automatically closed and
* freed before the function returns.
*
* Supported are RIFF WAVE files with the formats PCM (8, 16, 24, and 32 bits),
* IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and A-law and
* µ-law (8 bits). Other formats are currently unsupported and cause an error.
*
* If this function succeeds, the pointer returned by it is equal to \c spec
* and the pointer to the audio data allocated by the function is written to
* \c audio_buf and its length in bytes to \c audio_len. The \ref SDL_AudioSpec
* members \c freq, \c channels, and \c format are set to the values of the
* audio data in the buffer. The \c samples member is set to a sane default and
* all others are set to zero.
*
* It's necessary to use SDL_FreeWAV() to free the audio data returned in
* \c audio_buf when it is no longer used.
*
* Because of the underspecification of the Waveform format, there are many
* problematic files in the wild that cause issues with strict decoders. To
* provide compatibility with these files, this decoder is lenient in regards
* to the truncation of the file, the fact chunk, and the size of the RIFF
* chunk. The hints SDL_HINT_WAVE_RIFF_CHUNK_SIZE, SDL_HINT_WAVE_TRUNCATION,
* and SDL_HINT_WAVE_FACT_CHUNK can be used to tune the behavior of the
* loading process.
*
* Any file that is invalid (due to truncation, corruption, or wrong values in
* the headers), too big, or unsupported causes an error. Additionally, any
* critical I/O error from the data source will terminate the loading process
* with an error. The function returns NULL on error and in all cases (with the
* exception of \c src being NULL), an appropriate error message will be set.
*
* It is required that the data source supports seeking.
*
* Example:
* \code * \code
* SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
* \endcode * \endcode
* *
* If this function succeeds, it returns the given SDL_AudioSpec, * \param src The data source with the WAVE data
* filled with the audio data format of the wave data, and sets * \param freesrc A integer value that makes the function close the data source if non-zero
* \c *audio_buf to a malloc()'d buffer containing the audio data, * \param spec A pointer filled with the audio format of the audio data
* and sets \c *audio_len to the length of that audio buffer, in bytes. * \param audio_buf A pointer filled with the audio data allocated by the function
* You need to free the audio buffer with SDL_FreeWAV() when you are * \param audio_len A pointer filled with the length of the audio data buffer in bytes
* done with it. * \return NULL on error, or non-NULL on success.
*
* This function returns NULL and sets the SDL error message if the
* wave file cannot be opened, uses an unknown data format, or is
* corrupt. Currently raw and MS-ADPCM WAVE files are supported.
*/ */
extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
int freesrc, int freesrc,

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -101,6 +101,15 @@ SDL_MostSignificantBitIndex32(Uint32 x)
#endif #endif
} }
SDL_FORCE_INLINE SDL_bool
SDL_HasExactlyOneBitSet32(Uint32 x)
{
if (x && !(x & (x - 1))) {
return SDL_TRUE;
}
return SDL_FALSE;
}
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -90,12 +90,12 @@ typedef enum
/** /**
* \brief Create a custom blend mode, which may or may not be supported by a given renderer * \brief Create a custom blend mode, which may or may not be supported by a given renderer
* *
* \param srcColorFactor * \param srcColorFactor source color factor
* \param dstColorFactor * \param dstColorFactor destination color factor
* \param colorOperation * \param colorOperation color operation
* \param srcAlphaFactor * \param srcAlphaFactor source alpha factor
* \param dstAlphaFactor * \param dstAlphaFactor destination alpha factor
* \param alphaOperation * \param alphaOperation alpha operation
* *
* The result of the blend mode operation will be: * The result of the blend mode operation will be:
* dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor * dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -41,8 +41,10 @@
#include "SDL_config_android.h" #include "SDL_config_android.h"
#elif defined(__PSP__) #elif defined(__PSP__)
#include "SDL_config_psp.h" #include "SDL_config_psp.h"
#elif defined(__OS2__)
#include "SDL_config_os2.h"
#else #else
/* This is a minimal configuration just to get SDL running on new platforms */ /* This is a minimal configuration just to get SDL running on new platforms. */
#include "SDL_config_minimal.h" #include "SDL_config_minimal.h"
#endif /* platform config */ #endif /* platform config */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -144,6 +144,8 @@
#cmakedefine HAVE_COPYSIGNF 1 #cmakedefine HAVE_COPYSIGNF 1
#cmakedefine HAVE_COS 1 #cmakedefine HAVE_COS 1
#cmakedefine HAVE_COSF 1 #cmakedefine HAVE_COSF 1
#cmakedefine HAVE_EXP 1
#cmakedefine HAVE_EXPF 1
#cmakedefine HAVE_FABS 1 #cmakedefine HAVE_FABS 1
#cmakedefine HAVE_FABSF 1 #cmakedefine HAVE_FABSF 1
#cmakedefine HAVE_FLOOR 1 #cmakedefine HAVE_FLOOR 1
@ -182,6 +184,7 @@
#cmakedefine HAVE_SEM_TIMEDWAIT 1 #cmakedefine HAVE_SEM_TIMEDWAIT 1
#cmakedefine HAVE_GETAUXVAL 1 #cmakedefine HAVE_GETAUXVAL 1
#cmakedefine HAVE_POLL 1 #cmakedefine HAVE_POLL 1
#cmakedefine HAVE__EXIT 1
#elif __WIN32__ #elif __WIN32__
#cmakedefine HAVE_STDARG_H 1 #cmakedefine HAVE_STDARG_H 1
@ -207,6 +210,11 @@
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@ #cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@ #cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@ #cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
#cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@ #cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@ #cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
@ -221,6 +229,7 @@
#cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@ #cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@
#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@ #cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@
#cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@ #cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@
#cmakedefine SDL_SENSOR_DISABLED @SDL_SENSOR_DISABLED@
#cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@ #cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@
#cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@ #cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@
#cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@ #cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@
@ -277,6 +286,7 @@
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@ #cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@ #cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@ #cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@ #cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@ #cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@ #cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
@ -285,6 +295,10 @@
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@ #cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@ #cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
/* Enable various sensor drivers */
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
/* Enable various shared object loading systems */ /* Enable various shared object loading systems */
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@ #cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@ #cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
@ -327,9 +341,6 @@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@ #cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@ #cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@ #cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@ #cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@ #cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -149,6 +149,8 @@
#undef HAVE_COPYSIGNF #undef HAVE_COPYSIGNF
#undef HAVE_COS #undef HAVE_COS
#undef HAVE_COSF #undef HAVE_COSF
#undef HAVE_EXP
#undef HAVE_EXPF
#undef HAVE_FABS #undef HAVE_FABS
#undef HAVE_FABSF #undef HAVE_FABSF
#undef HAVE_FLOOR #undef HAVE_FLOOR
@ -187,6 +189,7 @@
#undef HAVE_SEM_TIMEDWAIT #undef HAVE_SEM_TIMEDWAIT
#undef HAVE_GETAUXVAL #undef HAVE_GETAUXVAL
#undef HAVE_POLL #undef HAVE_POLL
#undef HAVE__EXIT
#else #else
#define HAVE_STDARG_H 1 #define HAVE_STDARG_H 1
@ -207,6 +210,9 @@
#undef HAVE_DSOUND_H #undef HAVE_DSOUND_H
#undef HAVE_DXGI_H #undef HAVE_DXGI_H
#undef HAVE_XINPUT_H #undef HAVE_XINPUT_H
#undef HAVE_ENDPOINTVOLUME_H
#undef HAVE_MMDEVICEAPI_H
#undef HAVE_AUDIOCLIENT_H
#undef HAVE_XINPUT_GAMEPAD_EX #undef HAVE_XINPUT_GAMEPAD_EX
#undef HAVE_XINPUT_STATE_EX #undef HAVE_XINPUT_STATE_EX
@ -221,6 +227,7 @@
#undef SDL_FILE_DISABLED #undef SDL_FILE_DISABLED
#undef SDL_JOYSTICK_DISABLED #undef SDL_JOYSTICK_DISABLED
#undef SDL_HAPTIC_DISABLED #undef SDL_HAPTIC_DISABLED
#undef SDL_SENSOR_DISABLED
#undef SDL_LOADSO_DISABLED #undef SDL_LOADSO_DISABLED
#undef SDL_RENDER_DISABLED #undef SDL_RENDER_DISABLED
#undef SDL_THREADS_DISABLED #undef SDL_THREADS_DISABLED
@ -277,6 +284,7 @@
#undef SDL_JOYSTICK_WINMM #undef SDL_JOYSTICK_WINMM
#undef SDL_JOYSTICK_USBHID #undef SDL_JOYSTICK_USBHID
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
#undef SDL_JOYSTICK_HIDAPI
#undef SDL_JOYSTICK_EMSCRIPTEN #undef SDL_JOYSTICK_EMSCRIPTEN
#undef SDL_HAPTIC_DUMMY #undef SDL_HAPTIC_DUMMY
#undef SDL_HAPTIC_ANDROID #undef SDL_HAPTIC_ANDROID
@ -285,6 +293,10 @@
#undef SDL_HAPTIC_DINPUT #undef SDL_HAPTIC_DINPUT
#undef SDL_HAPTIC_XINPUT #undef SDL_HAPTIC_XINPUT
/* Enable various sensor drivers */
#undef SDL_SENSOR_ANDROID
#undef SDL_SENSOR_DUMMY
/* Enable various shared object loading systems */ /* Enable various shared object loading systems */
#undef SDL_LOADSO_DLOPEN #undef SDL_LOADSO_DLOPEN
#undef SDL_LOADSO_DUMMY #undef SDL_LOADSO_DUMMY
@ -316,9 +328,6 @@
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
#undef SDL_VIDEO_DRIVER_MIR
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
#undef SDL_VIDEO_DRIVER_X11 #undef SDL_VIDEO_DRIVER_X11
#undef SDL_VIDEO_DRIVER_RPI #undef SDL_VIDEO_DRIVER_RPI
#undef SDL_VIDEO_DRIVER_KMSDRM #undef SDL_VIDEO_DRIVER_KMSDRM

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -98,6 +98,8 @@
#define HAVE_COPYSIGNF 1 #define HAVE_COPYSIGNF 1
#define HAVE_COS 1 #define HAVE_COS 1
#define HAVE_COSF 1 #define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1 #define HAVE_FABS 1
#define HAVE_FABSF 1 #define HAVE_FABSF 1
#define HAVE_FLOOR 1 #define HAVE_FLOOR 1
@ -128,12 +130,17 @@
/* Enable various audio drivers */ /* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_ANDROID 1 #define SDL_AUDIO_DRIVER_ANDROID 1
#define SDL_AUDIO_DRIVER_OPENSLES 1
#define SDL_AUDIO_DRIVER_DUMMY 1 #define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */ /* Enable various input drivers */
#define SDL_JOYSTICK_ANDROID 1 #define SDL_JOYSTICK_ANDROID 1
#define SDL_JOYSTICK_HIDAPI 1
#define SDL_HAPTIC_ANDROID 1 #define SDL_HAPTIC_ANDROID 1
/* Enable sensor driver */
#define SDL_SENSOR_ANDROID 1
/* Enable various shared object loading systems */ /* Enable various shared object loading systems */
#define SDL_LOADSO_DLOPEN 1 #define SDL_LOADSO_DLOPEN 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -99,6 +99,8 @@
#define HAVE_COPYSIGNF 1 #define HAVE_COPYSIGNF 1
#define HAVE_COS 1 #define HAVE_COS 1
#define HAVE_COSF 1 #define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1 #define HAVE_FABS 1
#define HAVE_FABSF 1 #define HAVE_FABSF 1
#define HAVE_FLOOR 1 #define HAVE_FLOOR 1
@ -135,6 +137,14 @@
/* Enable MFi joystick support */ /* Enable MFi joystick support */
#define SDL_JOYSTICK_MFI 1 #define SDL_JOYSTICK_MFI 1
/*#define SDL_JOYSTICK_HIDAPI 1*/
#ifdef __TVOS__
#define SDL_SENSOR_DUMMY 1
#else
/* Enable the CoreMotion sensor driver */
#define SDL_SENSOR_COREMOTION 1
#endif
/* Enable Unix style SO loading */ /* Enable Unix style SO loading */
#define SDL_LOADSO_DLOPEN 1 #define SDL_LOADSO_DLOPEN 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -102,6 +102,8 @@
#define HAVE_COPYSIGNF 1 #define HAVE_COPYSIGNF 1
#define HAVE_COS 1 #define HAVE_COS 1
#define HAVE_COSF 1 #define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1 #define HAVE_FABS 1
#define HAVE_FABSF 1 #define HAVE_FABSF 1
#define HAVE_FLOOR 1 #define HAVE_FLOOR 1
@ -135,8 +137,12 @@
/* Enable various input drivers */ /* Enable various input drivers */
#define SDL_JOYSTICK_IOKIT 1 #define SDL_JOYSTICK_IOKIT 1
#define SDL_JOYSTICK_HIDAPI 1
#define SDL_HAPTIC_IOKIT 1 #define SDL_HAPTIC_IOKIT 1
/* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable various shared object loading systems */ /* Enable various shared object loading systems */
#define SDL_LOADSO_DLOPEN 1 #define SDL_LOADSO_DLOPEN 1
@ -212,7 +218,7 @@
#endif #endif
/* Enable Vulkan support */ /* Enable Vulkan support */
/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */ /* Metal/Vulkan Portability only supported on 64-bit architectures with 10.11+ */
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) #if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
#define SDL_VIDEO_VULKAN 1 #define SDL_VIDEO_VULKAN 1
#else #else

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -64,6 +64,9 @@ typedef unsigned long uintptr_t;
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
#define SDL_HAPTIC_DISABLED 1 #define SDL_HAPTIC_DISABLED 1
/* Enable the stub sensor driver (src/sensor/dummy/\*.c) */
#define SDL_SENSOR_DISABLED 1
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
#define SDL_LOADSO_DISABLED 1 #define SDL_LOADSO_DISABLED 1

View file

@ -0,0 +1,170 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 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.
*/
#ifndef SDL_config_os2_h_
#define SDL_config_os2_h_
#define SDL_config_h_
#include "SDL_platform.h"
#define SDL_AUDIO_DRIVER_DUMMY 1
#define SDL_AUDIO_DRIVER_DISK 1
#define SDL_POWER_DISABLED 1
#define SDL_JOYSTICK_DISABLED 1
#define SDL_HAPTIC_DISABLED 1
/*#undef SDL_JOYSTICK_HIDAPI */
#define SDL_SENSOR_DUMMY 1
#define SDL_VIDEO_DRIVER_DUMMY 1
/* Enable OpenGL support */
/* #undef SDL_VIDEO_OPENGL */
/* Enable Vulkan support */
/* #undef SDL_VIDEO_VULKAN */
#define SDL_LOADSO_DISABLED 1
#define SDL_THREADS_DISABLED 1
#define SDL_TIMERS_DISABLED 1
#define SDL_FILESYSTEM_DUMMY 1
/* Enable assembly routines */
#define SDL_ASSEMBLY_ROUTINES 1
/* #undef HAVE_LIBSAMPLERATE_H */
/* Enable dynamic libsamplerate support */
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
#define HAVE_LIBC 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIO_H 1
#define STDC_HEADERS 1
#define HAVE_STDLIB_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_MALLOC_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRING_H 1
#define HAVE_STRINGS_H 1
#define HAVE_WCHAR_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_LIMITS_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
#define HAVE_FLOAT_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#if defined(__WATCOMC__)
#define HAVE__FSEEKI64 1
#define HAVE__FTELLI64 1
#endif
#define HAVE_ALLOCA 1
#define HAVE_GETENV 1
#define HAVE_SETENV 1
#define HAVE_PUTENV 1
#define HAVE_QSORT 1
#define HAVE_ABS 1
#define HAVE_BCOPY 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_WCSLEN 1
#define HAVE_WCSLCPY 1
#define HAVE_WCSLCAT 1
#define HAVE_WCSCMP 1
#define HAVE_STRLEN 1
#define HAVE_STRLCPY 1
#define HAVE_STRLCAT 1
#define HAVE__STRREV 1
#define HAVE__STRUPR 1
#define HAVE__STRLWR 1
#define HAVE_INDEX 1
#define HAVE_RINDEX 1
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_ITOA 1
#define HAVE__LTOA 1
#define HAVE__ULTOA 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE__I64TOA 1
#define HAVE__UI64TOA 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRICMP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_SSCANF 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_SETJMP 1
#define HAVE_ACOS 1
/* #undef HAVE_ACOSF */
#define HAVE_ASIN 1
/* #undef HAVE_ASINF */
#define HAVE_ATAN 1
#define HAVE_ATAN2 1
/* #undef HAVE_ATAN2F */
#define HAVE_CEIL 1
/* #undef HAVE_CEILF */
/* #undef HAVE_COPYSIGN */
/* #undef HAVE_COPYSIGNF */
#define HAVE_COS 1
/* #undef HAVE_COSF */
#define HAVE_EXP 1
/* #undef HAVE_EXPF */
#define HAVE_FABS 1
/* #undef HAVE_FABSF */
#define HAVE_FLOOR 1
/* #undef HAVE_FLOORF */
#define HAVE_FMOD 1
/* #undef HAVE_FMODF */
#define HAVE_LOG 1
/* #undef HAVE_LOGF */
#define HAVE_LOG10 1
/* #undef HAVE_LOG10F */
#define HAVE_POW 1
/* #undef HAVE_POWF */
#define HAVE_SIN 1
/* #undef HAVE_SINF */
/* #undef HAVE_SCALBN */
/* #undef HAVE_SCALBNF */
#define HAVE_SQRT 1
/* #undef HAVE_SQRTF */
#define HAVE_TAN 1
/* #undef HAVE_TANF */
#endif /* SDL_config_os2_h_ */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -90,6 +90,7 @@
#define HAVE_COPYSIGN 1 #define HAVE_COPYSIGN 1
#define HAVE_COS 1 #define HAVE_COS 1
#define HAVE_COSF 1 #define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_FABS 1 #define HAVE_FABS 1
#define HAVE_FLOOR 1 #define HAVE_FLOOR 1
#define HAVE_LOG 1 #define HAVE_LOG 1
@ -113,6 +114,8 @@
#define SDL_JOYSTICK_LINUX 1 #define SDL_JOYSTICK_LINUX 1
#define SDL_HAPTIC_LINUX 1 #define SDL_HAPTIC_LINUX 1
#define SDL_SENSOR_DUMMY 1
#define SDL_LOADSO_DLOPEN 1 #define SDL_LOADSO_DLOPEN 1
#define SDL_THREAD_PTHREAD 1 #define SDL_THREAD_PTHREAD 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -97,6 +97,8 @@
#define HAVE_COPYSIGNF 1 #define HAVE_COPYSIGNF 1
#define HAVE_COS 1 #define HAVE_COS 1
#define HAVE_COSF 1 #define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1 #define HAVE_FABS 1
#define HAVE_FABSF 1 #define HAVE_FABSF 1
#define HAVE_FLOOR 1 #define HAVE_FLOOR 1
@ -126,22 +128,25 @@
/* PSP isn't that sophisticated */ /* PSP isn't that sophisticated */
#define LACKS_SYS_MMAN_H 1 #define LACKS_SYS_MMAN_H 1
/* Enable the stub thread support (src/thread/psp/\*.c) */ /* Enable the PSP thread support (src/thread/psp/\*.c) */
#define SDL_THREAD_PSP 1 #define SDL_THREAD_PSP 1
/* Enable the stub timer support (src/timer/psp/\*.c) */ /* Enable the PSP timer support (src/timer/psp/\*.c) */
#define SDL_TIMERS_PSP 1 #define SDL_TIMERS_PSP 1
/* Enable the stub joystick driver (src/joystick/psp/\*.c) */ /* Enable the PSP joystick driver (src/joystick/psp/\*.c) */
#define SDL_JOYSTICK_PSP 1 #define SDL_JOYSTICK_PSP 1
/* Enable the stub audio driver (src/audio/psp/\*.c) */ /* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable the PSP audio driver (src/audio/psp/\*.c) */
#define SDL_AUDIO_DRIVER_PSP 1 #define SDL_AUDIO_DRIVER_PSP 1
/* PSP video dirver */ /* PSP video driver */
#define SDL_VIDEO_DRIVER_PSP 1 #define SDL_VIDEO_DRIVER_PSP 1
/* PSP render dirver */ /* PSP render driver */
#define SDL_VIDEO_RENDER_PSP 1 #define SDL_VIDEO_RENDER_PSP 1
#define SDL_POWER_PSP 1 #define SDL_POWER_PSP 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -82,6 +82,9 @@ typedef unsigned int uintptr_t;
#define HAVE_DSOUND_H 1 #define HAVE_DSOUND_H 1
#define HAVE_DXGI_H 1 #define HAVE_DXGI_H 1
#define HAVE_XINPUT_H 1 #define HAVE_XINPUT_H 1
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_ENDPOINTVOLUME_H 1
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */ /* This is disabled by default to avoid C runtime dependencies and manifest requirements */
#ifdef HAVE_LIBC #ifdef HAVE_LIBC
@ -139,6 +142,8 @@ typedef unsigned int uintptr_t;
#define HAVE__COPYSIGN 1 #define HAVE__COPYSIGN 1
#define HAVE_COS 1 #define HAVE_COS 1
#define HAVE_COSF 1 #define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1 #define HAVE_FABS 1
#define HAVE_FABSF 1 #define HAVE_FABSF 1
#define HAVE_FLOOR 1 #define HAVE_FLOOR 1
@ -188,9 +193,13 @@ typedef unsigned int uintptr_t;
/* Enable various input drivers */ /* Enable various input drivers */
#define SDL_JOYSTICK_DINPUT 1 #define SDL_JOYSTICK_DINPUT 1
#define SDL_JOYSTICK_XINPUT 1 #define SDL_JOYSTICK_XINPUT 1
#define SDL_JOYSTICK_HIDAPI 1
#define SDL_HAPTIC_DINPUT 1 #define SDL_HAPTIC_DINPUT 1
#define SDL_HAPTIC_XINPUT 1 #define SDL_HAPTIC_XINPUT 1
/* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable various shared object loading systems */ /* Enable various shared object loading systems */
#define SDL_LOADSO_WINDOWS 1 #define SDL_LOADSO_WINDOWS 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -97,6 +97,11 @@ typedef unsigned int uintptr_t;
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP #if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
#define HAVE_XINPUT_H 1 #define HAVE_XINPUT_H 1
#endif #endif
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_ENDPOINTVOLUME_H 1
#define HAVE_LIBC 1 #define HAVE_LIBC 1
#define STDC_HEADERS 1 #define STDC_HEADERS 1
#define HAVE_CTYPE_H 1 #define HAVE_CTYPE_H 1
@ -155,6 +160,8 @@ typedef unsigned int uintptr_t;
#define HAVE__COPYSIGN 1 #define HAVE__COPYSIGN 1
#define HAVE_COS 1 #define HAVE_COS 1
#define HAVE_COSF 1 #define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1 #define HAVE_FABS 1
#define HAVE_FABSF 1 #define HAVE_FABSF 1
#define HAVE_FLOOR 1 #define HAVE_FLOOR 1
@ -190,6 +197,9 @@ typedef unsigned int uintptr_t;
#define SDL_HAPTIC_XINPUT 1 #define SDL_HAPTIC_XINPUT 1
#endif #endif
/* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable various shared object loading systems */ /* Enable various shared object loading systems */
#define SDL_LOADSO_WINDOWS 1 #define SDL_LOADSO_WINDOWS 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -94,6 +94,8 @@
#define HAVE_COPYSIGNF 1 #define HAVE_COPYSIGNF 1
#define HAVE_COS 1 #define HAVE_COS 1
#define HAVE_COSF 1 #define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1 #define HAVE_FABS 1
#define HAVE_FABSF 1 #define HAVE_FABSF 1
#define HAVE_FLOOR 1 #define HAVE_FLOOR 1
@ -127,6 +129,8 @@
#define SDL_JOYSTICK_LINUX 1 #define SDL_JOYSTICK_LINUX 1
#define SDL_HAPTIC_LINUX 1 #define SDL_HAPTIC_LINUX 1
#define SDL_SENSOR_DUMMY 1
#define SDL_LOADSO_DLOPEN 1 #define SDL_LOADSO_DLOPEN 1
#define SDL_THREAD_PTHREAD 1 #define SDL_THREAD_PTHREAD 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -41,26 +41,48 @@
#else #else
#include <intrin.h> #include <intrin.h>
#ifndef _WIN64 #ifndef _WIN64
#ifndef __MMX__
#define __MMX__ #define __MMX__
#endif
#ifndef __3dNOW__
#define __3dNOW__ #define __3dNOW__
#endif #endif
#endif
#ifndef __SSE__
#define __SSE__ #define __SSE__
#endif
#ifndef __SSE2__
#define __SSE2__ #define __SSE2__
#endif
#endif /* __clang__ */ #endif /* __clang__ */
#elif defined(__MINGW64_VERSION_MAJOR) #elif defined(__MINGW64_VERSION_MAJOR)
#include <intrin.h> #include <intrin.h>
#else #else
#ifdef __ALTIVEC__ /* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H) #if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
#include <altivec.h> #include <altivec.h>
#undef pixel
#undef bool
#endif #endif
#if !defined(SDL_DISABLE_ARM_NEON_H)
# if defined(__ARM_NEON)
# include <arm_neon.h>
# elif defined(__WINDOWS__) || defined(__WINRT__)
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
# if defined(_M_ARM)
# include <armintr.h>
# include <arm_neon.h>
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
# endif
# if defined (_M_ARM64)
# include <armintr.h>
# include <arm_neon.h>
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
# endif
# endif
#endif #endif
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H) #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h> #include <mm3dnow.h>
#endif #endif
#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H) #if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
#include <immintrin.h> #include <immintrin.h>
#else #else
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H) #if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
@ -159,6 +181,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
/**
* This function returns true if the CPU has AVX-512F (foundation) features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
/** /**
* This function returns true if the CPU has NEON (ARM SIMD) features. * This function returns true if the CPU has NEON (ARM SIMD) features.
*/ */
@ -169,7 +196,69 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
*/ */
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
/**
* \brief Report the alignment this system needs for SIMD allocations.
*
* This will return the minimum number of bytes to which a pointer must be
* aligned to be compatible with SIMD instructions on the current machine.
* For example, if the machine supports SSE only, it will return 16, but if
* it supports AVX-512F, it'll return 64 (etc). This only reports values for
* instruction sets SDL knows about, so if your SDL build doesn't have
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
* Plan accordingly.
*/
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
/**
* \brief Allocate memory in a SIMD-friendly way.
*
* This will allocate a block of memory that is suitable for use with SIMD
* instructions. Specifically, it will be properly aligned and padded for
* the system's supported vector instructions.
*
* The memory returned will be padded such that it is safe to read or write
* an incomplete vector at the end of the memory block. This can be useful
* so you don't have to drop back to a scalar fallback at the end of your
* SIMD processing loop to deal with the final elements without overflowing
* the allocated buffer.
*
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()
* or delete[], etc.
*
* Note that SDL will only deal with SIMD instruction sets it is aware of;
* for example, SDL 2.0.8 knows that SSE wants 16-byte vectors
* (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't
* know that AVX-512 wants 64. To be clear: if you can't decide to use an
* instruction set with an SDL_Has*() function, don't use that instruction
* set with memory allocated through here.
*
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
* out of memory.
*
* \param len The length, in bytes, of the block to allocated. The actual
* allocated block might be larger due to padding, etc.
* \return Pointer to newly-allocated block, NULL if out of memory.
*
* \sa SDL_SIMDAlignment
* \sa SDL_SIMDFree
*/
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
/**
* \brief Deallocate memory obtained from SDL_SIMDAlloc
*
* It is not valid to use this function on a pointer from anything but
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
* SDL_malloc, memalign, new[], etc.
*
* However, SDL_SIMDFree(NULL) is a legal no-op.
*
* \sa SDL_SIMDAlloc
*/
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
/* vi: set ts=4 sw=4 expandtab: */
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -85,6 +85,9 @@ typedef enum
Called on Android in onResume() Called on Android in onResume()
*/ */
/* Display events */
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
/* Window events */ /* Window events */
SDL_WINDOWEVENT = 0x200, /**< Window state change */ SDL_WINDOWEVENT = 0x200, /**< Window state change */
SDL_SYSWMEVENT, /**< System specific event */ SDL_SYSWMEVENT, /**< System specific event */
@ -144,6 +147,9 @@ typedef enum
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */ SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */ SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
/* Sensor events */
SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
/* Render events */ /* Render events */
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */ SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */ SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
@ -168,6 +174,21 @@ typedef struct SDL_CommonEvent
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
} SDL_CommonEvent; } SDL_CommonEvent;
/**
* \brief Display state change event data (event.display.*)
*/
typedef struct SDL_DisplayEvent
{
Uint32 type; /**< ::SDL_DISPLAYEVENT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 display; /**< The associated display index */
Uint8 event; /**< ::SDL_DisplayEventID */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Sint32 data1; /**< event dependent data */
} SDL_DisplayEvent;
/** /**
* \brief Window state change event data (event.window.*) * \brief Window state change event data (event.window.*)
*/ */
@ -471,6 +492,17 @@ typedef struct SDL_DropEvent
} SDL_DropEvent; } SDL_DropEvent;
/**
* \brief Sensor event structure (event.sensor.*)
*/
typedef struct SDL_SensorEvent
{
Uint32 type; /**< ::SDL_SENSORUPDATE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Sint32 which; /**< The instance ID of the sensor */
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
} SDL_SensorEvent;
/** /**
* \brief The "quit requested" event * \brief The "quit requested" event
*/ */
@ -526,6 +558,7 @@ typedef union SDL_Event
{ {
Uint32 type; /**< Event type, shared with all events */ Uint32 type; /**< Event type, shared with all events */
SDL_CommonEvent common; /**< Common event data */ SDL_CommonEvent common; /**< Common event data */
SDL_DisplayEvent display; /**< Window event data */
SDL_WindowEvent window; /**< Window event data */ SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_KeyboardEvent key; /**< Keyboard event data */
SDL_TextEditingEvent edit; /**< Text editing event data */ SDL_TextEditingEvent edit; /**< Text editing event data */
@ -542,6 +575,7 @@ typedef union SDL_Event
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
SDL_AudioDeviceEvent adevice; /**< Audio device event data */ SDL_AudioDeviceEvent adevice; /**< Audio device event data */
SDL_SensorEvent sensor; /**< Sensor event data */
SDL_QuitEvent quit; /**< Quit request event data */ SDL_QuitEvent quit; /**< Quit request event data */
SDL_UserEvent user; /**< Custom event data */ SDL_UserEvent user; /**< Custom event data */
SDL_SysWMEvent syswm; /**< System dependent window event data */ SDL_SysWMEvent syswm; /**< System dependent window event data */
@ -560,6 +594,9 @@ typedef union SDL_Event
Uint8 padding[56]; Uint8 padding[56];
} SDL_Event; } SDL_Event;
/* Make sure we haven't broken binary compatibility */
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == 56);
/* Function prototypes */ /* Function prototypes */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -175,6 +175,14 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
*/ */
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index); extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
/**
* Get the mapping of a game controller.
* This can be called before any controllers are opened.
*
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
/** /**
* Open a game controller for use. * Open a game controller for use.
* The index passed as an argument refers to the N'th game controller on the system. * The index passed as an argument refers to the N'th game controller on the system.
@ -196,6 +204,13 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL
*/ */
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller); extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
/**
* Get the player index of an opened game controller, or -1 if it's not available
*
* For XInput controllers this returns the XInput user index.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
/** /**
* Get the USB vendor ID of an opened controller, if available. * Get the USB vendor ID of an opened controller, if available.
* If the vendor ID isn't available this function returns 0. * If the vendor ID isn't available this function returns 0.
@ -345,6 +360,19 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller, extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
SDL_GameControllerButton button); SDL_GameControllerButton button);
/**
* Trigger a rumble effect
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
*
* \param gamecontroller The controller to vibrate
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
* \param duration_ms The duration of the rumble effect, in milliseconds
*
* \return 0, or -1 if rumble isn't supported on this joystick
*/
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
/** /**
* Close a controller previously opened with SDL_GameControllerOpen(). * Close a controller previously opened with SDL_GameControllerOpen().
*/ */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -117,6 +117,17 @@
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
*
* At the moment the magnitude variables are mixed between signed/unsigned, and
* it is also not made clear that ALL of those variables expect a max of 0x7FFF.
*
* Some platforms may have higher precision than that (Linux FF, Windows XInput)
* so we should fix the inconsistency in favor of higher possible precision,
* adjusting for platforms that use different scales.
* -flibit
*/
/** /**
* \typedef SDL_Haptic * \typedef SDL_Haptic
* *
@ -656,8 +667,8 @@ typedef struct SDL_HapticRamp
* This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
* *
* The Left/Right effect is used to explicitly control the large and small * The Left/Right effect is used to explicitly control the large and small
* motors, commonly found in modern game controllers. One motor is high * motors, commonly found in modern game controllers. The small (right) motor
* frequency, the other is low frequency. * is high frequency, and the large (left) motor is low frequency.
* *
* \sa SDL_HAPTIC_LEFTRIGHT * \sa SDL_HAPTIC_LEFTRIGHT
* \sa SDL_HapticEffect * \sa SDL_HapticEffect
@ -668,7 +679,7 @@ typedef struct SDL_HapticLeftRight
Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
/* Replay */ /* Replay */
Uint32 length; /**< Duration of the effect. */ Uint32 length; /**< Duration of the effect in milliseconds. */
/* Rumble */ /* Rumble */
Uint16 large_magnitude; /**< Control of the large controller motor. */ Uint16 large_magnitude; /**< Control of the large controller motor. */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -262,6 +262,16 @@ extern "C" {
*/ */
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD" #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
/**
* \brief A variable setting the double click time, in milliseconds.
*/
#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
/**
* \brief A variable setting the double click radius, in pixels.
*/
#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
/** /**
* \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
*/ */
@ -305,6 +315,16 @@ extern "C" {
*/ */
#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS" #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
/**
* \brief A variable controlling whether mouse events should generate synthetic touch events
*
* This variable can be set to the following values:
* "0" - Mouse events will not generate touch events (default for desktop platforms)
* "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
*/
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
/** /**
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true. * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
* *
@ -329,7 +349,7 @@ extern "C" {
#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED" #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
/** /**
* \brief A variable controlling which orientations are allowed on iOS. * \brief A variable controlling which orientations are allowed on iOS/Android.
* *
* In some circumstances it is necessary to be able to explicitly control * In some circumstances it is necessary to be able to explicitly control
* which UI orientations are allowed. * which UI orientations are allowed.
@ -426,6 +446,16 @@ extern "C" {
*/ */
#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG" #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
/**
* \brief A variable that lets you provide a file with extra gamecontroller db entries.
*
* The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h
*
* This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
* You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
*/
#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
/** /**
* \brief A variable containing a list of devices to skip when scanning for game controllers. * \brief A variable containing a list of devices to skip when scanning for game controllers.
* *
@ -465,6 +495,88 @@ extern "C" {
*/ */
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
/**
* \brief A variable controlling whether the HIDAPI joystick drivers should be used.
*
* This variable can be set to the following values:
* "0" - HIDAPI drivers are not used
* "1" - HIDAPI drivers are used (the default)
*
* This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
*/
#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
/**
* \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
*
* This variable can be set to the following values:
* "0" - HIDAPI driver is not used
* "1" - HIDAPI driver is used
*
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
*/
#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
/**
* \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
*
* This variable can be set to the following values:
* "0" - extended reports are not enabled (the default)
* "1" - extended reports
*
* Extended input reports allow rumble on Bluetooth PS4 controllers, but
* break DirectInput handling for applications that don't use SDL.
*
* Once extended reports are enabled, they can not be disabled without
* power cycling the controller.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
/**
* \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
*
* This variable can be set to the following values:
* "0" - HIDAPI driver is not used
* "1" - HIDAPI driver is used
*
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
*/
#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
/**
* \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
*
* This variable can be set to the following values:
* "0" - HIDAPI driver is not used
* "1" - HIDAPI driver is used
*
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
*/
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
/**
* \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
*
* This variable can be set to the following values:
* "0" - HIDAPI driver is not used
* "1" - HIDAPI driver is used
*
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
*/
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
/**
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
*
* The variable can be set to the following values:
* "0" - Do not scan for Steam Controllers
* "1" - Scan for Steam Controllers (the default)
*
* The default value is "1". This hint must be set before initializing the joystick subsystem.
*/
#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
/** /**
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
* This is a debugging aid for developers and not expected to be used by end users. The default is "1" * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
@ -527,6 +639,10 @@ extern "C" {
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which * This is specially useful if you build SDL against a non glibc libc library (such as musl) which
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses). * provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
* Support for this hint is currently available only in the pthread, Windows, and PSP backend. * Support for this hint is currently available only in the pthread, Windows, and PSP backend.
*
* Instead of this hint, in 2.0.9 and later, you can use
* SDL_CreateThreadWithStackSize(). This hint only works with the classic
* SDL_CreateThread().
*/ */
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE" #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
@ -740,17 +856,33 @@ extern "C" {
*/ */
#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
/** /**
* \brief A variable to control whether mouse and touch events are to be treated together or separately * \brief A variable to control whether we trap the Android back button to handle it manually.
* This is necessary for the right mouse button to work on some Android devices, or
* to be able to trap the back button for use in your code reliably. If set to true,
* the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
* SDL_SCANCODE_AC_BACK.
* *
* The variable can be set to the following values: * The variable can be set to the following values:
* "0" - Mouse events will be handled as touch events, and touch will raise fake mouse * "0" - Back button will be handled as usual for system. (default)
* events. This is the behaviour of SDL <= 2.0.3. (default) * "1" - Back button will be trapped, allowing you to handle the key press
* "1" - Mouse events will be handled separately from pure touch events. * manually. (This will also let right mouse click work on systems
* where the right mouse button functions as back.)
* *
* The value of this hint is used at runtime, so it can be changed at any time. * The value of this hint is used at runtime, so it can be changed at any time.
*/ */
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH" #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
/**
* \brief A variable to control whether the event loop will block itself when the app is paused.
*
* The variable can be set to the following values:
* "0" - Non blocking.
* "1" - Blocking. (default)
*
* The value should be set before SDL is initialized.
*/
#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
/** /**
* \brief A variable to control whether the return key on the soft keyboard * \brief A variable to control whether the return key on the soft keyboard
@ -930,6 +1062,118 @@ extern "C" {
*/ */
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY" #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
/**
* \brief A variable controlling whether the 2D render API is compatible or efficient.
*
* This variable can be set to the following values:
*
* "0" - Don't use batching to make rendering more efficient.
* "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
*
* Up to SDL 2.0.9, the render API would draw immediately when requested. Now
* it batches up draw requests and sends them all to the GPU only when forced
* to (during SDL_RenderPresent, when changing render targets, by updating a
* texture that the batch needs, etc). This is significantly more efficient,
* but it can cause problems for apps that expect to render on top of the
* render API's output. As such, SDL will disable batching if a specific
* render backend is requested (since this might indicate that the app is
* planning to use the underlying graphics API directly). This hint can
* be used to explicitly request batching in this instance. It is a contract
* that you will either never use the underlying graphics API directly, or
* if you do, you will call SDL_RenderFlush() before you do so any current
* batch goes to the GPU before your work begins. Not following this contract
* will result in undefined behavior.
*/
#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
/**
* \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
*
* This variable can be set to the following values:
*
* "0" - Don't log any events (default)
* "1" - Log all events except mouse and finger motion, which are pretty spammy.
* "2" - Log all events.
*
* This is generally meant to be used to debug SDL itself, but can be useful
* for application developers that need better visibility into what is going
* on in the event queue. Logged events are sent through SDL_Log(), which
* means by default they appear on stdout on most platforms or maybe
* OutputDebugString() on Windows, and can be funneled by the app with
* SDL_LogSetOutputFunction(), etc.
*
* This hint can be toggled on and off at runtime, if you only need to log
* events for a small subset of program execution.
*/
#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
/**
* \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
*
* The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
* file) is not always reliable. In case the size is wrong, it's possible to
* just ignore it and step through the chunks until a fixed limit is reached.
*
* Note that files that have trailing data unrelated to the WAVE file or
* corrupt files may slow down the loading process without a reliable boundary.
* By default, SDL stops after 10000 chunks to prevent wasting time. Use the
* environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
*
* This variable can be set to the following values:
*
* "force" - Always use the RIFF chunk size as a boundary for the chunk search
* "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
* "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
* "maximum" - Search for chunks until the end of file (not recommended)
*/
#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
/**
* \brief Controls how a truncated WAVE file is handled.
*
* A WAVE file is considered truncated if any of the chunks are incomplete or
* the data chunk size is not a multiple of the block size. By default, SDL
* decodes until the first incomplete block, as most applications seem to do.
*
* This variable can be set to the following values:
*
* "verystrict" - Raise an error if the file is truncated
* "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
* "dropframe" - Decode until the first incomplete sample frame
* "dropblock" - Decode until the first incomplete block (default)
*/
#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
/**
* \brief Controls how the fact chunk affects the loading of a WAVE file.
*
* The fact chunk stores information about the number of samples of a WAVE
* file. The Standards Update from Microsoft notes that this value can be used
* to 'determine the length of the data in seconds'. This is especially useful
* for compressed formats (for which this is a mandatory chunk) if they produce
* multiple sample frames per block and truncating the block is not allowed.
* The fact chunk can exactly specify how many sample frames there should be
* in this case.
*
* Unfortunately, most application seem to ignore the fact chunk and so SDL
* ignores it by default as well.
*
* This variable can be set to the following values:
*
* "truncate" - Use the number of samples to truncate the wave data if
* the fact chunk is present and valid
* "strict" - Like "truncate", but raise an error if the fact chunk
* is invalid, not present for non-PCM formats, or if the
* data chunk doesn't have that many samples
* "ignorezero" - Like "truncate", but ignore fact chunk if the number of
* samples is zero
* "ignore" - Ignore fact chunk entirely (default)
*/
#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
/** /**
* \brief An enumeration of hint priorities * \brief An enumeration of hint priorities
*/ */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -97,10 +97,10 @@ typedef enum
typedef enum typedef enum
{ {
SDL_JOYSTICK_POWER_UNKNOWN = -1, SDL_JOYSTICK_POWER_UNKNOWN = -1,
SDL_JOYSTICK_POWER_EMPTY, SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
SDL_JOYSTICK_POWER_LOW, SDL_JOYSTICK_POWER_LOW, /* <= 20% */
SDL_JOYSTICK_POWER_MEDIUM, SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
SDL_JOYSTICK_POWER_FULL, SDL_JOYSTICK_POWER_FULL, /* <= 100% */
SDL_JOYSTICK_POWER_WIRED, SDL_JOYSTICK_POWER_WIRED,
SDL_JOYSTICK_POWER_MAX SDL_JOYSTICK_POWER_MAX
} SDL_JoystickPowerLevel; } SDL_JoystickPowerLevel;
@ -132,6 +132,12 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
*/ */
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index); extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
/**
* Get the player index of a joystick, or -1 if it's not available
* This can be called before any joysticks are opened.
*/
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
/** /**
* Return the GUID for the joystick at this index * Return the GUID for the joystick at this index
* This can be called before any joysticks are opened. * This can be called before any joysticks are opened.
@ -194,6 +200,13 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
*/ */
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick); extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
/**
* Get the player index of an opened joystick, or -1 if it's not available
*
* For XInput controllers this returns the XInput user index.
*/
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
/** /**
* Return the GUID for this opened joystick * Return the GUID for this opened joystick
*/ */
@ -361,6 +374,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
int button); int button);
/**
* Trigger a rumble effect
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
*
* \param joystick The joystick to vibrate
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
* \param duration_ms The duration of the rumble effect, in milliseconds
*
* \return 0, or -1 if rumble isn't supported on this joystick
*/
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
/** /**
* Close a joystick previously opened with SDL_JoystickOpen(). * Close a joystick previously opened with SDL_JoystickOpen().
*/ */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -55,6 +55,10 @@
/* On iOS SDL provides a main function that creates an application delegate /* On iOS SDL provides a main function that creates an application delegate
and starts the iOS application run loop. and starts the iOS application run loop.
If you link with SDL dynamically on iOS, the main function can't be in a
shared library, so you need to link with libSDLmain.a, which includes a
stub main function that calls into the shared library to start execution.
See src/video/uikit/SDL_uikitappdelegate.m for more details. See src/video/uikit/SDL_uikitappdelegate.m for more details.
*/ */
#define SDL_MAIN_NEEDED #define SDL_MAIN_NEEDED
@ -82,12 +86,6 @@
#endif #endif
#endif /* SDL_MAIN_HANDLED */ #endif /* SDL_MAIN_HANDLED */
#ifdef __cplusplus
#define C_LINKAGE "C"
#else
#define C_LINKAGE
#endif /* __cplusplus */
#ifndef SDLMAIN_DECLSPEC #ifndef SDLMAIN_DECLSPEC
#define SDLMAIN_DECLSPEC #define SDLMAIN_DECLSPEC
#endif #endif
@ -111,17 +109,18 @@
#define main SDL_main #define main SDL_main
#endif #endif
/**
* The prototype for the application's main() function
*/
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
#include "begin_code.h" #include "begin_code.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/**
* The prototype for the application's main() function
*/
typedef int (*SDL_main_func)(int argc, char *argv[]);
extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
/** /**
* This is called by the real SDL main function to let the rest of the * This is called by the real SDL main function to let the rest of the
* library know that initialization was done properly. * library know that initialization was done properly.
@ -136,8 +135,7 @@ extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
/** /**
* This can be called to set the application class at startup * This can be called to set the application class at startup
*/ */
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
void *hInst);
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
#endif /* __WIN32__ */ #endif /* __WIN32__ */
@ -153,10 +151,24 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
* \return 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more * \return 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
* information on the failure. * information on the failure.
*/ */
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * reserved); extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
#endif /* __WINRT__ */ #endif /* __WINRT__ */
#if defined(__IPHONEOS__)
/**
* \brief Initializes and launches an SDL application.
*
* \param argc The argc parameter from the application's main() function
* \param argv The argv parameter from the application's main() function
* \param mainFunction The SDL app's C-style main().
* \return the return value from mainFunction
*/
extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
#endif /* __IPHONEOS__ */
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -168,7 +168,7 @@ enum
((format) && (SDL_PIXELFLAG(format) != 1)) ((format) && (SDL_PIXELFLAG(format) != 1))
/* Note: If you modify this list, update SDL_GetPixelFormatName() */ /* Note: If you modify this list, update SDL_GetPixelFormatName() */
enum typedef enum
{ {
SDL_PIXELFORMAT_UNKNOWN, SDL_PIXELFORMAT_UNKNOWN,
SDL_PIXELFORMAT_INDEX1LSB = SDL_PIXELFORMAT_INDEX1LSB =
@ -290,7 +290,7 @@ enum
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'), SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */ SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ') SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
}; } SDL_PixelFormatEnum;
typedef struct SDL_Color typedef struct SDL_Color
{ {

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -40,7 +40,7 @@ extern "C" {
#endif #endif
/** /**
* \brief The structure that defines a point * \brief The structure that defines a point (integer)
* *
* \sa SDL_EnclosePoints * \sa SDL_EnclosePoints
* \sa SDL_PointInRect * \sa SDL_PointInRect
@ -52,7 +52,20 @@ typedef struct SDL_Point
} SDL_Point; } SDL_Point;
/** /**
* \brief A rectangle, with the origin at the upper left. * \brief The structure that defines a point (floating point)
*
* \sa SDL_EnclosePoints
* \sa SDL_PointInRect
*/
typedef struct SDL_FPoint
{
float x;
float y;
} SDL_FPoint;
/**
* \brief A rectangle, with the origin at the upper left (integer).
* *
* \sa SDL_RectEmpty * \sa SDL_RectEmpty
* \sa SDL_RectEquals * \sa SDL_RectEquals
@ -67,6 +80,19 @@ typedef struct SDL_Rect
int w, h; int w, h;
} SDL_Rect; } SDL_Rect;
/**
* \brief A rectangle, with the origin at the upper left (floating point).
*/
typedef struct SDL_FRect
{
float x;
float y;
float w;
float h;
} SDL_FRect;
/** /**
* \brief Returns true if point resides inside a rectangle. * \brief Returns true if point resides inside a rectangle.
*/ */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -835,6 +835,148 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
const SDL_Point *center, const SDL_Point *center,
const SDL_RendererFlip flip); const SDL_RendererFlip flip);
/**
* \brief Draw a point on the current rendering target.
*
* \param renderer The renderer which should draw a point.
* \param x The x coordinate of the point.
* \param y The y coordinate of the point.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
float x, float y);
/**
* \brief Draw multiple points on the current rendering target.
*
* \param renderer The renderer which should draw multiple points.
* \param points The points to draw
* \param count The number of points to draw
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
const SDL_FPoint * points,
int count);
/**
* \brief Draw a line on the current rendering target.
*
* \param renderer The renderer which should draw a line.
* \param x1 The x coordinate of the start point.
* \param y1 The y coordinate of the start point.
* \param x2 The x coordinate of the end point.
* \param y2 The y coordinate of the end point.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
float x1, float y1, float x2, float y2);
/**
* \brief Draw a series of connected lines on the current rendering target.
*
* \param renderer The renderer which should draw multiple lines.
* \param points The points along the lines
* \param count The number of points, drawing count-1 lines
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
const SDL_FPoint * points,
int count);
/**
* \brief Draw a rectangle on the current rendering target.
*
* \param renderer The renderer which should draw a rectangle.
* \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
const SDL_FRect * rect);
/**
* \brief Draw some number of rectangles on the current rendering target.
*
* \param renderer The renderer which should draw multiple rectangles.
* \param rects A pointer to an array of destination rectangles.
* \param count The number of rectangles.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
const SDL_FRect * rects,
int count);
/**
* \brief Fill a rectangle on the current rendering target with the drawing color.
*
* \param renderer The renderer which should fill a rectangle.
* \param rect A pointer to the destination rectangle, or NULL for the entire
* rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
const SDL_FRect * rect);
/**
* \brief Fill some number of rectangles on the current rendering target with the drawing color.
*
* \param renderer The renderer which should fill multiple rectangles.
* \param rects A pointer to an array of destination rectangles.
* \param count The number of rectangles.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
const SDL_FRect * rects,
int count);
/**
* \brief Copy a portion of the texture to the current rendering target.
*
* \param renderer The renderer which should copy parts of a texture.
* \param texture The source texture.
* \param srcrect A pointer to the source rectangle, or NULL for the entire
* texture.
* \param dstrect A pointer to the destination rectangle, or NULL for the
* entire rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
SDL_Texture * texture,
const SDL_Rect * srcrect,
const SDL_FRect * dstrect);
/**
* \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
*
* \param renderer The renderer which should copy parts of a texture.
* \param texture The source texture.
* \param srcrect A pointer to the source rectangle, or NULL for the entire
* texture.
* \param dstrect A pointer to the destination rectangle, or NULL for the
* entire rendering target.
* \param angle An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction
* \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).
* \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
SDL_Texture * texture,
const SDL_Rect * srcrect,
const SDL_FRect * dstrect,
const double angle,
const SDL_FPoint *center,
const SDL_RendererFlip flip);
/** /**
* \brief Read pixels from the current rendering target. * \brief Read pixels from the current rendering target.
* *
@ -876,6 +1018,31 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
*/ */
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer); extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
/**
* \brief Force the rendering context to flush any pending commands to the
* underlying rendering API.
*
* You do not need to (and in fact, shouldn't) call this function unless
* you are planning to call into OpenGL/Direct3D/Metal/whatever directly
* in addition to using an SDL_Renderer.
*
* This is for a very-specific case: if you are using SDL's render API,
* you asked for a specific renderer backend (OpenGL, Direct3D, etc),
* you set SDL_HINT_RENDER_BATCHING to "1", and you plan to make
* OpenGL/D3D/whatever calls in addition to SDL render API calls. If all of
* this applies, you should call SDL_RenderFlush() between calls to SDL's
* render API and the low-level API you're using in cooperation.
*
* In all other cases, you can ignore this function. This is only here to
* get maximum performance out of a specific situation. In all other cases,
* SDL will do the right thing, perhaps at a performance loss.
*
* This function is first available in SDL 2.0.10, and is not needed in
* 2.0.9 and earlier, as earlier versions did not queue rendering commands
* at all, instead flushing them to the OS immediately.
*/
extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
/** /**
* \brief Bind the texture to the current OpenGL/ES/ES2 context for use with * \brief Bind the texture to the current OpenGL/ES/ES2 context for use with

View file

@ -1,2 +1,2 @@
#define SDL_REVISION "hg-11914:f1084c419f33" #define SDL_REVISION "hg-12952:bc90ce38f1e2"
#define SDL_REVISION_NUMBER 11914 #define SDL_REVISION_NUMBER 12952

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -176,19 +176,48 @@ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
#define RW_SEEK_END 2 /**< Seek relative to the end of data */ #define RW_SEEK_END 2 /**< Seek relative to the end of data */
/** /**
* \name Read/write macros * Return the size of the file in this rwops, or -1 if unknown
*
* Macros to easily read and write from an SDL_RWops structure.
*/ */
/* @{ */ extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
#define SDL_RWsize(ctx) (ctx)->size(ctx)
#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
#define SDL_RWclose(ctx) (ctx)->close(ctx)
/* @} *//* Read/write macros */
/**
* Seek to \c offset relative to \c whence, one of stdio's whence values:
* RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
*
* \return the final offset in the data stream, or -1 on error.
*/
extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
Sint64 offset, int whence);
/**
* Return the current offset in the data stream, or -1 on error.
*/
extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
/**
* Read up to \c maxnum objects each of size \c size from the data
* stream to the area pointed at by \c ptr.
*
* \return the number of objects read, or 0 at error or end of file.
*/
extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
void *ptr, size_t size, size_t maxnum);
/**
* Write exactly \c num objects each of size \c size from the area
* pointed at by \c ptr to data stream.
*
* \return the number of objects written, or 0 at error or end of file.
*/
extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
const void *ptr, size_t size, size_t num);
/**
* Close and free an allocated SDL_RWops structure.
*
* \return 0 if successful or -1 on write error when flushing data.
*/
extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
/** /**
* Load all the data from an SDL data stream. * Load all the data from an SDL data stream.
@ -209,9 +238,17 @@ extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize,
/** /**
* Load an entire file. * Load an entire file.
* *
* Convenience macro. * The data is allocated with a zero byte at the end (null terminated)
*
* If \c datasize is not NULL, it is filled with the size of the data read.
*
* If \c freesrc is non-zero, the stream will be closed after being read.
*
* The data should be freed with SDL_free().
*
* \return the data, or NULL if there was an error.
*/ */
#define SDL_LoadFile(file, datasize) SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1) extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
/** /**
* \name Read endian functions * \name Read endian functions

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -38,7 +38,7 @@
* SDL_Event structure. * SDL_Event structure.
* *
* The values in this enumeration are based on the USB usage page standard: * The values in this enumeration are based on the USB usage page standard:
* http://www.usb.org/developers/hidpage/Hut1_12v2.pdf * https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
*/ */
typedef enum typedef enum
{ {

View file

@ -0,0 +1,251 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 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.
*/
/**
* \file SDL_sensor.h
*
* Include file for SDL sensor event handling
*
*/
#ifndef SDL_sensor_h_
#define SDL_sensor_h_
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
/**
* \brief SDL_sensor.h
*
* In order to use these functions, SDL_Init() must have been called
* with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system
* for sensors, and load appropriate drivers.
*/
struct _SDL_Sensor;
typedef struct _SDL_Sensor SDL_Sensor;
/**
* This is a unique ID for a sensor for the time it is connected to the system,
* and is never reused for the lifetime of the application.
*
* The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
*/
typedef Sint32 SDL_SensorID;
/* The different sensors defined by SDL
*
* Additional sensors may be available, using platform dependent semantics.
*
* Hare are the additional Android sensors:
* https://developer.android.com/reference/android/hardware/SensorEvent.html#values
*/
typedef enum
{
SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
SDL_SENSOR_ACCEL, /**< Accelerometer */
SDL_SENSOR_GYRO /**< Gyroscope */
} SDL_SensorType;
/**
* Accelerometer sensor
*
* The accelerometer returns the current acceleration in SI meters per
* second squared. This includes gravity, so a device at rest will have
* an acceleration of SDL_STANDARD_GRAVITY straight down.
*
* values[0]: Acceleration on the x axis
* values[1]: Acceleration on the y axis
* values[2]: Acceleration on the z axis
*
* For phones held in portrait mode, the axes are defined as follows:
* -X ... +X : left ... right
* -Y ... +Y : bottom ... top
* -Z ... +Z : farther ... closer
*
* The axis data is not changed when the phone is rotated.
*
* \sa SDL_GetDisplayOrientation()
*/
#define SDL_STANDARD_GRAVITY 9.80665f
/**
* Gyroscope sensor
*
* The gyroscope returns the current rate of rotation in radians per second.
* The rotation is positive in the counter-clockwise direction. That is,
* an observer looking from a positive location on one of the axes would
* see positive rotation on that axis when it appeared to be rotating
* counter-clockwise.
*
* values[0]: Angular speed around the x axis
* values[1]: Angular speed around the y axis
* values[2]: Angular speed around the z axis
*
* For phones held in portrait mode, the axes are defined as follows:
* -X ... +X : left ... right
* -Y ... +Y : bottom ... top
* -Z ... +Z : farther ... closer
*
* The axis data is not changed when the phone is rotated.
*
* \sa SDL_GetDisplayOrientation()
*/
/* Function prototypes */
/**
* \brief Count the number of sensors attached to the system right now
*/
extern DECLSPEC int SDLCALL SDL_NumSensors(void);
/**
* \brief Get the implementation dependent name of a sensor.
*
* This can be called before any sensors are opened.
*
* \return The sensor name, or NULL if device_index is out of range.
*/
extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
/**
* \brief Get the type of a sensor.
*
* This can be called before any sensors are opened.
*
* \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range.
*/
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
/**
* \brief Get the platform dependent type of a sensor.
*
* This can be called before any sensors are opened.
*
* \return The sensor platform dependent type, or -1 if device_index is out of range.
*/
extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
/**
* \brief Get the instance ID of a sensor.
*
* This can be called before any sensors are opened.
*
* \return The sensor instance ID, or -1 if device_index is out of range.
*/
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
/**
* \brief Open a sensor for use.
*
* The index passed as an argument refers to the N'th sensor on the system.
*
* \return A sensor identifier, or NULL if an error occurred.
*/
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
/**
* Return the SDL_Sensor associated with an instance id.
*/
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
/**
* \brief Get the implementation dependent name of a sensor.
*
* \return The sensor name, or NULL if the sensor is NULL.
*/
extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
/**
* \brief Get the type of a sensor.
*
* This can be called before any sensors are opened.
*
* \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL.
*/
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
/**
* \brief Get the platform dependent type of a sensor.
*
* This can be called before any sensors are opened.
*
* \return The sensor platform dependent type, or -1 if the sensor is NULL.
*/
extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
/**
* \brief Get the instance ID of a sensor.
*
* This can be called before any sensors are opened.
*
* \return The sensor instance ID, or -1 if the sensor is NULL.
*/
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
/**
* Get the current state of an opened sensor.
*
* The number of values and interpretation of the data is sensor dependent.
*
* \param sensor The sensor to query
* \param data A pointer filled with the current sensor state
* \param num_values The number of values to write to data
*
* \return 0 or -1 if an error occurred.
*/
extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
/**
* Close a sensor previously opened with SDL_SensorOpen()
*/
extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
/**
* Update the current state of the open sensors.
*
* This is called automatically by the event loop if sensor events are enabled.
*
* This needs to be called from the thread that initialized the sensor subsystem.
*/
extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif
#include "close_code.h"
#endif /* SDL_sensor_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -86,6 +86,28 @@
#ifdef HAVE_FLOAT_H #ifdef HAVE_FLOAT_H
# include <float.h> # include <float.h>
#endif #endif
#if defined(HAVE_ALLOCA) && !defined(alloca)
# if defined(HAVE_ALLOCA_H)
# include <alloca.h>
# elif defined(__GNUC__)
# define alloca __builtin_alloca
# elif defined(_MSC_VER)
# include <malloc.h>
# define alloca _alloca
# elif defined(__WATCOMC__)
# include <malloc.h>
# elif defined(__BORLANDC__)
# include <malloc.h>
# elif defined(__DMC__)
# include <stdlib.h>
# elif defined(__AIX__)
#pragma alloca
# elif defined(__MRC__)
void *alloca(unsigned);
# else
char *alloca();
# endif
#endif
/** /**
* The number of elements in an array. * The number of elements in an array.
@ -328,28 +350,6 @@ SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
extern "C" { extern "C" {
#endif #endif
#if defined(HAVE_ALLOCA) && !defined(alloca)
# if defined(HAVE_ALLOCA_H)
# include <alloca.h>
# elif defined(__GNUC__)
# define alloca __builtin_alloca
# elif defined(_MSC_VER)
# include <malloc.h>
# define alloca _alloca
# elif defined(__WATCOMC__)
# include <malloc.h>
# elif defined(__BORLANDC__)
# include <malloc.h>
# elif defined(__DMC__)
# include <stdlib.h>
# elif defined(__AIX__)
#pragma alloca
# elif defined(__MRC__)
void *alloca(unsigned);
# else
char *alloca();
# endif
#endif
#ifdef HAVE_ALLOCA #ifdef HAVE_ALLOCA
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count)) #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
#define SDL_stack_free(data) #define SDL_stack_free(data)
@ -445,12 +445,12 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
#endif #endif
} }
extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
@ -514,6 +514,8 @@ extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y); extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
extern DECLSPEC double SDLCALL SDL_cos(double x); extern DECLSPEC double SDLCALL SDL_cos(double x);
extern DECLSPEC float SDLCALL SDL_cosf(float x); extern DECLSPEC float SDLCALL SDL_cosf(float x);
extern DECLSPEC double SDLCALL SDL_exp(double x);
extern DECLSPEC float SDLCALL SDL_expf(float x);
extern DECLSPEC double SDLCALL SDL_fabs(double x); extern DECLSPEC double SDLCALL SDL_fabs(double x);
extern DECLSPEC float SDLCALL SDL_fabsf(float x); extern DECLSPEC float SDLCALL SDL_fabsf(float x);
extern DECLSPEC double SDLCALL SDL_floor(double x); extern DECLSPEC double SDLCALL SDL_floor(double x);

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -53,6 +53,7 @@ extern "C" {
#define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */ #define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */
#define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */ #define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */
#define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */ #define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */
#define SDL_SIMD_ALIGNED 0x00000008 /**< Surface uses aligned memory */
/* @} *//* Surface flags */ /* @} *//* Surface flags */
/** /**
@ -248,6 +249,13 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
int flag, Uint32 key); int flag, Uint32 key);
/**
* \brief Returns whether the surface has a color key
*
* \return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
/** /**
* \brief Gets the color key (transparent pixel) in a blittable surface. * \brief Gets the color key (transparent pixel) in a blittable surface.
* *

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -76,6 +76,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a
#endif /* __WIN32__ */ #endif /* __WIN32__ */
/* Platform specific functions for Linux */
#ifdef __LINUX__
/**
\brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available.
\return 0 on success, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
#endif /* __LINUX__ */
/* Platform specific functions for iOS */ /* Platform specific functions for iOS */
#if defined(__IPHONEOS__) && __IPHONEOS__ #if defined(__IPHONEOS__) && __IPHONEOS__
@ -113,6 +125,21 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void); extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
/**
\brief Return true if the application is running on a Chromebook
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
/**
\brief Return true is the application is running on a Samsung DeX docking station
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
/**
\brief Trigger the Android system back button behavior.
*/
extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
/** /**
See the official Android developer guide for more information: See the official Android developer guide for more information:
http://developer.android.com/guide/topics/data/data-storage.html http://developer.android.com/guide/topics/data/data-storage.html
@ -236,6 +263,11 @@ extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
#endif /* __WINRT__ */ #endif /* __WINRT__ */
/**
\brief Return true if the current device is a tablet.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -33,23 +33,17 @@
#include "SDL_video.h" #include "SDL_video.h"
#include "SDL_version.h" #include "SDL_version.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \file SDL_syswm.h * \brief SDL_syswm.h
* *
* Your application has access to a special type of event ::SDL_SYSWMEVENT, * Your application has access to a special type of event ::SDL_SYSWMEVENT,
* which contains window-manager specific information and arrives whenever * which contains window-manager specific information and arrives whenever
* an unhandled window event occurs. This event is ignored by default, but * an unhandled window event occurs. This event is ignored by default, but
* you can enable it with SDL_EventState(). * you can enable it with SDL_EventState().
*/ */
#ifdef SDL_PROTOTYPES_ONLY
struct SDL_SysWMinfo; struct SDL_SysWMinfo;
#else
#if !defined(SDL_PROTOTYPES_ONLY)
#if defined(SDL_VIDEO_DRIVER_WINDOWS) #if defined(SDL_VIDEO_DRIVER_WINDOWS)
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
@ -109,7 +103,16 @@ typedef void *EGLSurface;
#if defined(SDL_VIDEO_DRIVER_VIVANTE) #if defined(SDL_VIDEO_DRIVER_VIVANTE)
#include "SDL_egl.h" #include "SDL_egl.h"
#endif #endif
#endif /* SDL_PROTOTYPES_ONLY */
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(SDL_PROTOTYPES_ONLY)
/** /**
* These are the various supported windowing subsystems * These are the various supported windowing subsystems
*/ */
@ -122,7 +125,7 @@ typedef enum
SDL_SYSWM_COCOA, SDL_SYSWM_COCOA,
SDL_SYSWM_UIKIT, SDL_SYSWM_UIKIT,
SDL_SYSWM_WAYLAND, SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR, SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
SDL_SYSWM_WINRT, SDL_SYSWM_WINRT,
SDL_SYSWM_ANDROID, SDL_SYSWM_ANDROID,
SDL_SYSWM_VIVANTE, SDL_SYSWM_VIVANTE,
@ -257,11 +260,11 @@ struct SDL_SysWMinfo
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */ struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
} wl; } wl;
#endif #endif
#if defined(SDL_VIDEO_DRIVER_MIR) #if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
struct struct
{ {
struct MirConnection *connection; /**< Mir display server connection */ void *connection; /**< Mir display server connection */
struct MirSurface *surface; /**< Mir surface */ void *surface; /**< Mir surface */
} mir; } mir;
#endif #endif

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -140,14 +140,20 @@ SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);
*/ */
int SDLTest_CommonArg(SDLTest_CommonState * state, int index); int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
/** /**
* \brief Returns common usage information * \brief Logs command line usage info.
* *
* \param state The common state describing the test window to create. * This logs the appropriate command line options for the subsystems in use
* plus other common options, and then any application-specific options.
* This uses the SDL_Log() function and splits up output to be friendly to
* 80-character-wide terminals.
* *
* \returns String with usage information * \param state The common state describing the test window for the app.
* \param argv0 argv[0], as passed to main/SDL_main.
* \param options an array of strings for application specific options. The last element of the array should be NULL.
*/ */
const char *SDLTest_CommonUsage(SDLTest_CommonState * state); void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);
/** /**
* \brief Open test window. * \brief Open test window.
@ -158,6 +164,17 @@ const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
*/ */
SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state); SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
/**
* \brief Easy argument handling when test app doesn't need any custom args.
*
* \param state The common state describing the test window to create.
* \param argc argc, as supplied to SDL_main
* \param argv argv, as supplied to SDL_main
*
* \returns False if app should quit, true otherwise.
*/
SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);
/** /**
* \brief Common event handler for test windows. * \brief Common event handler for test windows.
* *

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

Some files were not shown because too many files have changed in this diff Show more