2010-09-07 11:34:51 -04:00
|
|
|
//========================================================================
|
2019-04-16 08:43:29 -04:00
|
|
|
// GLFW 3.4 - www.glfw.org
|
2010-09-07 11:34:51 -04:00
|
|
|
//------------------------------------------------------------------------
|
|
|
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
2019-04-15 14:50:00 -04:00
|
|
|
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
2010-09-07 11:34:51 -04:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
//========================================================================
|
|
|
|
|
2017-11-14 22:21:41 -05:00
|
|
|
#pragma once
|
|
|
|
|
2013-11-20 05:49:44 -05:00
|
|
|
#if defined(_GLFW_USE_CONFIG_H)
|
|
|
|
#include "glfw_config.h"
|
|
|
|
#endif
|
2013-01-15 16:43:44 -05:00
|
|
|
|
2015-03-17 11:33:21 -04:00
|
|
|
#if defined(GLFW_INCLUDE_GLCOREARB) || \
|
|
|
|
defined(GLFW_INCLUDE_ES1) || \
|
|
|
|
defined(GLFW_INCLUDE_ES2) || \
|
|
|
|
defined(GLFW_INCLUDE_ES3) || \
|
2017-01-01 23:58:41 -05:00
|
|
|
defined(GLFW_INCLUDE_ES31) || \
|
|
|
|
defined(GLFW_INCLUDE_ES32) || \
|
2015-03-17 11:33:21 -04:00
|
|
|
defined(GLFW_INCLUDE_NONE) || \
|
|
|
|
defined(GLFW_INCLUDE_GLEXT) || \
|
|
|
|
defined(GLFW_INCLUDE_GLU) || \
|
2016-08-04 19:32:23 -04:00
|
|
|
defined(GLFW_INCLUDE_VULKAN) || \
|
2015-03-17 11:33:21 -04:00
|
|
|
defined(GLFW_DLL)
|
2015-12-13 08:07:27 -05:00
|
|
|
#error "You must not define any header option macros when compiling GLFW"
|
2015-03-17 11:33:21 -04:00
|
|
|
#endif
|
|
|
|
|
2015-08-23 19:27:20 -04:00
|
|
|
#define GLFW_INCLUDE_NONE
|
2013-05-22 16:46:34 -04:00
|
|
|
#include "../include/GLFW/glfw3.h"
|
2013-01-15 16:43:44 -05:00
|
|
|
|
2016-12-04 19:19:48 -05:00
|
|
|
#define _GLFW_INSERT_FIRST 0
|
|
|
|
#define _GLFW_INSERT_LAST 1
|
|
|
|
|
2017-01-05 13:44:15 -05:00
|
|
|
#define _GLFW_POLL_PRESENCE 0
|
|
|
|
#define _GLFW_POLL_AXES 1
|
|
|
|
#define _GLFW_POLL_BUTTONS 2
|
2017-06-18 09:13:25 -04:00
|
|
|
#define _GLFW_POLL_ALL (_GLFW_POLL_AXES | _GLFW_POLL_BUTTONS)
|
2017-01-05 13:44:15 -05:00
|
|
|
|
2017-08-17 08:25:10 -04:00
|
|
|
#define _GLFW_MESSAGE_SIZE 1024
|
|
|
|
|
2015-08-10 14:19:04 -04:00
|
|
|
typedef int GLFWbool;
|
2021-07-16 08:57:22 -04:00
|
|
|
typedef void (*GLFWproc)(void);
|
2015-08-10 14:19:04 -04:00
|
|
|
|
2017-05-25 12:23:09 -04:00
|
|
|
typedef struct _GLFWerror _GLFWerror;
|
2017-02-14 09:43:31 -05:00
|
|
|
typedef struct _GLFWinitconfig _GLFWinitconfig;
|
2015-08-10 14:19:04 -04:00
|
|
|
typedef struct _GLFWwndconfig _GLFWwndconfig;
|
|
|
|
typedef struct _GLFWctxconfig _GLFWctxconfig;
|
|
|
|
typedef struct _GLFWfbconfig _GLFWfbconfig;
|
|
|
|
typedef struct _GLFWcontext _GLFWcontext;
|
|
|
|
typedef struct _GLFWwindow _GLFWwindow;
|
2021-07-13 15:50:09 -04:00
|
|
|
typedef struct _GLFWplatform _GLFWplatform;
|
2015-08-10 14:19:04 -04:00
|
|
|
typedef struct _GLFWlibrary _GLFWlibrary;
|
|
|
|
typedef struct _GLFWmonitor _GLFWmonitor;
|
|
|
|
typedef struct _GLFWcursor _GLFWcursor;
|
2017-06-18 09:13:25 -04:00
|
|
|
typedef struct _GLFWmapelement _GLFWmapelement;
|
|
|
|
typedef struct _GLFWmapping _GLFWmapping;
|
2017-01-05 13:44:15 -05:00
|
|
|
typedef struct _GLFWjoystick _GLFWjoystick;
|
2017-03-08 07:58:09 -05:00
|
|
|
typedef struct _GLFWtls _GLFWtls;
|
2017-05-25 12:23:09 -04:00
|
|
|
typedef struct _GLFWmutex _GLFWmutex;
|
2015-08-10 14:19:04 -04:00
|
|
|
|
2015-08-23 19:27:20 -04:00
|
|
|
#define GL_VERSION 0x1f02
|
2019-06-07 17:35:10 -04:00
|
|
|
#define GL_NONE 0
|
|
|
|
#define GL_COLOR_BUFFER_BIT 0x00004000
|
2016-10-13 11:24:51 -04:00
|
|
|
#define GL_UNSIGNED_BYTE 0x1401
|
2015-08-23 19:27:20 -04:00
|
|
|
#define GL_EXTENSIONS 0x1f03
|
|
|
|
#define GL_NUM_EXTENSIONS 0x821d
|
|
|
|
#define GL_CONTEXT_FLAGS 0x821e
|
|
|
|
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
|
|
|
|
#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
|
|
|
|
#define GL_CONTEXT_PROFILE_MASK 0x9126
|
|
|
|
#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
|
|
|
|
#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
|
|
|
|
#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
|
|
|
#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
|
|
|
#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
|
|
|
|
#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82fb
|
|
|
|
#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82fc
|
2015-08-10 06:46:14 -04:00
|
|
|
#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
|
2015-08-23 19:27:20 -04:00
|
|
|
|
2019-06-07 17:35:10 -04:00
|
|
|
typedef int GLint;
|
2015-08-23 19:27:20 -04:00
|
|
|
typedef unsigned int GLuint;
|
|
|
|
typedef unsigned int GLenum;
|
|
|
|
typedef unsigned int GLbitfield;
|
|
|
|
typedef unsigned char GLubyte;
|
2013-01-15 16:43:44 -05:00
|
|
|
|
2015-08-11 18:59:26 -04:00
|
|
|
typedef void (APIENTRY * PFNGLCLEARPROC)(GLbitfield);
|
|
|
|
typedef const GLubyte* (APIENTRY * PFNGLGETSTRINGPROC)(GLenum);
|
|
|
|
typedef void (APIENTRY * PFNGLGETINTEGERVPROC)(GLenum,GLint*);
|
2015-08-23 19:27:20 -04:00
|
|
|
typedef const GLubyte* (APIENTRY * PFNGLGETSTRINGIPROC)(GLenum,GLuint);
|
2015-08-11 18:59:26 -04:00
|
|
|
|
2021-07-18 10:57:53 -04:00
|
|
|
#if defined(_GLFW_WIN32)
|
|
|
|
#define EGLAPIENTRY __stdcall
|
|
|
|
#else
|
|
|
|
#define EGLAPIENTRY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define EGL_SUCCESS 0x3000
|
|
|
|
#define EGL_NOT_INITIALIZED 0x3001
|
|
|
|
#define EGL_BAD_ACCESS 0x3002
|
|
|
|
#define EGL_BAD_ALLOC 0x3003
|
|
|
|
#define EGL_BAD_ATTRIBUTE 0x3004
|
|
|
|
#define EGL_BAD_CONFIG 0x3005
|
|
|
|
#define EGL_BAD_CONTEXT 0x3006
|
|
|
|
#define EGL_BAD_CURRENT_SURFACE 0x3007
|
|
|
|
#define EGL_BAD_DISPLAY 0x3008
|
|
|
|
#define EGL_BAD_MATCH 0x3009
|
|
|
|
#define EGL_BAD_NATIVE_PIXMAP 0x300a
|
|
|
|
#define EGL_BAD_NATIVE_WINDOW 0x300b
|
|
|
|
#define EGL_BAD_PARAMETER 0x300c
|
|
|
|
#define EGL_BAD_SURFACE 0x300d
|
|
|
|
#define EGL_CONTEXT_LOST 0x300e
|
|
|
|
#define EGL_COLOR_BUFFER_TYPE 0x303f
|
|
|
|
#define EGL_RGB_BUFFER 0x308e
|
|
|
|
#define EGL_SURFACE_TYPE 0x3033
|
|
|
|
#define EGL_WINDOW_BIT 0x0004
|
|
|
|
#define EGL_RENDERABLE_TYPE 0x3040
|
|
|
|
#define EGL_OPENGL_ES_BIT 0x0001
|
|
|
|
#define EGL_OPENGL_ES2_BIT 0x0004
|
|
|
|
#define EGL_OPENGL_BIT 0x0008
|
|
|
|
#define EGL_ALPHA_SIZE 0x3021
|
|
|
|
#define EGL_BLUE_SIZE 0x3022
|
|
|
|
#define EGL_GREEN_SIZE 0x3023
|
|
|
|
#define EGL_RED_SIZE 0x3024
|
|
|
|
#define EGL_DEPTH_SIZE 0x3025
|
|
|
|
#define EGL_STENCIL_SIZE 0x3026
|
|
|
|
#define EGL_SAMPLES 0x3031
|
|
|
|
#define EGL_OPENGL_ES_API 0x30a0
|
|
|
|
#define EGL_OPENGL_API 0x30a2
|
|
|
|
#define EGL_NONE 0x3038
|
|
|
|
#define EGL_RENDER_BUFFER 0x3086
|
|
|
|
#define EGL_SINGLE_BUFFER 0x3085
|
|
|
|
#define EGL_EXTENSIONS 0x3055
|
|
|
|
#define EGL_CONTEXT_CLIENT_VERSION 0x3098
|
|
|
|
#define EGL_NATIVE_VISUAL_ID 0x302e
|
|
|
|
#define EGL_NO_SURFACE ((EGLSurface) 0)
|
|
|
|
#define EGL_NO_DISPLAY ((EGLDisplay) 0)
|
|
|
|
#define EGL_NO_CONTEXT ((EGLContext) 0)
|
|
|
|
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType) 0)
|
|
|
|
|
|
|
|
#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
|
|
|
|
#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
|
|
|
|
#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
|
|
|
|
#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
|
|
|
|
#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31bd
|
|
|
|
#define EGL_NO_RESET_NOTIFICATION_KHR 0x31be
|
|
|
|
#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31bf
|
|
|
|
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
|
|
|
|
#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098
|
|
|
|
#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30fb
|
|
|
|
#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30fd
|
|
|
|
#define EGL_CONTEXT_FLAGS_KHR 0x30fc
|
|
|
|
#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31b3
|
|
|
|
#define EGL_GL_COLORSPACE_KHR 0x309d
|
|
|
|
#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089
|
|
|
|
#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097
|
|
|
|
#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0
|
|
|
|
#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098
|
|
|
|
#define EGL_PLATFORM_X11_EXT 0x31d5
|
|
|
|
#define EGL_PLATFORM_WAYLAND_EXT 0x31d8
|
2021-12-14 12:35:30 -05:00
|
|
|
#define EGL_PRESENT_OPAQUE_EXT 0x31df
|
2021-07-18 10:57:53 -04:00
|
|
|
#define EGL_PLATFORM_ANGLE_ANGLE 0x3202
|
|
|
|
#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203
|
|
|
|
#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320d
|
|
|
|
#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320e
|
|
|
|
#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
|
|
|
|
#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
|
|
|
|
#define EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE 0x3450
|
|
|
|
#define EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE 0x3489
|
|
|
|
#define EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE 0x348f
|
|
|
|
|
|
|
|
typedef int EGLint;
|
|
|
|
typedef unsigned int EGLBoolean;
|
|
|
|
typedef unsigned int EGLenum;
|
|
|
|
typedef void* EGLConfig;
|
|
|
|
typedef void* EGLContext;
|
|
|
|
typedef void* EGLDisplay;
|
|
|
|
typedef void* EGLSurface;
|
|
|
|
|
|
|
|
typedef void* EGLNativeDisplayType;
|
|
|
|
typedef void* EGLNativeWindowType;
|
|
|
|
|
|
|
|
// EGL function pointer typedefs
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglGetConfigAttrib)(EGLDisplay,EGLConfig,EGLint,EGLint*);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglGetConfigs)(EGLDisplay,EGLConfig*,EGLint,EGLint*);
|
|
|
|
typedef EGLDisplay (EGLAPIENTRY * PFN_eglGetDisplay)(EGLNativeDisplayType);
|
|
|
|
typedef EGLint (EGLAPIENTRY * PFN_eglGetError)(void);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglInitialize)(EGLDisplay,EGLint*,EGLint*);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglTerminate)(EGLDisplay);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglBindAPI)(EGLenum);
|
|
|
|
typedef EGLContext (EGLAPIENTRY * PFN_eglCreateContext)(EGLDisplay,EGLConfig,EGLContext,const EGLint*);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglDestroySurface)(EGLDisplay,EGLSurface);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglDestroyContext)(EGLDisplay,EGLContext);
|
|
|
|
typedef EGLSurface (EGLAPIENTRY * PFN_eglCreateWindowSurface)(EGLDisplay,EGLConfig,EGLNativeWindowType,const EGLint*);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglMakeCurrent)(EGLDisplay,EGLSurface,EGLSurface,EGLContext);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglSwapBuffers)(EGLDisplay,EGLSurface);
|
|
|
|
typedef EGLBoolean (EGLAPIENTRY * PFN_eglSwapInterval)(EGLDisplay,EGLint);
|
|
|
|
typedef const char* (EGLAPIENTRY * PFN_eglQueryString)(EGLDisplay,EGLint);
|
|
|
|
typedef GLFWglproc (EGLAPIENTRY * PFN_eglGetProcAddress)(const char*);
|
|
|
|
#define eglGetConfigAttrib _glfw.egl.GetConfigAttrib
|
|
|
|
#define eglGetConfigs _glfw.egl.GetConfigs
|
|
|
|
#define eglGetDisplay _glfw.egl.GetDisplay
|
|
|
|
#define eglGetError _glfw.egl.GetError
|
|
|
|
#define eglInitialize _glfw.egl.Initialize
|
|
|
|
#define eglTerminate _glfw.egl.Terminate
|
|
|
|
#define eglBindAPI _glfw.egl.BindAPI
|
|
|
|
#define eglCreateContext _glfw.egl.CreateContext
|
|
|
|
#define eglDestroySurface _glfw.egl.DestroySurface
|
|
|
|
#define eglDestroyContext _glfw.egl.DestroyContext
|
|
|
|
#define eglCreateWindowSurface _glfw.egl.CreateWindowSurface
|
|
|
|
#define eglMakeCurrent _glfw.egl.MakeCurrent
|
|
|
|
#define eglSwapBuffers _glfw.egl.SwapBuffers
|
|
|
|
#define eglSwapInterval _glfw.egl.SwapInterval
|
|
|
|
#define eglQueryString _glfw.egl.QueryString
|
|
|
|
#define eglGetProcAddress _glfw.egl.GetProcAddress
|
|
|
|
|
|
|
|
typedef EGLDisplay (EGLAPIENTRY * PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum,void*,const EGLint*);
|
|
|
|
typedef EGLSurface (EGLAPIENTRY * PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)(EGLDisplay,EGLConfig,void*,const EGLint*);
|
|
|
|
#define eglGetPlatformDisplayEXT _glfw.egl.GetPlatformDisplayEXT
|
|
|
|
#define eglCreatePlatformWindowSurfaceEXT _glfw.egl.CreatePlatformWindowSurfaceEXT
|
|
|
|
|
|
|
|
#define OSMESA_RGBA 0x1908
|
|
|
|
#define OSMESA_FORMAT 0x22
|
|
|
|
#define OSMESA_DEPTH_BITS 0x30
|
|
|
|
#define OSMESA_STENCIL_BITS 0x31
|
|
|
|
#define OSMESA_ACCUM_BITS 0x32
|
|
|
|
#define OSMESA_PROFILE 0x33
|
|
|
|
#define OSMESA_CORE_PROFILE 0x34
|
|
|
|
#define OSMESA_COMPAT_PROFILE 0x35
|
|
|
|
#define OSMESA_CONTEXT_MAJOR_VERSION 0x36
|
|
|
|
#define OSMESA_CONTEXT_MINOR_VERSION 0x37
|
|
|
|
|
|
|
|
typedef void* OSMesaContext;
|
|
|
|
typedef void (*OSMESAproc)(void);
|
|
|
|
|
|
|
|
typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextExt)(GLenum,GLint,GLint,GLint,OSMesaContext);
|
|
|
|
typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextAttribs)(const int*,OSMesaContext);
|
|
|
|
typedef void (GLAPIENTRY * PFN_OSMesaDestroyContext)(OSMesaContext);
|
|
|
|
typedef int (GLAPIENTRY * PFN_OSMesaMakeCurrent)(OSMesaContext,void*,int,int,int);
|
|
|
|
typedef int (GLAPIENTRY * PFN_OSMesaGetColorBuffer)(OSMesaContext,int*,int*,int*,void**);
|
|
|
|
typedef int (GLAPIENTRY * PFN_OSMesaGetDepthBuffer)(OSMesaContext,int*,int*,int*,void**);
|
|
|
|
typedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*);
|
|
|
|
#define OSMesaCreateContextExt _glfw.osmesa.CreateContextExt
|
|
|
|
#define OSMesaCreateContextAttribs _glfw.osmesa.CreateContextAttribs
|
|
|
|
#define OSMesaDestroyContext _glfw.osmesa.DestroyContext
|
|
|
|
#define OSMesaMakeCurrent _glfw.osmesa.MakeCurrent
|
|
|
|
#define OSMesaGetColorBuffer _glfw.osmesa.GetColorBuffer
|
|
|
|
#define OSMesaGetDepthBuffer _glfw.osmesa.GetDepthBuffer
|
|
|
|
#define OSMesaGetProcAddress _glfw.osmesa.GetProcAddress
|
|
|
|
|
2015-08-10 14:19:04 -04:00
|
|
|
#define VK_NULL_HANDLE 0
|
2013-01-15 16:43:44 -05:00
|
|
|
|
2016-02-16 15:40:01 -05:00
|
|
|
typedef void* VkInstance;
|
|
|
|
typedef void* VkPhysicalDevice;
|
2016-03-23 05:09:07 -04:00
|
|
|
typedef uint64_t VkSurfaceKHR;
|
2016-03-23 05:24:01 -04:00
|
|
|
typedef uint32_t VkFlags;
|
|
|
|
typedef uint32_t VkBool32;
|
2015-08-10 14:19:04 -04:00
|
|
|
|
|
|
|
typedef enum VkStructureType
|
|
|
|
{
|
|
|
|
VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
|
|
|
|
VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
|
|
|
|
VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
|
|
|
|
VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
|
2018-03-03 15:58:42 -05:00
|
|
|
VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
|
2020-01-05 10:46:42 -05:00
|
|
|
VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000,
|
2015-08-10 14:19:04 -04:00
|
|
|
VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
|
|
|
} VkStructureType;
|
|
|
|
|
|
|
|
typedef enum VkResult
|
|
|
|
{
|
|
|
|
VK_SUCCESS = 0,
|
|
|
|
VK_NOT_READY = 1,
|
|
|
|
VK_TIMEOUT = 2,
|
|
|
|
VK_EVENT_SET = 3,
|
|
|
|
VK_EVENT_RESET = 4,
|
|
|
|
VK_INCOMPLETE = 5,
|
|
|
|
VK_ERROR_OUT_OF_HOST_MEMORY = -1,
|
|
|
|
VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
|
|
|
|
VK_ERROR_INITIALIZATION_FAILED = -3,
|
|
|
|
VK_ERROR_DEVICE_LOST = -4,
|
|
|
|
VK_ERROR_MEMORY_MAP_FAILED = -5,
|
|
|
|
VK_ERROR_LAYER_NOT_PRESENT = -6,
|
|
|
|
VK_ERROR_EXTENSION_NOT_PRESENT = -7,
|
|
|
|
VK_ERROR_FEATURE_NOT_PRESENT = -8,
|
|
|
|
VK_ERROR_INCOMPATIBLE_DRIVER = -9,
|
|
|
|
VK_ERROR_TOO_MANY_OBJECTS = -10,
|
|
|
|
VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
|
|
|
|
VK_ERROR_SURFACE_LOST_KHR = -1000000000,
|
|
|
|
VK_SUBOPTIMAL_KHR = 1000001003,
|
|
|
|
VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
|
|
|
|
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
|
|
|
|
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
|
|
|
|
VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
|
|
|
|
VK_RESULT_MAX_ENUM = 0x7FFFFFFF
|
|
|
|
} VkResult;
|
|
|
|
|
|
|
|
typedef struct VkAllocationCallbacks VkAllocationCallbacks;
|
|
|
|
|
|
|
|
typedef struct VkExtensionProperties
|
|
|
|
{
|
|
|
|
char extensionName[256];
|
2016-03-23 05:24:01 -04:00
|
|
|
uint32_t specVersion;
|
2015-08-10 14:19:04 -04:00
|
|
|
} VkExtensionProperties;
|
|
|
|
|
|
|
|
typedef void (APIENTRY * PFN_vkVoidFunction)(void);
|
|
|
|
|
2021-10-21 14:45:44 -04:00
|
|
|
typedef PFN_vkVoidFunction (APIENTRY * PFN_vkGetInstanceProcAddr)(VkInstance,const char*);
|
|
|
|
typedef VkResult (APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const char*,uint32_t*,VkExtensionProperties*);
|
|
|
|
#define vkGetInstanceProcAddr _glfw.vk.GetInstanceProcAddr
|
2015-08-23 13:30:04 -04:00
|
|
|
|
2021-07-13 15:50:09 -04:00
|
|
|
#include "platform.h"
|
2013-01-15 16:43:44 -05:00
|
|
|
|
2015-11-05 06:08:27 -05:00
|
|
|
// Constructs a version number string from the public header macros
|
|
|
|
#define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r
|
|
|
|
#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r)
|
|
|
|
#define _GLFW_VERSION_NUMBER _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, \
|
|
|
|
GLFW_VERSION_MINOR, \
|
|
|
|
GLFW_VERSION_REVISION)
|
|
|
|
|
2015-01-05 15:55:15 -05:00
|
|
|
// Checks for whether the library has been initialized
|
2013-02-19 18:28:08 -05:00
|
|
|
#define _GLFW_REQUIRE_INIT() \
|
2017-02-06 09:58:15 -05:00
|
|
|
if (!_glfw.initialized) \
|
2013-02-19 18:28:08 -05:00
|
|
|
{ \
|
|
|
|
_glfwInputError(GLFW_NOT_INITIALIZED, NULL); \
|
|
|
|
return; \
|
|
|
|
}
|
|
|
|
#define _GLFW_REQUIRE_INIT_OR_RETURN(x) \
|
2017-02-06 09:58:15 -05:00
|
|
|
if (!_glfw.initialized) \
|
2013-02-19 18:28:08 -05:00
|
|
|
{ \
|
|
|
|
_glfwInputError(GLFW_NOT_INITIALIZED, NULL); \
|
|
|
|
return x; \
|
|
|
|
}
|
|
|
|
|
2013-07-30 08:43:01 -04:00
|
|
|
// Swaps the provided pointers
|
2021-10-21 13:43:01 -04:00
|
|
|
#define _GLFW_SWAP(type, x, y) \
|
|
|
|
{ \
|
|
|
|
type t; \
|
|
|
|
t = x; \
|
|
|
|
x = y; \
|
|
|
|
y = t; \
|
2013-07-30 08:43:01 -04:00
|
|
|
}
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Per-thread error structure
|
|
|
|
//
|
2017-05-25 12:23:09 -04:00
|
|
|
struct _GLFWerror
|
|
|
|
{
|
|
|
|
_GLFWerror* next;
|
|
|
|
int code;
|
2017-08-17 08:25:10 -04:00
|
|
|
char description[_GLFW_MESSAGE_SIZE];
|
2017-05-25 12:23:09 -04:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Initialization configuration
|
|
|
|
//
|
|
|
|
// Parameters relating to the initialization of the library
|
|
|
|
//
|
2017-02-14 09:43:31 -05:00
|
|
|
struct _GLFWinitconfig
|
|
|
|
{
|
2017-03-01 17:27:20 -05:00
|
|
|
GLFWbool hatButtons;
|
2020-06-25 12:22:08 -04:00
|
|
|
int angleType;
|
2021-07-13 15:50:09 -04:00
|
|
|
int platformID;
|
2021-10-21 14:45:44 -04:00
|
|
|
PFN_vkGetInstanceProcAddr vulkanLoader;
|
2017-02-14 09:43:31 -05:00
|
|
|
struct {
|
|
|
|
GLFWbool menubar;
|
|
|
|
GLFWbool chdir;
|
|
|
|
} ns;
|
2020-10-23 12:55:37 -04:00
|
|
|
struct {
|
|
|
|
GLFWbool xcbVulkanSurface;
|
|
|
|
} x11;
|
2017-02-14 09:43:31 -05:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Window configuration
|
|
|
|
//
|
|
|
|
// Parameters relating to the creation of the window but not directly related
|
|
|
|
// to the framebuffer. This is used to pass window creation parameters from
|
|
|
|
// shared code to the platform API.
|
|
|
|
//
|
2010-10-04 12:17:53 -04:00
|
|
|
struct _GLFWwndconfig
|
2010-09-09 14:18:10 -04:00
|
|
|
{
|
2012-11-25 08:53:33 -05:00
|
|
|
int width;
|
|
|
|
int height;
|
2010-10-04 12:17:53 -04:00
|
|
|
const char* title;
|
2015-08-23 13:30:04 -04:00
|
|
|
GLFWbool resizable;
|
|
|
|
GLFWbool visible;
|
|
|
|
GLFWbool decorated;
|
|
|
|
GLFWbool focused;
|
|
|
|
GLFWbool autoIconify;
|
|
|
|
GLFWbool floating;
|
2015-10-13 06:50:59 -04:00
|
|
|
GLFWbool maximized;
|
2016-08-18 11:47:54 -04:00
|
|
|
GLFWbool centerCursor;
|
2018-05-29 09:51:36 -04:00
|
|
|
GLFWbool focusOnShow;
|
2019-09-30 08:44:43 -04:00
|
|
|
GLFWbool mousePassthrough;
|
2018-08-31 07:33:48 -04:00
|
|
|
GLFWbool scaleToMonitor;
|
2016-12-06 18:41:54 -05:00
|
|
|
struct {
|
|
|
|
GLFWbool retina;
|
2017-12-12 10:45:38 -05:00
|
|
|
char frameName[256];
|
2016-12-06 18:41:54 -05:00
|
|
|
} ns;
|
2017-12-12 04:54:18 -05:00
|
|
|
struct {
|
|
|
|
char className[256];
|
|
|
|
char instanceName[256];
|
|
|
|
} x11;
|
2019-08-20 13:00:59 -04:00
|
|
|
struct {
|
|
|
|
GLFWbool keymenu;
|
|
|
|
} win32;
|
2014-03-06 14:05:32 -05:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Context configuration
|
|
|
|
//
|
|
|
|
// Parameters relating to the creation of the context but not directly related
|
|
|
|
// to the framebuffer. This is used to pass context creation parameters from
|
|
|
|
// shared code to the platform API.
|
|
|
|
//
|
2014-03-06 14:05:32 -05:00
|
|
|
struct _GLFWctxconfig
|
|
|
|
{
|
2016-03-28 07:19:31 -04:00
|
|
|
int client;
|
|
|
|
int source;
|
2014-03-06 14:05:32 -05:00
|
|
|
int major;
|
|
|
|
int minor;
|
2015-08-23 13:30:04 -04:00
|
|
|
GLFWbool forward;
|
|
|
|
GLFWbool debug;
|
2015-08-10 06:46:14 -04:00
|
|
|
GLFWbool noerror;
|
2014-03-06 14:05:32 -05:00
|
|
|
int profile;
|
|
|
|
int robustness;
|
2014-08-21 13:21:45 -04:00
|
|
|
int release;
|
2010-10-04 12:17:53 -04:00
|
|
|
_GLFWwindow* share;
|
2017-01-27 06:02:09 -05:00
|
|
|
struct {
|
|
|
|
GLFWbool offline;
|
|
|
|
} nsgl;
|
2010-10-04 12:17:53 -04:00
|
|
|
};
|
2010-09-07 11:34:51 -04:00
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Framebuffer configuration
|
|
|
|
//
|
|
|
|
// This describes buffers and their sizes. It also contains
|
|
|
|
// a platform-specific ID used to map back to the backend API object.
|
|
|
|
//
|
|
|
|
// It is used to pass framebuffer parameters from shared code to the platform
|
|
|
|
// API and also to enumerate and select available framebuffer configs.
|
|
|
|
//
|
2010-10-04 12:17:53 -04:00
|
|
|
struct _GLFWfbconfig
|
2010-09-09 14:18:10 -04:00
|
|
|
{
|
2010-09-07 11:34:51 -04:00
|
|
|
int redBits;
|
|
|
|
int greenBits;
|
|
|
|
int blueBits;
|
|
|
|
int alphaBits;
|
|
|
|
int depthBits;
|
|
|
|
int stencilBits;
|
|
|
|
int accumRedBits;
|
|
|
|
int accumGreenBits;
|
|
|
|
int accumBlueBits;
|
|
|
|
int accumAlphaBits;
|
|
|
|
int auxBuffers;
|
2015-12-10 11:10:05 -05:00
|
|
|
GLFWbool stereo;
|
2010-09-07 11:34:51 -04:00
|
|
|
int samples;
|
2015-12-10 11:10:05 -05:00
|
|
|
GLFWbool sRGB;
|
|
|
|
GLFWbool doublebuffer;
|
2017-09-19 12:27:45 -04:00
|
|
|
GLFWbool transparent;
|
2016-03-28 14:11:22 -04:00
|
|
|
uintptr_t handle;
|
2010-10-04 12:17:53 -04:00
|
|
|
};
|
2010-09-07 11:34:51 -04:00
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Context structure
|
|
|
|
//
|
2015-11-09 10:48:55 -05:00
|
|
|
struct _GLFWcontext
|
|
|
|
{
|
2016-03-28 07:19:31 -04:00
|
|
|
int client;
|
|
|
|
int source;
|
2015-11-09 10:48:55 -05:00
|
|
|
int major, minor, revision;
|
|
|
|
GLFWbool forward, debug, noerror;
|
|
|
|
int profile;
|
|
|
|
int robustness;
|
|
|
|
int release;
|
|
|
|
|
2020-12-10 09:18:55 -05:00
|
|
|
PFNGLGETSTRINGIPROC GetStringi;
|
2015-11-09 10:48:55 -05:00
|
|
|
PFNGLGETINTEGERVPROC GetIntegerv;
|
2020-12-10 09:18:55 -05:00
|
|
|
PFNGLGETSTRINGPROC GetString;
|
2015-11-09 10:48:55 -05:00
|
|
|
|
2021-08-30 14:40:35 -04:00
|
|
|
void (*makeCurrent)(_GLFWwindow*);
|
|
|
|
void (*swapBuffers)(_GLFWwindow*);
|
|
|
|
void (*swapInterval)(int);
|
|
|
|
int (*extensionSupported)(const char*);
|
|
|
|
GLFWglproc (*getProcAddress)(const char*);
|
|
|
|
void (*destroy)(_GLFWwindow*);
|
2016-03-28 07:19:31 -04:00
|
|
|
|
2021-07-18 10:57:53 -04:00
|
|
|
struct {
|
|
|
|
EGLConfig config;
|
|
|
|
EGLContext handle;
|
|
|
|
EGLSurface surface;
|
|
|
|
void* client;
|
|
|
|
} egl;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
OSMesaContext handle;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
void* buffer;
|
|
|
|
} osmesa;
|
|
|
|
|
2021-07-13 15:50:09 -04:00
|
|
|
// This is defined in platform.h
|
|
|
|
GLFW_PLATFORM_CONTEXT_STATE
|
2015-11-09 10:48:55 -05:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Window and context structure
|
|
|
|
//
|
2010-10-04 12:17:53 -04:00
|
|
|
struct _GLFWwindow
|
2010-09-09 14:18:10 -04:00
|
|
|
{
|
2010-09-09 18:06:23 -04:00
|
|
|
struct _GLFWwindow* next;
|
|
|
|
|
2010-09-09 14:18:10 -04:00
|
|
|
// Window settings and state
|
2015-08-23 13:30:04 -04:00
|
|
|
GLFWbool resizable;
|
|
|
|
GLFWbool decorated;
|
|
|
|
GLFWbool autoIconify;
|
|
|
|
GLFWbool floating;
|
2018-05-29 09:51:36 -04:00
|
|
|
GLFWbool focusOnShow;
|
2019-09-30 08:44:43 -04:00
|
|
|
GLFWbool mousePassthrough;
|
2016-12-08 08:53:01 -05:00
|
|
|
GLFWbool shouldClose;
|
2013-01-02 10:48:02 -05:00
|
|
|
void* userPointer;
|
2021-05-13 15:38:46 -04:00
|
|
|
GLFWbool doublebuffer;
|
2013-01-02 11:29:24 -05:00
|
|
|
GLFWvidmode videoMode;
|
2013-01-02 10:48:02 -05:00
|
|
|
_GLFWmonitor* monitor;
|
2013-12-04 08:19:22 -05:00
|
|
|
_GLFWcursor* cursor;
|
2010-09-09 12:15:32 -04:00
|
|
|
|
2016-02-23 06:26:42 -05:00
|
|
|
int minwidth, minheight;
|
|
|
|
int maxwidth, maxheight;
|
|
|
|
int numer, denom;
|
|
|
|
|
2015-08-23 13:30:04 -04:00
|
|
|
GLFWbool stickyKeys;
|
|
|
|
GLFWbool stickyMouseButtons;
|
2017-11-29 14:42:37 -05:00
|
|
|
GLFWbool lockKeyMods;
|
2013-01-02 10:48:02 -05:00
|
|
|
int cursorMode;
|
2014-05-18 15:28:11 -04:00
|
|
|
char mouseButtons[GLFW_MOUSE_BUTTON_LAST + 1];
|
|
|
|
char keys[GLFW_KEY_LAST + 1];
|
2016-05-24 06:23:58 -04:00
|
|
|
// Virtual cursor position when cursor is disabled
|
|
|
|
double virtualCursorPosX, virtualCursorPosY;
|
2019-02-11 13:10:20 -05:00
|
|
|
GLFWbool rawMouseMotion;
|
2010-09-09 12:15:32 -04:00
|
|
|
|
2015-11-09 10:48:55 -05:00
|
|
|
_GLFWcontext context;
|
2010-09-09 12:15:32 -04:00
|
|
|
|
2013-01-15 15:34:26 -05:00
|
|
|
struct {
|
2020-12-10 09:18:55 -05:00
|
|
|
GLFWwindowposfun pos;
|
|
|
|
GLFWwindowsizefun size;
|
|
|
|
GLFWwindowclosefun close;
|
|
|
|
GLFWwindowrefreshfun refresh;
|
|
|
|
GLFWwindowfocusfun focus;
|
|
|
|
GLFWwindowiconifyfun iconify;
|
|
|
|
GLFWwindowmaximizefun maximize;
|
|
|
|
GLFWframebuffersizefun fbsize;
|
2017-12-11 15:26:40 -05:00
|
|
|
GLFWwindowcontentscalefun scale;
|
2020-12-10 09:18:55 -05:00
|
|
|
GLFWmousebuttonfun mouseButton;
|
|
|
|
GLFWcursorposfun cursorPos;
|
|
|
|
GLFWcursorenterfun cursorEnter;
|
|
|
|
GLFWscrollfun scroll;
|
|
|
|
GLFWkeyfun key;
|
|
|
|
GLFWcharfun character;
|
|
|
|
GLFWcharmodsfun charmods;
|
|
|
|
GLFWdropfun drop;
|
2013-01-15 15:34:26 -05:00
|
|
|
} callbacks;
|
2012-10-28 08:45:11 -04:00
|
|
|
|
2021-07-13 15:50:09 -04:00
|
|
|
// This is defined in platform.h
|
|
|
|
GLFW_PLATFORM_WINDOW_STATE
|
2010-10-04 12:17:53 -04:00
|
|
|
};
|
2010-09-09 12:15:32 -04:00
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Monitor structure
|
|
|
|
//
|
2011-10-03 03:24:35 -04:00
|
|
|
struct _GLFWmonitor
|
2011-05-07 04:53:50 -04:00
|
|
|
{
|
2021-05-13 11:32:31 -04:00
|
|
|
char name[128];
|
2017-12-07 10:19:57 -05:00
|
|
|
void* userPointer;
|
2012-09-13 11:46:40 -04:00
|
|
|
|
2013-01-02 10:48:02 -05:00
|
|
|
// Physical dimensions in millimeters.
|
|
|
|
int widthMM, heightMM;
|
2011-10-02 16:13:47 -04:00
|
|
|
|
2016-02-23 06:34:35 -05:00
|
|
|
// The window whose video mode is current on this monitor
|
|
|
|
_GLFWwindow* window;
|
|
|
|
|
2013-01-02 10:48:02 -05:00
|
|
|
GLFWvidmode* modes;
|
|
|
|
int modeCount;
|
2013-05-22 16:16:43 -04:00
|
|
|
GLFWvidmode currentMode;
|
2012-08-02 20:57:33 -04:00
|
|
|
|
2013-02-12 07:50:41 -05:00
|
|
|
GLFWgammaramp originalRamp;
|
2013-05-19 09:46:44 -04:00
|
|
|
GLFWgammaramp currentRamp;
|
2013-02-12 07:50:41 -05:00
|
|
|
|
2021-07-13 15:50:09 -04:00
|
|
|
// This is defined in platform.h
|
|
|
|
GLFW_PLATFORM_MONITOR_STATE
|
2011-05-07 04:53:50 -04:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Cursor structure
|
|
|
|
//
|
2013-12-04 08:19:22 -05:00
|
|
|
struct _GLFWcursor
|
|
|
|
{
|
|
|
|
_GLFWcursor* next;
|
2021-07-13 15:50:09 -04:00
|
|
|
// This is defined in platform.h
|
|
|
|
GLFW_PLATFORM_CURSOR_STATE
|
2013-12-04 08:19:22 -05:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Gamepad mapping element structure
|
|
|
|
//
|
2017-06-18 09:13:25 -04:00
|
|
|
struct _GLFWmapelement
|
|
|
|
{
|
|
|
|
uint8_t type;
|
2018-02-13 12:33:31 -05:00
|
|
|
uint8_t index;
|
2018-02-13 11:07:46 -05:00
|
|
|
int8_t axisScale;
|
|
|
|
int8_t axisOffset;
|
2017-06-18 09:13:25 -04:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Gamepad mapping structure
|
|
|
|
//
|
2017-06-18 09:13:25 -04:00
|
|
|
struct _GLFWmapping
|
|
|
|
{
|
|
|
|
char name[128];
|
|
|
|
char guid[33];
|
|
|
|
_GLFWmapelement buttons[15];
|
|
|
|
_GLFWmapelement axes[6];
|
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Joystick structure
|
|
|
|
//
|
2017-01-05 13:44:15 -05:00
|
|
|
struct _GLFWjoystick
|
|
|
|
{
|
|
|
|
GLFWbool present;
|
|
|
|
float* axes;
|
|
|
|
int axisCount;
|
|
|
|
unsigned char* buttons;
|
|
|
|
int buttonCount;
|
2017-03-01 17:27:20 -05:00
|
|
|
unsigned char* hats;
|
|
|
|
int hatCount;
|
2021-05-13 11:32:31 -04:00
|
|
|
char name[128];
|
2017-12-07 10:19:57 -05:00
|
|
|
void* userPointer;
|
2017-06-18 09:13:25 -04:00
|
|
|
char guid[33];
|
|
|
|
_GLFWmapping* mapping;
|
2017-01-05 13:44:15 -05:00
|
|
|
|
2021-07-13 15:50:09 -04:00
|
|
|
// This is defined in platform.h
|
|
|
|
GLFW_PLATFORM_JOYSTICK_STATE
|
2017-01-05 13:44:15 -05:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Thread local storage structure
|
|
|
|
//
|
2017-03-08 07:58:09 -05:00
|
|
|
struct _GLFWtls
|
|
|
|
{
|
2021-07-13 15:50:09 -04:00
|
|
|
// This is defined in platform.h
|
|
|
|
GLFW_PLATFORM_TLS_STATE
|
2017-03-08 07:58:09 -05:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Mutex structure
|
|
|
|
//
|
2017-05-25 12:23:09 -04:00
|
|
|
struct _GLFWmutex
|
|
|
|
{
|
2021-07-13 15:50:09 -04:00
|
|
|
// This is defined in platform.h
|
|
|
|
GLFW_PLATFORM_MUTEX_STATE
|
|
|
|
};
|
|
|
|
|
|
|
|
// Platform API structure
|
|
|
|
//
|
|
|
|
struct _GLFWplatform
|
|
|
|
{
|
|
|
|
int platformID;
|
|
|
|
// init
|
|
|
|
GLFWbool (*init)(void);
|
|
|
|
void (*terminate)(void);
|
|
|
|
// input
|
|
|
|
void (*getCursorPos)(_GLFWwindow*,double*,double*);
|
|
|
|
void (*setCursorPos)(_GLFWwindow*,double,double);
|
|
|
|
void (*setCursorMode)(_GLFWwindow*,int);
|
|
|
|
void (*setRawMouseMotion)(_GLFWwindow*,GLFWbool);
|
|
|
|
GLFWbool (*rawMouseMotionSupported)(void);
|
|
|
|
int (*createCursor)(_GLFWcursor*,const GLFWimage*,int,int);
|
|
|
|
int (*createStandardCursor)(_GLFWcursor*,int);
|
|
|
|
void (*destroyCursor)(_GLFWcursor*);
|
|
|
|
void (*setCursor)(_GLFWwindow*,_GLFWcursor*);
|
|
|
|
const char* (*getScancodeName)(int);
|
|
|
|
int (*getKeyScancode)(int);
|
|
|
|
void (*setClipboardString)(const char*);
|
|
|
|
const char* (*getClipboardString)(void);
|
|
|
|
GLFWbool (*initJoysticks)(void);
|
|
|
|
void (*terminateJoysticks)(void);
|
|
|
|
int (*pollJoystick)(_GLFWjoystick*,int);
|
|
|
|
const char* (*getMappingName)(void);
|
|
|
|
void (*updateGamepadGUID)(char*);
|
|
|
|
// monitor
|
|
|
|
void (*freeMonitor)(_GLFWmonitor*);
|
|
|
|
void (*getMonitorPos)(_GLFWmonitor*,int*,int*);
|
|
|
|
void (*getMonitorContentScale)(_GLFWmonitor*,float*,float*);
|
|
|
|
void (*getMonitorWorkarea)(_GLFWmonitor*,int*,int*,int*,int*);
|
|
|
|
GLFWvidmode* (*getVideoModes)(_GLFWmonitor*,int*);
|
|
|
|
void (*getVideoMode)(_GLFWmonitor*,GLFWvidmode*);
|
|
|
|
GLFWbool (*getGammaRamp)(_GLFWmonitor*,GLFWgammaramp*);
|
|
|
|
void (*setGammaRamp)(_GLFWmonitor*,const GLFWgammaramp*);
|
|
|
|
// window
|
|
|
|
int (*createWindow)(_GLFWwindow*,const _GLFWwndconfig*,const _GLFWctxconfig*,const _GLFWfbconfig*);
|
|
|
|
void (*destroyWindow)(_GLFWwindow*);
|
|
|
|
void (*setWindowTitle)(_GLFWwindow*,const char*);
|
|
|
|
void (*setWindowIcon)(_GLFWwindow*,int,const GLFWimage*);
|
|
|
|
void (*getWindowPos)(_GLFWwindow*,int*,int*);
|
|
|
|
void (*setWindowPos)(_GLFWwindow*,int,int);
|
|
|
|
void (*getWindowSize)(_GLFWwindow*,int*,int*);
|
|
|
|
void (*setWindowSize)(_GLFWwindow*,int,int);
|
|
|
|
void (*setWindowSizeLimits)(_GLFWwindow*,int,int,int,int);
|
|
|
|
void (*setWindowAspectRatio)(_GLFWwindow*,int,int);
|
|
|
|
void (*getFramebufferSize)(_GLFWwindow*,int*,int*);
|
|
|
|
void (*getWindowFrameSize)(_GLFWwindow*,int*,int*,int*,int*);
|
|
|
|
void (*getWindowContentScale)(_GLFWwindow*,float*,float*);
|
|
|
|
void (*iconifyWindow)(_GLFWwindow*);
|
|
|
|
void (*restoreWindow)(_GLFWwindow*);
|
|
|
|
void (*maximizeWindow)(_GLFWwindow*);
|
|
|
|
void (*showWindow)(_GLFWwindow*);
|
|
|
|
void (*hideWindow)(_GLFWwindow*);
|
|
|
|
void (*requestWindowAttention)(_GLFWwindow*);
|
|
|
|
void (*focusWindow)(_GLFWwindow*);
|
|
|
|
void (*setWindowMonitor)(_GLFWwindow*,_GLFWmonitor*,int,int,int,int,int);
|
|
|
|
int (*windowFocused)(_GLFWwindow*);
|
|
|
|
int (*windowIconified)(_GLFWwindow*);
|
|
|
|
int (*windowVisible)(_GLFWwindow*);
|
|
|
|
int (*windowMaximized)(_GLFWwindow*);
|
|
|
|
int (*windowHovered)(_GLFWwindow*);
|
|
|
|
int (*framebufferTransparent)(_GLFWwindow*);
|
|
|
|
float (*getWindowOpacity)(_GLFWwindow*);
|
|
|
|
void (*setWindowResizable)(_GLFWwindow*,GLFWbool);
|
|
|
|
void (*setWindowDecorated)(_GLFWwindow*,GLFWbool);
|
|
|
|
void (*setWindowFloating)(_GLFWwindow*,GLFWbool);
|
|
|
|
void (*setWindowOpacity)(_GLFWwindow*,float);
|
|
|
|
void (*setWindowMousePassthrough)(_GLFWwindow*,GLFWbool);
|
|
|
|
void (*pollEvents)(void);
|
|
|
|
void (*waitEvents)(void);
|
|
|
|
void (*waitEventsTimeout)(double);
|
|
|
|
void (*postEmptyEvent)(void);
|
|
|
|
// EGL
|
|
|
|
EGLenum (*getEGLPlatform)(EGLint**);
|
|
|
|
EGLNativeDisplayType (*getEGLNativeDisplay)(void);
|
|
|
|
EGLNativeWindowType (*getEGLNativeWindow)(_GLFWwindow*);
|
|
|
|
// vulkan
|
|
|
|
void (*getRequiredInstanceExtensions)(char**);
|
|
|
|
int (*getPhysicalDevicePresentationSupport)(VkInstance,VkPhysicalDevice,uint32_t);
|
|
|
|
VkResult (*createWindowSurface)(VkInstance,_GLFWwindow*,const VkAllocationCallbacks*,VkSurfaceKHR*);
|
2017-05-25 12:23:09 -04:00
|
|
|
};
|
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
// Library global data
|
|
|
|
//
|
2010-10-04 12:17:53 -04:00
|
|
|
struct _GLFWlibrary
|
2010-09-09 14:18:10 -04:00
|
|
|
{
|
2017-02-06 09:58:15 -05:00
|
|
|
GLFWbool initialized;
|
2021-08-03 14:53:48 -04:00
|
|
|
GLFWallocator allocator;
|
2017-02-06 09:58:15 -05:00
|
|
|
|
2021-07-13 15:50:09 -04:00
|
|
|
_GLFWplatform platform;
|
|
|
|
|
2013-04-24 17:47:08 -04:00
|
|
|
struct {
|
2017-02-14 09:43:31 -05:00
|
|
|
_GLFWinitconfig init;
|
2015-06-07 12:22:38 -04:00
|
|
|
_GLFWfbconfig framebuffer;
|
|
|
|
_GLFWwndconfig window;
|
|
|
|
_GLFWctxconfig context;
|
|
|
|
int refreshRate;
|
2013-04-24 17:47:08 -04:00
|
|
|
} hints;
|
2010-09-09 18:06:23 -04:00
|
|
|
|
2017-05-25 12:23:09 -04:00
|
|
|
_GLFWerror* errorListHead;
|
2015-06-07 12:22:38 -04:00
|
|
|
_GLFWcursor* cursorListHead;
|
|
|
|
_GLFWwindow* windowListHead;
|
2012-09-12 13:35:52 -04:00
|
|
|
|
2015-06-07 12:22:38 -04:00
|
|
|
_GLFWmonitor** monitors;
|
|
|
|
int monitorCount;
|
2013-07-30 11:06:06 -04:00
|
|
|
|
2020-07-12 12:31:29 -04:00
|
|
|
GLFWbool joysticksInitialized;
|
2017-01-05 13:44:15 -05:00
|
|
|
_GLFWjoystick joysticks[GLFW_JOYSTICK_LAST + 1];
|
2017-06-18 09:13:25 -04:00
|
|
|
_GLFWmapping* mappings;
|
|
|
|
int mappingCount;
|
2017-01-05 13:44:15 -05:00
|
|
|
|
2017-05-25 12:23:09 -04:00
|
|
|
_GLFWtls errorSlot;
|
|
|
|
_GLFWtls contextSlot;
|
|
|
|
_GLFWmutex errorLock;
|
2017-03-08 07:58:09 -05:00
|
|
|
|
2017-03-18 18:09:34 -04:00
|
|
|
struct {
|
|
|
|
uint64_t offset;
|
2021-07-13 15:50:09 -04:00
|
|
|
// This is defined in platform.h
|
|
|
|
GLFW_PLATFORM_LIBRARY_TIMER_STATE
|
2017-03-18 18:09:34 -04:00
|
|
|
} timer;
|
|
|
|
|
2021-07-18 10:57:53 -04:00
|
|
|
struct {
|
|
|
|
EGLenum platform;
|
|
|
|
EGLDisplay display;
|
|
|
|
EGLint major, minor;
|
|
|
|
GLFWbool prefix;
|
|
|
|
|
|
|
|
GLFWbool KHR_create_context;
|
|
|
|
GLFWbool KHR_create_context_no_error;
|
|
|
|
GLFWbool KHR_gl_colorspace;
|
|
|
|
GLFWbool KHR_get_all_proc_addresses;
|
|
|
|
GLFWbool KHR_context_flush_control;
|
|
|
|
GLFWbool EXT_client_extensions;
|
|
|
|
GLFWbool EXT_platform_base;
|
|
|
|
GLFWbool EXT_platform_x11;
|
|
|
|
GLFWbool EXT_platform_wayland;
|
2021-12-14 12:35:30 -05:00
|
|
|
GLFWbool EXT_present_opaque;
|
2021-07-18 10:57:53 -04:00
|
|
|
GLFWbool ANGLE_platform_angle;
|
|
|
|
GLFWbool ANGLE_platform_angle_opengl;
|
|
|
|
GLFWbool ANGLE_platform_angle_d3d;
|
|
|
|
GLFWbool ANGLE_platform_angle_vulkan;
|
|
|
|
GLFWbool ANGLE_platform_angle_metal;
|
|
|
|
|
|
|
|
void* handle;
|
|
|
|
|
|
|
|
PFN_eglGetConfigAttrib GetConfigAttrib;
|
|
|
|
PFN_eglGetConfigs GetConfigs;
|
|
|
|
PFN_eglGetDisplay GetDisplay;
|
|
|
|
PFN_eglGetError GetError;
|
|
|
|
PFN_eglInitialize Initialize;
|
|
|
|
PFN_eglTerminate Terminate;
|
|
|
|
PFN_eglBindAPI BindAPI;
|
|
|
|
PFN_eglCreateContext CreateContext;
|
|
|
|
PFN_eglDestroySurface DestroySurface;
|
|
|
|
PFN_eglDestroyContext DestroyContext;
|
|
|
|
PFN_eglCreateWindowSurface CreateWindowSurface;
|
|
|
|
PFN_eglMakeCurrent MakeCurrent;
|
|
|
|
PFN_eglSwapBuffers SwapBuffers;
|
|
|
|
PFN_eglSwapInterval SwapInterval;
|
|
|
|
PFN_eglQueryString QueryString;
|
|
|
|
PFN_eglGetProcAddress GetProcAddress;
|
|
|
|
|
|
|
|
PFNEGLGETPLATFORMDISPLAYEXTPROC GetPlatformDisplayEXT;
|
|
|
|
PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC CreatePlatformWindowSurfaceEXT;
|
|
|
|
} egl;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
void* handle;
|
|
|
|
|
|
|
|
PFN_OSMesaCreateContextExt CreateContextExt;
|
|
|
|
PFN_OSMesaCreateContextAttribs CreateContextAttribs;
|
|
|
|
PFN_OSMesaDestroyContext DestroyContext;
|
|
|
|
PFN_OSMesaMakeCurrent MakeCurrent;
|
|
|
|
PFN_OSMesaGetColorBuffer GetColorBuffer;
|
|
|
|
PFN_OSMesaGetDepthBuffer GetDepthBuffer;
|
|
|
|
PFN_OSMesaGetProcAddress GetProcAddress;
|
|
|
|
|
|
|
|
} osmesa;
|
|
|
|
|
2015-08-10 14:19:04 -04:00
|
|
|
struct {
|
|
|
|
GLFWbool available;
|
|
|
|
void* handle;
|
2016-08-22 14:25:52 -04:00
|
|
|
char* extensions[2];
|
2016-08-04 18:23:16 -04:00
|
|
|
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
2015-08-10 14:19:04 -04:00
|
|
|
GLFWbool KHR_surface;
|
|
|
|
GLFWbool KHR_win32_surface;
|
2016-10-13 19:46:56 -04:00
|
|
|
GLFWbool MVK_macos_surface;
|
2020-01-05 10:46:42 -05:00
|
|
|
GLFWbool EXT_metal_surface;
|
2015-08-10 14:19:04 -04:00
|
|
|
GLFWbool KHR_xlib_surface;
|
|
|
|
GLFWbool KHR_xcb_surface;
|
|
|
|
GLFWbool KHR_wayland_surface;
|
|
|
|
} vk;
|
|
|
|
|
2013-07-30 11:06:06 -04:00
|
|
|
struct {
|
|
|
|
GLFWmonitorfun monitor;
|
2015-12-13 11:38:50 -05:00
|
|
|
GLFWjoystickfun joystick;
|
2013-07-30 11:06:06 -04:00
|
|
|
} callbacks;
|
2010-10-24 12:28:55 -04:00
|
|
|
|
2021-07-13 15:50:09 -04:00
|
|
|
// These are defined in platform.h
|
|
|
|
GLFW_PLATFORM_LIBRARY_WINDOW_STATE
|
|
|
|
GLFW_PLATFORM_LIBRARY_CONTEXT_STATE
|
|
|
|
GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE
|
2010-10-04 12:17:53 -04:00
|
|
|
};
|
2010-09-09 12:15:32 -04:00
|
|
|
|
2012-08-26 14:11:32 -04:00
|
|
|
// Global state shared between compilation units of GLFW
|
2018-01-17 05:25:32 -05:00
|
|
|
//
|
2013-01-01 19:40:42 -05:00
|
|
|
extern _GLFWlibrary _glfw;
|
2010-09-09 12:15:32 -04:00
|
|
|
|
2010-09-07 11:34:51 -04:00
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
////// GLFW platform API //////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
2013-01-01 20:21:38 -05:00
|
|
|
|
2021-07-16 07:53:31 -04:00
|
|
|
void _glfwPlatformInitTimer(void);
|
2016-03-23 05:09:07 -04:00
|
|
|
uint64_t _glfwPlatformGetTimerValue(void);
|
|
|
|
uint64_t _glfwPlatformGetTimerFrequency(void);
|
2010-09-07 11:34:51 -04:00
|
|
|
|
2017-03-08 07:58:09 -05:00
|
|
|
GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls);
|
|
|
|
void _glfwPlatformDestroyTls(_GLFWtls* tls);
|
|
|
|
void* _glfwPlatformGetTls(_GLFWtls* tls);
|
|
|
|
void _glfwPlatformSetTls(_GLFWtls* tls, void* value);
|
2017-05-25 12:23:09 -04:00
|
|
|
|
|
|
|
GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex);
|
|
|
|
void _glfwPlatformDestroyMutex(_GLFWmutex* mutex);
|
|
|
|
void _glfwPlatformLockMutex(_GLFWmutex* mutex);
|
|
|
|
void _glfwPlatformUnlockMutex(_GLFWmutex* mutex);
|
2017-03-08 07:58:09 -05:00
|
|
|
|
2021-07-16 08:57:22 -04:00
|
|
|
void* _glfwPlatformLoadModule(const char* path);
|
|
|
|
void _glfwPlatformFreeModule(void* module);
|
|
|
|
GLFWproc _glfwPlatformGetModuleSymbol(void* module, const char* name);
|
|
|
|
|
2017-02-28 16:28:36 -05:00
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
////// GLFW event API //////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
2014-09-02 13:42:43 -04:00
|
|
|
|
2015-08-23 13:30:04 -04:00
|
|
|
void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused);
|
2013-02-14 07:14:17 -05:00
|
|
|
void _glfwInputWindowPos(_GLFWwindow* window, int xpos, int ypos);
|
2011-10-09 11:10:40 -04:00
|
|
|
void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
|
2013-06-03 06:51:57 -04:00
|
|
|
void _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height);
|
2018-02-01 07:25:34 -05:00
|
|
|
void _glfwInputWindowContentScale(_GLFWwindow* window,
|
|
|
|
float xscale, float yscale);
|
2015-11-05 02:58:40 -05:00
|
|
|
void _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified);
|
2016-06-16 07:09:28 -04:00
|
|
|
void _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized);
|
2011-10-09 15:12:13 -04:00
|
|
|
void _glfwInputWindowDamage(_GLFWwindow* window);
|
2012-08-10 07:31:15 -04:00
|
|
|
void _glfwInputWindowCloseRequest(_GLFWwindow* window);
|
2017-10-26 12:05:56 -04:00
|
|
|
void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor);
|
2016-02-23 06:26:42 -05:00
|
|
|
|
2018-02-01 07:25:34 -05:00
|
|
|
void _glfwInputKey(_GLFWwindow* window,
|
|
|
|
int key, int scancode, int action, int mods);
|
|
|
|
void _glfwInputChar(_GLFWwindow* window,
|
2021-12-30 13:09:53 -05:00
|
|
|
uint32_t codepoint, int mods, GLFWbool plain);
|
2016-05-25 08:43:51 -04:00
|
|
|
void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset);
|
2012-12-09 13:19:00 -05:00
|
|
|
void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods);
|
2016-05-25 08:43:51 -04:00
|
|
|
void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos);
|
2015-11-05 02:58:40 -05:00
|
|
|
void _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered);
|
2018-01-17 05:25:32 -05:00
|
|
|
void _glfwInputDrop(_GLFWwindow* window, int count, const char** names);
|
|
|
|
void _glfwInputJoystick(_GLFWjoystick* js, int event);
|
|
|
|
void _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value);
|
|
|
|
void _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value);
|
|
|
|
void _glfwInputJoystickHat(_GLFWjoystick* js, int hat, char value);
|
2010-09-07 11:34:51 -04:00
|
|
|
|
2017-01-10 09:46:00 -05:00
|
|
|
void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement);
|
|
|
|
void _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window);
|
2016-02-23 06:34:35 -05:00
|
|
|
|
2015-10-24 17:52:29 -04:00
|
|
|
#if defined(__GNUC__)
|
2018-02-01 07:25:34 -05:00
|
|
|
void _glfwInputError(int code, const char* format, ...)
|
|
|
|
__attribute__((format(printf, 2, 3)));
|
2015-10-24 17:52:29 -04:00
|
|
|
#else
|
2017-05-25 12:23:09 -04:00
|
|
|
void _glfwInputError(int code, const char* format, ...);
|
2015-10-23 19:53:03 -04:00
|
|
|
#endif
|
2012-12-31 15:05:28 -05:00
|
|
|
|
2012-08-26 21:25:58 -04:00
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
////// GLFW internal API //////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
2013-01-01 20:21:38 -05:00
|
|
|
|
2021-07-13 15:50:09 -04:00
|
|
|
GLFWbool _glfwSelectPlatform(int platformID, _GLFWplatform* platform);
|
|
|
|
|
2015-11-05 02:58:40 -05:00
|
|
|
GLFWbool _glfwStringInExtensionString(const char* string, const char* extensions);
|
2013-05-13 09:49:59 -04:00
|
|
|
const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
|
|
|
|
const _GLFWfbconfig* alternatives,
|
|
|
|
unsigned int count);
|
2017-12-24 04:07:56 -05:00
|
|
|
GLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window,
|
|
|
|
const _GLFWctxconfig* ctxconfig);
|
2015-08-23 13:30:04 -04:00
|
|
|
GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig* ctxconfig);
|
2013-01-01 20:21:38 -05:00
|
|
|
|
2018-01-17 05:25:32 -05:00
|
|
|
const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor,
|
|
|
|
const GLFWvidmode* desired);
|
|
|
|
int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second);
|
2014-01-21 09:23:11 -05:00
|
|
|
_GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM);
|
|
|
|
void _glfwFreeMonitor(_GLFWmonitor* monitor);
|
2018-01-17 05:25:32 -05:00
|
|
|
void _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size);
|
|
|
|
void _glfwFreeGammaArrays(GLFWgammaramp* ramp);
|
|
|
|
void _glfwSplitBPP(int bpp, int* red, int* green, int* blue);
|
2013-01-01 20:21:38 -05:00
|
|
|
|
2021-06-23 12:53:06 -04:00
|
|
|
void _glfwInitGamepadMappings(void);
|
2017-06-18 09:13:25 -04:00
|
|
|
_GLFWjoystick* _glfwAllocJoystick(const char* name,
|
|
|
|
const char* guid,
|
|
|
|
int axisCount,
|
|
|
|
int buttonCount,
|
|
|
|
int hatCount);
|
2017-01-05 13:44:15 -05:00
|
|
|
void _glfwFreeJoystick(_GLFWjoystick* js);
|
2019-01-22 14:54:16 -05:00
|
|
|
void _glfwCenterCursorInContentArea(_GLFWwindow* window);
|
2017-01-05 13:44:15 -05:00
|
|
|
|
2021-07-18 10:57:53 -04:00
|
|
|
GLFWbool _glfwInitEGL(void);
|
|
|
|
void _glfwTerminateEGL(void);
|
|
|
|
GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
|
|
|
|
const _GLFWctxconfig* ctxconfig,
|
|
|
|
const _GLFWfbconfig* fbconfig);
|
|
|
|
#if defined(_GLFW_X11)
|
|
|
|
GLFWbool _glfwChooseVisualEGL(const _GLFWwndconfig* wndconfig,
|
|
|
|
const _GLFWctxconfig* ctxconfig,
|
|
|
|
const _GLFWfbconfig* fbconfig,
|
|
|
|
Visual** visual, int* depth);
|
|
|
|
#endif /*_GLFW_X11*/
|
|
|
|
|
|
|
|
GLFWbool _glfwInitOSMesa(void);
|
|
|
|
void _glfwTerminateOSMesa(void);
|
|
|
|
GLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window,
|
|
|
|
const _GLFWctxconfig* ctxconfig,
|
|
|
|
const _GLFWfbconfig* fbconfig);
|
|
|
|
|
2016-10-30 20:42:04 -04:00
|
|
|
GLFWbool _glfwInitVulkan(int mode);
|
2015-08-10 14:19:04 -04:00
|
|
|
void _glfwTerminateVulkan(void);
|
|
|
|
const char* _glfwGetVulkanResultString(VkResult result);
|
|
|
|
|
2021-12-30 13:09:53 -05:00
|
|
|
size_t _glfwEncodeUTF8(char* s, uint32_t codepoint);
|
2022-03-24 15:17:32 -04:00
|
|
|
char** _glfwParseUriList(char* text, int* count);
|
2021-12-30 12:22:16 -05:00
|
|
|
|
2018-01-17 05:56:35 -05:00
|
|
|
char* _glfw_strdup(const char* source);
|
2022-03-14 11:01:34 -04:00
|
|
|
int _glfw_min(int a, int b);
|
|
|
|
int _glfw_max(int a, int b);
|
2018-12-18 13:15:29 -05:00
|
|
|
float _glfw_fminf(float a, float b);
|
|
|
|
float _glfw_fmaxf(float a, float b);
|
2018-01-17 05:56:35 -05:00
|
|
|
|
2021-08-03 14:53:48 -04:00
|
|
|
void* _glfw_calloc(size_t count, size_t size);
|
|
|
|
void* _glfw_realloc(void* pointer, size_t size);
|
|
|
|
void _glfw_free(void* pointer);
|
|
|
|
|