add more graphics backends to glad
This commit is contained in:
parent
18c0a431dc
commit
3828c17795
18
quark/vendor/CMakeLists.txt
vendored
18
quark/vendor/CMakeLists.txt
vendored
|
@ -2,16 +2,22 @@
|
||||||
# GLAD
|
# GLAD
|
||||||
########################
|
########################
|
||||||
|
|
||||||
if (${QUARK_RENDERING_BACKEND} STREQUAL "OPENGL")
|
add_library(glad STATIC)
|
||||||
add_library(glad
|
|
||||||
glad/src/gl.c
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(glad
|
if (${QUARK_RENDERING_BACKEND} STREQUAL "OPENGL")
|
||||||
PUBLIC glad/include
|
target_sources(glad
|
||||||
|
PRIVATE glad/src/gl.c
|
||||||
|
)
|
||||||
|
elseif (${QUARK_RENDERING_BACKEND} STREQUAL "VULKAN")
|
||||||
|
target_sources(glad
|
||||||
|
PRIVATE glad/src/vulkan.c
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(glad
|
||||||
|
PUBLIC glad/include
|
||||||
|
)
|
||||||
|
|
||||||
########################
|
########################
|
||||||
# ImGui
|
# ImGui
|
||||||
########################
|
########################
|
||||||
|
|
175
quark/vendor/glad/include/EGL/eglplatform.h
vendored
Normal file
175
quark/vendor/glad/include/EGL/eglplatform.h
vendored
Normal file
|
@ -0,0 +1,175 @@
|
||||||
|
#ifndef __eglplatform_h_
|
||||||
|
#define __eglplatform_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright 2007-2020 The Khronos Group Inc.
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Platform-specific types and definitions for egl.h
|
||||||
|
*
|
||||||
|
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||||
|
* You are encouraged to submit all modifications to the Khronos group so that
|
||||||
|
* they can be included in future versions of this file. Please submit changes
|
||||||
|
* by filing an issue or pull request on the public Khronos EGL Registry, at
|
||||||
|
* https://www.github.com/KhronosGroup/EGL-Registry/
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
|
||||||
|
/* Macros used in EGL function prototype declarations.
|
||||||
|
*
|
||||||
|
* EGL functions should be prototyped as:
|
||||||
|
*
|
||||||
|
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
|
||||||
|
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
|
||||||
|
*
|
||||||
|
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef EGLAPI
|
||||||
|
#define EGLAPI KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EGLAPIENTRY
|
||||||
|
#define EGLAPIENTRY KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
#define EGLAPIENTRYP EGLAPIENTRY*
|
||||||
|
|
||||||
|
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
||||||
|
* are aliases of window-system-dependent types, such as X Display * or
|
||||||
|
* Windows Device Context. They must be defined in platform-specific
|
||||||
|
* code below. The EGL-prefixed versions of Native*Type are the same
|
||||||
|
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
|
||||||
|
*
|
||||||
|
* Khronos STRONGLY RECOMMENDS that you use the default definitions
|
||||||
|
* provided below, since these changes affect both binary and source
|
||||||
|
* portability of applications using EGL running on different EGL
|
||||||
|
* implementations.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES)
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
typedef HDC EGLNativeDisplayType;
|
||||||
|
typedef HBITMAP EGLNativePixmapType;
|
||||||
|
typedef HWND EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__QNX__)
|
||||||
|
|
||||||
|
typedef khronos_uintptr_t EGLNativeDisplayType;
|
||||||
|
typedef struct _screen_pixmap* EGLNativePixmapType; /* screen_pixmap_t */
|
||||||
|
typedef struct _screen_window* EGLNativeWindowType; /* screen_window_t */
|
||||||
|
|
||||||
|
#elif defined(__EMSCRIPTEN__)
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef int EGLNativePixmapType;
|
||||||
|
typedef int EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(WL_EGL_PLATFORM)
|
||||||
|
|
||||||
|
typedef struct wl_display *EGLNativeDisplayType;
|
||||||
|
typedef struct wl_egl_pixmap *EGLNativePixmapType;
|
||||||
|
typedef struct wl_egl_window *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__GBM__)
|
||||||
|
|
||||||
|
typedef struct gbm_device *EGLNativeDisplayType;
|
||||||
|
typedef struct gbm_bo *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__ANDROID__) || defined(ANDROID)
|
||||||
|
|
||||||
|
struct ANativeWindow;
|
||||||
|
struct egl_native_pixmap_t;
|
||||||
|
|
||||||
|
typedef void* EGLNativeDisplayType;
|
||||||
|
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
|
||||||
|
typedef struct ANativeWindow* EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(USE_OZONE)
|
||||||
|
|
||||||
|
typedef intptr_t EGLNativeDisplayType;
|
||||||
|
typedef intptr_t EGLNativePixmapType;
|
||||||
|
typedef intptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(USE_X11)
|
||||||
|
|
||||||
|
/* X11 (tentative) */
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
|
typedef Display *EGLNativeDisplayType;
|
||||||
|
typedef Pixmap EGLNativePixmapType;
|
||||||
|
typedef Window EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__unix__)
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
|
||||||
|
#include <kernel/image.h>
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__Fuchsia__)
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error "Platform not recognized"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
|
||||||
|
typedef EGLNativeDisplayType NativeDisplayType;
|
||||||
|
typedef EGLNativePixmapType NativePixmapType;
|
||||||
|
typedef EGLNativeWindowType NativeWindowType;
|
||||||
|
|
||||||
|
|
||||||
|
/* Define EGLint. This must be a signed integral type large enough to contain
|
||||||
|
* all legal attribute names and values passed into and out of EGL, whether
|
||||||
|
* their type is boolean, bitmask, enumerant (symbolic constant), integer,
|
||||||
|
* handle, or other. While in general a 32-bit integer will suffice, if
|
||||||
|
* handles are 64 bit types, then EGLint should be defined as a signed 64-bit
|
||||||
|
* integer type.
|
||||||
|
*/
|
||||||
|
typedef khronos_int32_t EGLint;
|
||||||
|
|
||||||
|
|
||||||
|
/* C++ / C typecast macros for special EGL handle values */
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define EGL_CAST(type, value) (static_cast<type>(value))
|
||||||
|
#else
|
||||||
|
#define EGL_CAST(type, value) ((type) (value))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __eglplatform_h */
|
550
quark/vendor/glad/include/glad/egl.h
vendored
Normal file
550
quark/vendor/glad/include/glad/egl.h
vendored
Normal file
|
@ -0,0 +1,550 @@
|
||||||
|
/**
|
||||||
|
* Loader generated by glad 2.0.8 on Tue Jan 7 20:31:11 2025
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
|
||||||
|
*
|
||||||
|
* Generator: C/C++
|
||||||
|
* Specification: egl
|
||||||
|
* Extensions: 0
|
||||||
|
*
|
||||||
|
* APIs:
|
||||||
|
* - egl=1.5
|
||||||
|
*
|
||||||
|
* Options:
|
||||||
|
* - ALIAS = False
|
||||||
|
* - DEBUG = False
|
||||||
|
* - HEADER_ONLY = False
|
||||||
|
* - LOADER = True
|
||||||
|
* - MX = False
|
||||||
|
* - ON_DEMAND = False
|
||||||
|
*
|
||||||
|
* Commandline:
|
||||||
|
* --api='egl=1.5' --extensions='' c --loader
|
||||||
|
*
|
||||||
|
* Online:
|
||||||
|
* http://glad.sh/#api=egl%3D1.5&extensions=&generator=c&options=LOADER
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GLAD_EGL_H_
|
||||||
|
#define GLAD_EGL_H_
|
||||||
|
|
||||||
|
|
||||||
|
#define GLAD_EGL
|
||||||
|
#define GLAD_OPTION_EGL_LOADER
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLAD_PLATFORM_H_
|
||||||
|
#define GLAD_PLATFORM_H_
|
||||||
|
|
||||||
|
#ifndef GLAD_PLATFORM_WIN32
|
||||||
|
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
|
||||||
|
#define GLAD_PLATFORM_WIN32 1
|
||||||
|
#else
|
||||||
|
#define GLAD_PLATFORM_WIN32 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLAD_PLATFORM_APPLE
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define GLAD_PLATFORM_APPLE 1
|
||||||
|
#else
|
||||||
|
#define GLAD_PLATFORM_APPLE 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLAD_PLATFORM_EMSCRIPTEN
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
#define GLAD_PLATFORM_EMSCRIPTEN 1
|
||||||
|
#else
|
||||||
|
#define GLAD_PLATFORM_EMSCRIPTEN 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLAD_PLATFORM_UWP
|
||||||
|
#if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
|
||||||
|
#ifdef __has_include
|
||||||
|
#if __has_include(<winapifamily.h>)
|
||||||
|
#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
|
||||||
|
#endif
|
||||||
|
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
|
||||||
|
#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
|
||||||
|
#include <winapifamily.h>
|
||||||
|
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||||
|
#define GLAD_PLATFORM_UWP 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLAD_PLATFORM_UWP
|
||||||
|
#define GLAD_PLATFORM_UWP 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define GLAD_GNUC_EXTENSION __extension__
|
||||||
|
#else
|
||||||
|
#define GLAD_GNUC_EXTENSION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define GLAD_UNUSED(x) (void)(x)
|
||||||
|
|
||||||
|
#ifndef GLAD_API_CALL
|
||||||
|
#if defined(GLAD_API_CALL_EXPORT)
|
||||||
|
#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
|
||||||
|
#if defined(GLAD_API_CALL_EXPORT_BUILD)
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#define GLAD_API_CALL __attribute__ ((dllexport)) extern
|
||||||
|
#else
|
||||||
|
#define GLAD_API_CALL __declspec(dllexport) extern
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#define GLAD_API_CALL __attribute__ ((dllimport)) extern
|
||||||
|
#else
|
||||||
|
#define GLAD_API_CALL __declspec(dllimport) extern
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
|
||||||
|
#define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
|
||||||
|
#else
|
||||||
|
#define GLAD_API_CALL extern
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define GLAD_API_CALL extern
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef APIENTRY
|
||||||
|
#define GLAD_API_PTR APIENTRY
|
||||||
|
#elif GLAD_PLATFORM_WIN32
|
||||||
|
#define GLAD_API_PTR __stdcall
|
||||||
|
#else
|
||||||
|
#define GLAD_API_PTR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLAPI
|
||||||
|
#define GLAPI GLAD_API_CALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLAPIENTRY
|
||||||
|
#define GLAPIENTRY GLAD_API_PTR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
|
||||||
|
#define GLAD_VERSION_MAJOR(version) (version / 10000)
|
||||||
|
#define GLAD_VERSION_MINOR(version) (version % 10000)
|
||||||
|
|
||||||
|
#define GLAD_GENERATOR_VERSION "2.0.8"
|
||||||
|
|
||||||
|
typedef void (*GLADapiproc)(void);
|
||||||
|
|
||||||
|
typedef GLADapiproc (*GLADloadfunc)(const char *name);
|
||||||
|
typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name);
|
||||||
|
|
||||||
|
typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);
|
||||||
|
typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);
|
||||||
|
|
||||||
|
#endif /* GLAD_PLATFORM_H_ */
|
||||||
|
|
||||||
|
#define EGL_ALPHA_FORMAT 0x3088
|
||||||
|
#define EGL_ALPHA_FORMAT_NONPRE 0x308B
|
||||||
|
#define EGL_ALPHA_FORMAT_PRE 0x308C
|
||||||
|
#define EGL_ALPHA_MASK_SIZE 0x303E
|
||||||
|
#define EGL_ALPHA_SIZE 0x3021
|
||||||
|
#define EGL_BACK_BUFFER 0x3084
|
||||||
|
#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_BIND_TO_TEXTURE_RGB 0x3039
|
||||||
|
#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
|
||||||
|
#define EGL_BLUE_SIZE 0x3022
|
||||||
|
#define EGL_BUFFER_DESTROYED 0x3095
|
||||||
|
#define EGL_BUFFER_PRESERVED 0x3094
|
||||||
|
#define EGL_BUFFER_SIZE 0x3020
|
||||||
|
#define EGL_CLIENT_APIS 0x308D
|
||||||
|
#define EGL_CL_EVENT_HANDLE 0x309C
|
||||||
|
#define EGL_COLORSPACE 0x3087
|
||||||
|
#define EGL_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_COLORSPACE_sRGB 0x3089
|
||||||
|
#define EGL_COLOR_BUFFER_TYPE 0x303F
|
||||||
|
#define EGL_CONDITION_SATISFIED 0x30F6
|
||||||
|
#define EGL_CONFIG_CAVEAT 0x3027
|
||||||
|
#define EGL_CONFIG_ID 0x3028
|
||||||
|
#define EGL_CONFORMANT 0x3042
|
||||||
|
#define EGL_CONTEXT_CLIENT_TYPE 0x3097
|
||||||
|
#define EGL_CONTEXT_CLIENT_VERSION 0x3098
|
||||||
|
#define EGL_CONTEXT_LOST 0x300E
|
||||||
|
#define EGL_CONTEXT_MAJOR_VERSION 0x3098
|
||||||
|
#define EGL_CONTEXT_MINOR_VERSION 0x30FB
|
||||||
|
#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
|
||||||
|
#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
|
||||||
|
#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0
|
||||||
|
#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
|
||||||
|
#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
|
||||||
|
#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
|
||||||
|
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
|
||||||
|
#define EGL_CORE_NATIVE_ENGINE 0x305B
|
||||||
|
#define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0)
|
||||||
|
#define EGL_DEPTH_SIZE 0x3025
|
||||||
|
#define EGL_DISPLAY_SCALING 10000
|
||||||
|
#define EGL_DONT_CARE EGL_CAST(EGLint,-1)
|
||||||
|
#define EGL_DRAW 0x3059
|
||||||
|
#define EGL_EXTENSIONS 0x3055
|
||||||
|
#define EGL_FALSE 0
|
||||||
|
#define EGL_FOREVER 0xFFFFFFFFFFFFFFFF
|
||||||
|
#define EGL_GL_COLORSPACE 0x309D
|
||||||
|
#define EGL_GL_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_GL_COLORSPACE_SRGB 0x3089
|
||||||
|
#define EGL_GL_RENDERBUFFER 0x30B9
|
||||||
|
#define EGL_GL_TEXTURE_2D 0x30B1
|
||||||
|
#define EGL_GL_TEXTURE_3D 0x30B2
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
|
||||||
|
#define EGL_GL_TEXTURE_LEVEL 0x30BC
|
||||||
|
#define EGL_GL_TEXTURE_ZOFFSET 0x30BD
|
||||||
|
#define EGL_GREEN_SIZE 0x3023
|
||||||
|
#define EGL_HEIGHT 0x3056
|
||||||
|
#define EGL_HORIZONTAL_RESOLUTION 0x3090
|
||||||
|
#define EGL_IMAGE_PRESERVED 0x30D2
|
||||||
|
#define EGL_LARGEST_PBUFFER 0x3058
|
||||||
|
#define EGL_LEVEL 0x3029
|
||||||
|
#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF
|
||||||
|
#define EGL_LUMINANCE_BUFFER 0x308F
|
||||||
|
#define EGL_LUMINANCE_SIZE 0x303D
|
||||||
|
#define EGL_MATCH_NATIVE_PIXMAP 0x3041
|
||||||
|
#define EGL_MAX_PBUFFER_HEIGHT 0x302A
|
||||||
|
#define EGL_MAX_PBUFFER_PIXELS 0x302B
|
||||||
|
#define EGL_MAX_PBUFFER_WIDTH 0x302C
|
||||||
|
#define EGL_MAX_SWAP_INTERVAL 0x303C
|
||||||
|
#define EGL_MIN_SWAP_INTERVAL 0x303B
|
||||||
|
#define EGL_MIPMAP_LEVEL 0x3083
|
||||||
|
#define EGL_MIPMAP_TEXTURE 0x3082
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE 0x3099
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
|
||||||
|
#define EGL_NATIVE_RENDERABLE 0x302D
|
||||||
|
#define EGL_NATIVE_VISUAL_ID 0x302E
|
||||||
|
#define EGL_NATIVE_VISUAL_TYPE 0x302F
|
||||||
|
#define EGL_NONE 0x3038
|
||||||
|
#define EGL_NON_CONFORMANT_CONFIG 0x3051
|
||||||
|
#define EGL_NOT_INITIALIZED 0x3001
|
||||||
|
#define EGL_NO_CONTEXT EGL_CAST(EGLContext,0)
|
||||||
|
#define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
|
||||||
|
#define EGL_NO_IMAGE EGL_CAST(EGLImage,0)
|
||||||
|
#define EGL_NO_RESET_NOTIFICATION 0x31BE
|
||||||
|
#define EGL_NO_SURFACE EGL_CAST(EGLSurface,0)
|
||||||
|
#define EGL_NO_SYNC EGL_CAST(EGLSync,0)
|
||||||
|
#define EGL_NO_TEXTURE 0x305C
|
||||||
|
#define EGL_OPENGL_API 0x30A2
|
||||||
|
#define EGL_OPENGL_BIT 0x0008
|
||||||
|
#define EGL_OPENGL_ES2_BIT 0x0004
|
||||||
|
#define EGL_OPENGL_ES3_BIT 0x00000040
|
||||||
|
#define EGL_OPENGL_ES_API 0x30A0
|
||||||
|
#define EGL_OPENGL_ES_BIT 0x0001
|
||||||
|
#define EGL_OPENVG_API 0x30A1
|
||||||
|
#define EGL_OPENVG_BIT 0x0002
|
||||||
|
#define EGL_OPENVG_IMAGE 0x3096
|
||||||
|
#define EGL_PBUFFER_BIT 0x0001
|
||||||
|
#define EGL_PIXEL_ASPECT_RATIO 0x3092
|
||||||
|
#define EGL_PIXMAP_BIT 0x0002
|
||||||
|
#define EGL_READ 0x305A
|
||||||
|
#define EGL_RED_SIZE 0x3024
|
||||||
|
#define EGL_RENDERABLE_TYPE 0x3040
|
||||||
|
#define EGL_RENDER_BUFFER 0x3086
|
||||||
|
#define EGL_RGB_BUFFER 0x308E
|
||||||
|
#define EGL_SAMPLES 0x3031
|
||||||
|
#define EGL_SAMPLE_BUFFERS 0x3032
|
||||||
|
#define EGL_SIGNALED 0x30F2
|
||||||
|
#define EGL_SINGLE_BUFFER 0x3085
|
||||||
|
#define EGL_SLOW_CONFIG 0x3050
|
||||||
|
#define EGL_STENCIL_SIZE 0x3026
|
||||||
|
#define EGL_SUCCESS 0x3000
|
||||||
|
#define EGL_SURFACE_TYPE 0x3033
|
||||||
|
#define EGL_SWAP_BEHAVIOR 0x3093
|
||||||
|
#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
|
||||||
|
#define EGL_SYNC_CL_EVENT 0x30FE
|
||||||
|
#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
|
||||||
|
#define EGL_SYNC_CONDITION 0x30F8
|
||||||
|
#define EGL_SYNC_FENCE 0x30F9
|
||||||
|
#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
|
||||||
|
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
|
||||||
|
#define EGL_SYNC_STATUS 0x30F1
|
||||||
|
#define EGL_SYNC_TYPE 0x30F7
|
||||||
|
#define EGL_TEXTURE_2D 0x305F
|
||||||
|
#define EGL_TEXTURE_FORMAT 0x3080
|
||||||
|
#define EGL_TEXTURE_RGB 0x305D
|
||||||
|
#define EGL_TEXTURE_RGBA 0x305E
|
||||||
|
#define EGL_TEXTURE_TARGET 0x3081
|
||||||
|
#define EGL_TIMEOUT_EXPIRED 0x30F5
|
||||||
|
#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
|
||||||
|
#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
|
||||||
|
#define EGL_TRANSPARENT_RED_VALUE 0x3037
|
||||||
|
#define EGL_TRANSPARENT_RGB 0x3052
|
||||||
|
#define EGL_TRANSPARENT_TYPE 0x3034
|
||||||
|
#define EGL_TRUE 1
|
||||||
|
#define EGL_UNKNOWN EGL_CAST(EGLint,-1)
|
||||||
|
#define EGL_UNSIGNALED 0x30F3
|
||||||
|
#define EGL_VENDOR 0x3053
|
||||||
|
#define EGL_VERSION 0x3054
|
||||||
|
#define EGL_VERTICAL_RESOLUTION 0x3091
|
||||||
|
#define EGL_VG_ALPHA_FORMAT 0x3088
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_PRE 0x308C
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
|
||||||
|
#define EGL_VG_COLORSPACE 0x3087
|
||||||
|
#define EGL_VG_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
|
||||||
|
#define EGL_VG_COLORSPACE_sRGB 0x3089
|
||||||
|
#define EGL_WIDTH 0x3057
|
||||||
|
#define EGL_WINDOW_BIT 0x0004
|
||||||
|
|
||||||
|
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
#include <EGL/eglplatform.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct AHardwareBuffer;
|
||||||
|
struct wl_buffer;
|
||||||
|
struct wl_display;
|
||||||
|
struct wl_resource;
|
||||||
|
|
||||||
|
typedef unsigned int EGLBoolean;
|
||||||
|
typedef unsigned int EGLenum;
|
||||||
|
typedef intptr_t EGLAttribKHR;
|
||||||
|
typedef intptr_t EGLAttrib;
|
||||||
|
typedef void *EGLClientBuffer;
|
||||||
|
typedef void *EGLConfig;
|
||||||
|
typedef void *EGLContext;
|
||||||
|
typedef void *EGLDeviceEXT;
|
||||||
|
typedef void *EGLDisplay;
|
||||||
|
typedef void *EGLImage;
|
||||||
|
typedef void *EGLImageKHR;
|
||||||
|
typedef void *EGLLabelKHR;
|
||||||
|
typedef void *EGLObjectKHR;
|
||||||
|
typedef void *EGLOutputLayerEXT;
|
||||||
|
typedef void *EGLOutputPortEXT;
|
||||||
|
typedef void *EGLStreamKHR;
|
||||||
|
typedef void *EGLSurface;
|
||||||
|
typedef void *EGLSync;
|
||||||
|
typedef void *EGLSyncKHR;
|
||||||
|
typedef void *EGLSyncNV;
|
||||||
|
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
|
||||||
|
typedef khronos_utime_nanoseconds_t EGLTimeKHR;
|
||||||
|
typedef khronos_utime_nanoseconds_t EGLTime;
|
||||||
|
typedef khronos_utime_nanoseconds_t EGLTimeNV;
|
||||||
|
typedef khronos_utime_nanoseconds_t EGLuint64NV;
|
||||||
|
typedef khronos_uint64_t EGLuint64KHR;
|
||||||
|
typedef khronos_stime_nanoseconds_t EGLnsecsANDROID;
|
||||||
|
typedef int EGLNativeFileDescriptorKHR;
|
||||||
|
typedef khronos_ssize_t EGLsizeiANDROID;
|
||||||
|
typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
|
||||||
|
typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
|
||||||
|
struct EGLClientPixmapHI {
|
||||||
|
void *pData;
|
||||||
|
EGLint iWidth;
|
||||||
|
EGLint iHeight;
|
||||||
|
EGLint iStride;
|
||||||
|
};
|
||||||
|
typedef void (GLAD_API_PTR *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message);
|
||||||
|
#define PFNEGLBINDWAYLANDDISPLAYWL PFNEGLBINDWAYLANDDISPLAYWLPROC
|
||||||
|
#define PFNEGLUNBINDWAYLANDDISPLAYWL PFNEGLUNBINDWAYLANDDISPLAYWLPROC
|
||||||
|
#define PFNEGLQUERYWAYLANDBUFFERWL PFNEGLQUERYWAYLANDBUFFERWLPROC
|
||||||
|
#define PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC
|
||||||
|
|
||||||
|
|
||||||
|
#define EGL_VERSION_1_0 1
|
||||||
|
GLAD_API_CALL int GLAD_EGL_VERSION_1_0;
|
||||||
|
#define EGL_VERSION_1_1 1
|
||||||
|
GLAD_API_CALL int GLAD_EGL_VERSION_1_1;
|
||||||
|
#define EGL_VERSION_1_2 1
|
||||||
|
GLAD_API_CALL int GLAD_EGL_VERSION_1_2;
|
||||||
|
#define EGL_VERSION_1_3 1
|
||||||
|
GLAD_API_CALL int GLAD_EGL_VERSION_1_3;
|
||||||
|
#define EGL_VERSION_1_4 1
|
||||||
|
GLAD_API_CALL int GLAD_EGL_VERSION_1_4;
|
||||||
|
#define EGL_VERSION_1_5 1
|
||||||
|
GLAD_API_CALL int GLAD_EGL_VERSION_1_5;
|
||||||
|
|
||||||
|
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLBINDAPIPROC)(EGLenum api);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLBINDTEXIMAGEPROC)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLCHOOSECONFIGPROC)(EGLDisplay dpy, const EGLint * attrib_list, EGLConfig * configs, EGLint config_size, EGLint * num_config);
|
||||||
|
typedef EGLint (GLAD_API_PTR *PFNEGLCLIENTWAITSYNCPROC)(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLCOPYBUFFERSPROC)(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
|
||||||
|
typedef EGLContext (GLAD_API_PTR *PFNEGLCREATECONTEXTPROC)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint * attrib_list);
|
||||||
|
typedef EGLImage (GLAD_API_PTR *PFNEGLCREATEIMAGEPROC)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib * attrib_list);
|
||||||
|
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC)(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint * attrib_list);
|
||||||
|
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPBUFFERSURFACEPROC)(EGLDisplay dpy, EGLConfig config, const EGLint * attrib_list);
|
||||||
|
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPIXMAPSURFACEPROC)(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint * attrib_list);
|
||||||
|
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC)(EGLDisplay dpy, EGLConfig config, void * native_pixmap, const EGLAttrib * attrib_list);
|
||||||
|
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPLATFORMWINDOWSURFACEPROC)(EGLDisplay dpy, EGLConfig config, void * native_window, const EGLAttrib * attrib_list);
|
||||||
|
typedef EGLSync (GLAD_API_PTR *PFNEGLCREATESYNCPROC)(EGLDisplay dpy, EGLenum type, const EGLAttrib * attrib_list);
|
||||||
|
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEWINDOWSURFACEPROC)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint * attrib_list);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLDESTROYCONTEXTPROC)(EGLDisplay dpy, EGLContext ctx);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLDESTROYIMAGEPROC)(EGLDisplay dpy, EGLImage image);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLDESTROYSURFACEPROC)(EGLDisplay dpy, EGLSurface surface);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLDESTROYSYNCPROC)(EGLDisplay dpy, EGLSync sync);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLGETCONFIGATTRIBPROC)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLGETCONFIGSPROC)(EGLDisplay dpy, EGLConfig * configs, EGLint config_size, EGLint * num_config);
|
||||||
|
typedef EGLContext (GLAD_API_PTR *PFNEGLGETCURRENTCONTEXTPROC)(void);
|
||||||
|
typedef EGLDisplay (GLAD_API_PTR *PFNEGLGETCURRENTDISPLAYPROC)(void);
|
||||||
|
typedef EGLSurface (GLAD_API_PTR *PFNEGLGETCURRENTSURFACEPROC)(EGLint readdraw);
|
||||||
|
typedef EGLDisplay (GLAD_API_PTR *PFNEGLGETDISPLAYPROC)(EGLNativeDisplayType display_id);
|
||||||
|
typedef EGLint (GLAD_API_PTR *PFNEGLGETERRORPROC)(void);
|
||||||
|
typedef EGLDisplay (GLAD_API_PTR *PFNEGLGETPLATFORMDISPLAYPROC)(EGLenum platform, void * native_display, const EGLAttrib * attrib_list);
|
||||||
|
typedef __eglMustCastToProperFunctionPointerType (GLAD_API_PTR *PFNEGLGETPROCADDRESSPROC)(const char * procname);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLGETSYNCATTRIBPROC)(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib * value);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLINITIALIZEPROC)(EGLDisplay dpy, EGLint * major, EGLint * minor);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLMAKECURRENTPROC)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
|
||||||
|
typedef EGLenum (GLAD_API_PTR *PFNEGLQUERYAPIPROC)(void);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLQUERYCONTEXTPROC)(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint * value);
|
||||||
|
typedef const char * (GLAD_API_PTR *PFNEGLQUERYSTRINGPROC)(EGLDisplay dpy, EGLint name);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLQUERYSURFACEPROC)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint * value);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLRELEASETEXIMAGEPROC)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLRELEASETHREADPROC)(void);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLSURFACEATTRIBPROC)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLSWAPBUFFERSPROC)(EGLDisplay dpy, EGLSurface surface);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLSWAPINTERVALPROC)(EGLDisplay dpy, EGLint interval);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLTERMINATEPROC)(EGLDisplay dpy);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLWAITCLIENTPROC)(void);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLWAITGLPROC)(void);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLWAITNATIVEPROC)(EGLint engine);
|
||||||
|
typedef EGLBoolean (GLAD_API_PTR *PFNEGLWAITSYNCPROC)(EGLDisplay dpy, EGLSync sync, EGLint flags);
|
||||||
|
|
||||||
|
GLAD_API_CALL PFNEGLBINDAPIPROC glad_eglBindAPI;
|
||||||
|
#define eglBindAPI glad_eglBindAPI
|
||||||
|
GLAD_API_CALL PFNEGLBINDTEXIMAGEPROC glad_eglBindTexImage;
|
||||||
|
#define eglBindTexImage glad_eglBindTexImage
|
||||||
|
GLAD_API_CALL PFNEGLCHOOSECONFIGPROC glad_eglChooseConfig;
|
||||||
|
#define eglChooseConfig glad_eglChooseConfig
|
||||||
|
GLAD_API_CALL PFNEGLCLIENTWAITSYNCPROC glad_eglClientWaitSync;
|
||||||
|
#define eglClientWaitSync glad_eglClientWaitSync
|
||||||
|
GLAD_API_CALL PFNEGLCOPYBUFFERSPROC glad_eglCopyBuffers;
|
||||||
|
#define eglCopyBuffers glad_eglCopyBuffers
|
||||||
|
GLAD_API_CALL PFNEGLCREATECONTEXTPROC glad_eglCreateContext;
|
||||||
|
#define eglCreateContext glad_eglCreateContext
|
||||||
|
GLAD_API_CALL PFNEGLCREATEIMAGEPROC glad_eglCreateImage;
|
||||||
|
#define eglCreateImage glad_eglCreateImage
|
||||||
|
GLAD_API_CALL PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC glad_eglCreatePbufferFromClientBuffer;
|
||||||
|
#define eglCreatePbufferFromClientBuffer glad_eglCreatePbufferFromClientBuffer
|
||||||
|
GLAD_API_CALL PFNEGLCREATEPBUFFERSURFACEPROC glad_eglCreatePbufferSurface;
|
||||||
|
#define eglCreatePbufferSurface glad_eglCreatePbufferSurface
|
||||||
|
GLAD_API_CALL PFNEGLCREATEPIXMAPSURFACEPROC glad_eglCreatePixmapSurface;
|
||||||
|
#define eglCreatePixmapSurface glad_eglCreatePixmapSurface
|
||||||
|
GLAD_API_CALL PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC glad_eglCreatePlatformPixmapSurface;
|
||||||
|
#define eglCreatePlatformPixmapSurface glad_eglCreatePlatformPixmapSurface
|
||||||
|
GLAD_API_CALL PFNEGLCREATEPLATFORMWINDOWSURFACEPROC glad_eglCreatePlatformWindowSurface;
|
||||||
|
#define eglCreatePlatformWindowSurface glad_eglCreatePlatformWindowSurface
|
||||||
|
GLAD_API_CALL PFNEGLCREATESYNCPROC glad_eglCreateSync;
|
||||||
|
#define eglCreateSync glad_eglCreateSync
|
||||||
|
GLAD_API_CALL PFNEGLCREATEWINDOWSURFACEPROC glad_eglCreateWindowSurface;
|
||||||
|
#define eglCreateWindowSurface glad_eglCreateWindowSurface
|
||||||
|
GLAD_API_CALL PFNEGLDESTROYCONTEXTPROC glad_eglDestroyContext;
|
||||||
|
#define eglDestroyContext glad_eglDestroyContext
|
||||||
|
GLAD_API_CALL PFNEGLDESTROYIMAGEPROC glad_eglDestroyImage;
|
||||||
|
#define eglDestroyImage glad_eglDestroyImage
|
||||||
|
GLAD_API_CALL PFNEGLDESTROYSURFACEPROC glad_eglDestroySurface;
|
||||||
|
#define eglDestroySurface glad_eglDestroySurface
|
||||||
|
GLAD_API_CALL PFNEGLDESTROYSYNCPROC glad_eglDestroySync;
|
||||||
|
#define eglDestroySync glad_eglDestroySync
|
||||||
|
GLAD_API_CALL PFNEGLGETCONFIGATTRIBPROC glad_eglGetConfigAttrib;
|
||||||
|
#define eglGetConfigAttrib glad_eglGetConfigAttrib
|
||||||
|
GLAD_API_CALL PFNEGLGETCONFIGSPROC glad_eglGetConfigs;
|
||||||
|
#define eglGetConfigs glad_eglGetConfigs
|
||||||
|
GLAD_API_CALL PFNEGLGETCURRENTCONTEXTPROC glad_eglGetCurrentContext;
|
||||||
|
#define eglGetCurrentContext glad_eglGetCurrentContext
|
||||||
|
GLAD_API_CALL PFNEGLGETCURRENTDISPLAYPROC glad_eglGetCurrentDisplay;
|
||||||
|
#define eglGetCurrentDisplay glad_eglGetCurrentDisplay
|
||||||
|
GLAD_API_CALL PFNEGLGETCURRENTSURFACEPROC glad_eglGetCurrentSurface;
|
||||||
|
#define eglGetCurrentSurface glad_eglGetCurrentSurface
|
||||||
|
GLAD_API_CALL PFNEGLGETDISPLAYPROC glad_eglGetDisplay;
|
||||||
|
#define eglGetDisplay glad_eglGetDisplay
|
||||||
|
GLAD_API_CALL PFNEGLGETERRORPROC glad_eglGetError;
|
||||||
|
#define eglGetError glad_eglGetError
|
||||||
|
GLAD_API_CALL PFNEGLGETPLATFORMDISPLAYPROC glad_eglGetPlatformDisplay;
|
||||||
|
#define eglGetPlatformDisplay glad_eglGetPlatformDisplay
|
||||||
|
GLAD_API_CALL PFNEGLGETPROCADDRESSPROC glad_eglGetProcAddress;
|
||||||
|
#define eglGetProcAddress glad_eglGetProcAddress
|
||||||
|
GLAD_API_CALL PFNEGLGETSYNCATTRIBPROC glad_eglGetSyncAttrib;
|
||||||
|
#define eglGetSyncAttrib glad_eglGetSyncAttrib
|
||||||
|
GLAD_API_CALL PFNEGLINITIALIZEPROC glad_eglInitialize;
|
||||||
|
#define eglInitialize glad_eglInitialize
|
||||||
|
GLAD_API_CALL PFNEGLMAKECURRENTPROC glad_eglMakeCurrent;
|
||||||
|
#define eglMakeCurrent glad_eglMakeCurrent
|
||||||
|
GLAD_API_CALL PFNEGLQUERYAPIPROC glad_eglQueryAPI;
|
||||||
|
#define eglQueryAPI glad_eglQueryAPI
|
||||||
|
GLAD_API_CALL PFNEGLQUERYCONTEXTPROC glad_eglQueryContext;
|
||||||
|
#define eglQueryContext glad_eglQueryContext
|
||||||
|
GLAD_API_CALL PFNEGLQUERYSTRINGPROC glad_eglQueryString;
|
||||||
|
#define eglQueryString glad_eglQueryString
|
||||||
|
GLAD_API_CALL PFNEGLQUERYSURFACEPROC glad_eglQuerySurface;
|
||||||
|
#define eglQuerySurface glad_eglQuerySurface
|
||||||
|
GLAD_API_CALL PFNEGLRELEASETEXIMAGEPROC glad_eglReleaseTexImage;
|
||||||
|
#define eglReleaseTexImage glad_eglReleaseTexImage
|
||||||
|
GLAD_API_CALL PFNEGLRELEASETHREADPROC glad_eglReleaseThread;
|
||||||
|
#define eglReleaseThread glad_eglReleaseThread
|
||||||
|
GLAD_API_CALL PFNEGLSURFACEATTRIBPROC glad_eglSurfaceAttrib;
|
||||||
|
#define eglSurfaceAttrib glad_eglSurfaceAttrib
|
||||||
|
GLAD_API_CALL PFNEGLSWAPBUFFERSPROC glad_eglSwapBuffers;
|
||||||
|
#define eglSwapBuffers glad_eglSwapBuffers
|
||||||
|
GLAD_API_CALL PFNEGLSWAPINTERVALPROC glad_eglSwapInterval;
|
||||||
|
#define eglSwapInterval glad_eglSwapInterval
|
||||||
|
GLAD_API_CALL PFNEGLTERMINATEPROC glad_eglTerminate;
|
||||||
|
#define eglTerminate glad_eglTerminate
|
||||||
|
GLAD_API_CALL PFNEGLWAITCLIENTPROC glad_eglWaitClient;
|
||||||
|
#define eglWaitClient glad_eglWaitClient
|
||||||
|
GLAD_API_CALL PFNEGLWAITGLPROC glad_eglWaitGL;
|
||||||
|
#define eglWaitGL glad_eglWaitGL
|
||||||
|
GLAD_API_CALL PFNEGLWAITNATIVEPROC glad_eglWaitNative;
|
||||||
|
#define eglWaitNative glad_eglWaitNative
|
||||||
|
GLAD_API_CALL PFNEGLWAITSYNCPROC glad_eglWaitSync;
|
||||||
|
#define eglWaitSync glad_eglWaitSync
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GLAD_API_CALL int gladLoadEGLUserPtr(EGLDisplay display, GLADuserptrloadfunc load, void *userptr);
|
||||||
|
GLAD_API_CALL int gladLoadEGL(EGLDisplay display, GLADloadfunc load);
|
||||||
|
|
||||||
|
#ifdef GLAD_EGL
|
||||||
|
|
||||||
|
GLAD_API_CALL int gladLoaderLoadEGL(EGLDisplay display);
|
||||||
|
|
||||||
|
GLAD_API_CALL void gladLoaderUnloadEGL(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
2
quark/vendor/glad/include/glad/gl.h
vendored
2
quark/vendor/glad/include/glad/gl.h
vendored
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Loader generated by glad 2.0.8 on Sun Jan 5 14:47:47 2025
|
* Loader generated by glad 2.0.8 on Tue Jan 7 20:31:12 2025
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
|
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
5766
quark/vendor/glad/include/glad/vulkan.h
vendored
Normal file
5766
quark/vendor/glad/include/glad/vulkan.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
84
quark/vendor/glad/include/vk_platform.h
vendored
Normal file
84
quark/vendor/glad/include/vk_platform.h
vendored
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
/* */
|
||||||
|
/* File: vk_platform.h */
|
||||||
|
/* */
|
||||||
|
/*
|
||||||
|
** Copyright 2014-2024 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef VK_PLATFORM_H_
|
||||||
|
#define VK_PLATFORM_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/*
|
||||||
|
***************************************************************************************************
|
||||||
|
* Platform-specific directives and type declarations
|
||||||
|
***************************************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Platform-specific calling convention macros.
|
||||||
|
*
|
||||||
|
* Platforms should define these so that Vulkan clients call Vulkan commands
|
||||||
|
* with the same calling conventions that the Vulkan implementation expects.
|
||||||
|
*
|
||||||
|
* VKAPI_ATTR - Placed before the return type in function declarations.
|
||||||
|
* Useful for C++11 and GCC/Clang-style function attribute syntax.
|
||||||
|
* VKAPI_CALL - Placed after the return type in function declarations.
|
||||||
|
* Useful for MSVC-style calling convention syntax.
|
||||||
|
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
|
||||||
|
*
|
||||||
|
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
|
||||||
|
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32)
|
||||||
|
/* On Windows, Vulkan commands use the stdcall convention */
|
||||||
|
#define VKAPI_ATTR
|
||||||
|
#define VKAPI_CALL __stdcall
|
||||||
|
#define VKAPI_PTR VKAPI_CALL
|
||||||
|
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||||
|
#error "Vulkan is not supported for the 'armeabi' NDK ABI"
|
||||||
|
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
||||||
|
/* On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" */
|
||||||
|
/* calling convention, i.e. float parameters are passed in registers. This */
|
||||||
|
/* is true even if the rest of the application passes floats on the stack, */
|
||||||
|
/* as it does by default when compiling for the armeabi-v7a NDK ABI. */
|
||||||
|
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
|
||||||
|
#define VKAPI_CALL
|
||||||
|
#define VKAPI_PTR VKAPI_ATTR
|
||||||
|
#else
|
||||||
|
/* On other platforms, use the default calling convention */
|
||||||
|
#define VKAPI_ATTR
|
||||||
|
#define VKAPI_CALL
|
||||||
|
#define VKAPI_PTR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(VK_NO_STDDEF_H)
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif /* !defined(VK_NO_STDDEF_H) */
|
||||||
|
|
||||||
|
#if !defined(VK_NO_STDINT_H)
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||||
|
typedef signed __int8 int8_t;
|
||||||
|
typedef unsigned __int8 uint8_t;
|
||||||
|
typedef signed __int16 int16_t;
|
||||||
|
typedef unsigned __int16 uint16_t;
|
||||||
|
typedef signed __int32 int32_t;
|
||||||
|
typedef unsigned __int32 uint32_t;
|
||||||
|
typedef signed __int64 int64_t;
|
||||||
|
typedef unsigned __int64 uint64_t;
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
#endif /* !defined(VK_NO_STDINT_H) */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
397
quark/vendor/glad/src/egl.c
vendored
Normal file
397
quark/vendor/glad/src/egl.c
vendored
Normal file
|
@ -0,0 +1,397 @@
|
||||||
|
/**
|
||||||
|
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <glad/egl.h>
|
||||||
|
|
||||||
|
#ifndef GLAD_IMPL_UTIL_C_
|
||||||
|
#define GLAD_IMPL_UTIL_C_
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define GLAD_IMPL_UTIL_SSCANF sscanf_s
|
||||||
|
#else
|
||||||
|
#define GLAD_IMPL_UTIL_SSCANF sscanf
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* GLAD_IMPL_UTIL_C_ */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int GLAD_EGL_VERSION_1_0 = 0;
|
||||||
|
int GLAD_EGL_VERSION_1_1 = 0;
|
||||||
|
int GLAD_EGL_VERSION_1_2 = 0;
|
||||||
|
int GLAD_EGL_VERSION_1_3 = 0;
|
||||||
|
int GLAD_EGL_VERSION_1_4 = 0;
|
||||||
|
int GLAD_EGL_VERSION_1_5 = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PFNEGLBINDAPIPROC glad_eglBindAPI = NULL;
|
||||||
|
PFNEGLBINDTEXIMAGEPROC glad_eglBindTexImage = NULL;
|
||||||
|
PFNEGLCHOOSECONFIGPROC glad_eglChooseConfig = NULL;
|
||||||
|
PFNEGLCLIENTWAITSYNCPROC glad_eglClientWaitSync = NULL;
|
||||||
|
PFNEGLCOPYBUFFERSPROC glad_eglCopyBuffers = NULL;
|
||||||
|
PFNEGLCREATECONTEXTPROC glad_eglCreateContext = NULL;
|
||||||
|
PFNEGLCREATEIMAGEPROC glad_eglCreateImage = NULL;
|
||||||
|
PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC glad_eglCreatePbufferFromClientBuffer = NULL;
|
||||||
|
PFNEGLCREATEPBUFFERSURFACEPROC glad_eglCreatePbufferSurface = NULL;
|
||||||
|
PFNEGLCREATEPIXMAPSURFACEPROC glad_eglCreatePixmapSurface = NULL;
|
||||||
|
PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC glad_eglCreatePlatformPixmapSurface = NULL;
|
||||||
|
PFNEGLCREATEPLATFORMWINDOWSURFACEPROC glad_eglCreatePlatformWindowSurface = NULL;
|
||||||
|
PFNEGLCREATESYNCPROC glad_eglCreateSync = NULL;
|
||||||
|
PFNEGLCREATEWINDOWSURFACEPROC glad_eglCreateWindowSurface = NULL;
|
||||||
|
PFNEGLDESTROYCONTEXTPROC glad_eglDestroyContext = NULL;
|
||||||
|
PFNEGLDESTROYIMAGEPROC glad_eglDestroyImage = NULL;
|
||||||
|
PFNEGLDESTROYSURFACEPROC glad_eglDestroySurface = NULL;
|
||||||
|
PFNEGLDESTROYSYNCPROC glad_eglDestroySync = NULL;
|
||||||
|
PFNEGLGETCONFIGATTRIBPROC glad_eglGetConfigAttrib = NULL;
|
||||||
|
PFNEGLGETCONFIGSPROC glad_eglGetConfigs = NULL;
|
||||||
|
PFNEGLGETCURRENTCONTEXTPROC glad_eglGetCurrentContext = NULL;
|
||||||
|
PFNEGLGETCURRENTDISPLAYPROC glad_eglGetCurrentDisplay = NULL;
|
||||||
|
PFNEGLGETCURRENTSURFACEPROC glad_eglGetCurrentSurface = NULL;
|
||||||
|
PFNEGLGETDISPLAYPROC glad_eglGetDisplay = NULL;
|
||||||
|
PFNEGLGETERRORPROC glad_eglGetError = NULL;
|
||||||
|
PFNEGLGETPLATFORMDISPLAYPROC glad_eglGetPlatformDisplay = NULL;
|
||||||
|
PFNEGLGETPROCADDRESSPROC glad_eglGetProcAddress = NULL;
|
||||||
|
PFNEGLGETSYNCATTRIBPROC glad_eglGetSyncAttrib = NULL;
|
||||||
|
PFNEGLINITIALIZEPROC glad_eglInitialize = NULL;
|
||||||
|
PFNEGLMAKECURRENTPROC glad_eglMakeCurrent = NULL;
|
||||||
|
PFNEGLQUERYAPIPROC glad_eglQueryAPI = NULL;
|
||||||
|
PFNEGLQUERYCONTEXTPROC glad_eglQueryContext = NULL;
|
||||||
|
PFNEGLQUERYSTRINGPROC glad_eglQueryString = NULL;
|
||||||
|
PFNEGLQUERYSURFACEPROC glad_eglQuerySurface = NULL;
|
||||||
|
PFNEGLRELEASETEXIMAGEPROC glad_eglReleaseTexImage = NULL;
|
||||||
|
PFNEGLRELEASETHREADPROC glad_eglReleaseThread = NULL;
|
||||||
|
PFNEGLSURFACEATTRIBPROC glad_eglSurfaceAttrib = NULL;
|
||||||
|
PFNEGLSWAPBUFFERSPROC glad_eglSwapBuffers = NULL;
|
||||||
|
PFNEGLSWAPINTERVALPROC glad_eglSwapInterval = NULL;
|
||||||
|
PFNEGLTERMINATEPROC glad_eglTerminate = NULL;
|
||||||
|
PFNEGLWAITCLIENTPROC glad_eglWaitClient = NULL;
|
||||||
|
PFNEGLWAITGLPROC glad_eglWaitGL = NULL;
|
||||||
|
PFNEGLWAITNATIVEPROC glad_eglWaitNative = NULL;
|
||||||
|
PFNEGLWAITSYNCPROC glad_eglWaitSync = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
static void glad_egl_load_EGL_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) {
|
||||||
|
if(!GLAD_EGL_VERSION_1_0) return;
|
||||||
|
glad_eglChooseConfig = (PFNEGLCHOOSECONFIGPROC) load(userptr, "eglChooseConfig");
|
||||||
|
glad_eglCopyBuffers = (PFNEGLCOPYBUFFERSPROC) load(userptr, "eglCopyBuffers");
|
||||||
|
glad_eglCreateContext = (PFNEGLCREATECONTEXTPROC) load(userptr, "eglCreateContext");
|
||||||
|
glad_eglCreatePbufferSurface = (PFNEGLCREATEPBUFFERSURFACEPROC) load(userptr, "eglCreatePbufferSurface");
|
||||||
|
glad_eglCreatePixmapSurface = (PFNEGLCREATEPIXMAPSURFACEPROC) load(userptr, "eglCreatePixmapSurface");
|
||||||
|
glad_eglCreateWindowSurface = (PFNEGLCREATEWINDOWSURFACEPROC) load(userptr, "eglCreateWindowSurface");
|
||||||
|
glad_eglDestroyContext = (PFNEGLDESTROYCONTEXTPROC) load(userptr, "eglDestroyContext");
|
||||||
|
glad_eglDestroySurface = (PFNEGLDESTROYSURFACEPROC) load(userptr, "eglDestroySurface");
|
||||||
|
glad_eglGetConfigAttrib = (PFNEGLGETCONFIGATTRIBPROC) load(userptr, "eglGetConfigAttrib");
|
||||||
|
glad_eglGetConfigs = (PFNEGLGETCONFIGSPROC) load(userptr, "eglGetConfigs");
|
||||||
|
glad_eglGetCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) load(userptr, "eglGetCurrentDisplay");
|
||||||
|
glad_eglGetCurrentSurface = (PFNEGLGETCURRENTSURFACEPROC) load(userptr, "eglGetCurrentSurface");
|
||||||
|
glad_eglGetDisplay = (PFNEGLGETDISPLAYPROC) load(userptr, "eglGetDisplay");
|
||||||
|
glad_eglGetError = (PFNEGLGETERRORPROC) load(userptr, "eglGetError");
|
||||||
|
glad_eglGetProcAddress = (PFNEGLGETPROCADDRESSPROC) load(userptr, "eglGetProcAddress");
|
||||||
|
glad_eglInitialize = (PFNEGLINITIALIZEPROC) load(userptr, "eglInitialize");
|
||||||
|
glad_eglMakeCurrent = (PFNEGLMAKECURRENTPROC) load(userptr, "eglMakeCurrent");
|
||||||
|
glad_eglQueryContext = (PFNEGLQUERYCONTEXTPROC) load(userptr, "eglQueryContext");
|
||||||
|
glad_eglQueryString = (PFNEGLQUERYSTRINGPROC) load(userptr, "eglQueryString");
|
||||||
|
glad_eglQuerySurface = (PFNEGLQUERYSURFACEPROC) load(userptr, "eglQuerySurface");
|
||||||
|
glad_eglSwapBuffers = (PFNEGLSWAPBUFFERSPROC) load(userptr, "eglSwapBuffers");
|
||||||
|
glad_eglTerminate = (PFNEGLTERMINATEPROC) load(userptr, "eglTerminate");
|
||||||
|
glad_eglWaitGL = (PFNEGLWAITGLPROC) load(userptr, "eglWaitGL");
|
||||||
|
glad_eglWaitNative = (PFNEGLWAITNATIVEPROC) load(userptr, "eglWaitNative");
|
||||||
|
}
|
||||||
|
static void glad_egl_load_EGL_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) {
|
||||||
|
if(!GLAD_EGL_VERSION_1_1) return;
|
||||||
|
glad_eglBindTexImage = (PFNEGLBINDTEXIMAGEPROC) load(userptr, "eglBindTexImage");
|
||||||
|
glad_eglReleaseTexImage = (PFNEGLRELEASETEXIMAGEPROC) load(userptr, "eglReleaseTexImage");
|
||||||
|
glad_eglSurfaceAttrib = (PFNEGLSURFACEATTRIBPROC) load(userptr, "eglSurfaceAttrib");
|
||||||
|
glad_eglSwapInterval = (PFNEGLSWAPINTERVALPROC) load(userptr, "eglSwapInterval");
|
||||||
|
}
|
||||||
|
static void glad_egl_load_EGL_VERSION_1_2( GLADuserptrloadfunc load, void* userptr) {
|
||||||
|
if(!GLAD_EGL_VERSION_1_2) return;
|
||||||
|
glad_eglBindAPI = (PFNEGLBINDAPIPROC) load(userptr, "eglBindAPI");
|
||||||
|
glad_eglCreatePbufferFromClientBuffer = (PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC) load(userptr, "eglCreatePbufferFromClientBuffer");
|
||||||
|
glad_eglQueryAPI = (PFNEGLQUERYAPIPROC) load(userptr, "eglQueryAPI");
|
||||||
|
glad_eglReleaseThread = (PFNEGLRELEASETHREADPROC) load(userptr, "eglReleaseThread");
|
||||||
|
glad_eglWaitClient = (PFNEGLWAITCLIENTPROC) load(userptr, "eglWaitClient");
|
||||||
|
}
|
||||||
|
static void glad_egl_load_EGL_VERSION_1_4( GLADuserptrloadfunc load, void* userptr) {
|
||||||
|
if(!GLAD_EGL_VERSION_1_4) return;
|
||||||
|
glad_eglGetCurrentContext = (PFNEGLGETCURRENTCONTEXTPROC) load(userptr, "eglGetCurrentContext");
|
||||||
|
}
|
||||||
|
static void glad_egl_load_EGL_VERSION_1_5( GLADuserptrloadfunc load, void* userptr) {
|
||||||
|
if(!GLAD_EGL_VERSION_1_5) return;
|
||||||
|
glad_eglClientWaitSync = (PFNEGLCLIENTWAITSYNCPROC) load(userptr, "eglClientWaitSync");
|
||||||
|
glad_eglCreateImage = (PFNEGLCREATEIMAGEPROC) load(userptr, "eglCreateImage");
|
||||||
|
glad_eglCreatePlatformPixmapSurface = (PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC) load(userptr, "eglCreatePlatformPixmapSurface");
|
||||||
|
glad_eglCreatePlatformWindowSurface = (PFNEGLCREATEPLATFORMWINDOWSURFACEPROC) load(userptr, "eglCreatePlatformWindowSurface");
|
||||||
|
glad_eglCreateSync = (PFNEGLCREATESYNCPROC) load(userptr, "eglCreateSync");
|
||||||
|
glad_eglDestroyImage = (PFNEGLDESTROYIMAGEPROC) load(userptr, "eglDestroyImage");
|
||||||
|
glad_eglDestroySync = (PFNEGLDESTROYSYNCPROC) load(userptr, "eglDestroySync");
|
||||||
|
glad_eglGetPlatformDisplay = (PFNEGLGETPLATFORMDISPLAYPROC) load(userptr, "eglGetPlatformDisplay");
|
||||||
|
glad_eglGetSyncAttrib = (PFNEGLGETSYNCATTRIBPROC) load(userptr, "eglGetSyncAttrib");
|
||||||
|
glad_eglWaitSync = (PFNEGLWAITSYNCPROC) load(userptr, "eglWaitSync");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static int glad_egl_get_extensions(EGLDisplay display, const char **extensions) {
|
||||||
|
*extensions = eglQueryString(display, EGL_EXTENSIONS);
|
||||||
|
|
||||||
|
return extensions != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int glad_egl_has_extension(const char *extensions, const char *ext) {
|
||||||
|
const char *loc;
|
||||||
|
const char *terminator;
|
||||||
|
if(extensions == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
while(1) {
|
||||||
|
loc = strstr(extensions, ext);
|
||||||
|
if(loc == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
terminator = loc + strlen(ext);
|
||||||
|
if((loc == extensions || *(loc - 1) == ' ') &&
|
||||||
|
(*terminator == ' ' || *terminator == '\0')) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
extensions = terminator;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static GLADapiproc glad_egl_get_proc_from_userptr(void *userptr, const char *name) {
|
||||||
|
return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int glad_egl_find_extensions_egl(EGLDisplay display) {
|
||||||
|
const char *extensions;
|
||||||
|
if (!glad_egl_get_extensions(display, &extensions)) return 0;
|
||||||
|
|
||||||
|
GLAD_UNUSED(glad_egl_has_extension);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int glad_egl_find_core_egl(EGLDisplay display) {
|
||||||
|
int major, minor;
|
||||||
|
const char *version;
|
||||||
|
|
||||||
|
if (display == NULL) {
|
||||||
|
display = EGL_NO_DISPLAY; /* this is usually NULL, better safe than sorry */
|
||||||
|
}
|
||||||
|
if (display == EGL_NO_DISPLAY) {
|
||||||
|
display = eglGetCurrentDisplay();
|
||||||
|
}
|
||||||
|
#ifdef EGL_VERSION_1_4
|
||||||
|
if (display == EGL_NO_DISPLAY) {
|
||||||
|
display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifndef EGL_VERSION_1_5
|
||||||
|
if (display == EGL_NO_DISPLAY) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
version = eglQueryString(display, EGL_VERSION);
|
||||||
|
(void) eglGetError();
|
||||||
|
|
||||||
|
if (version == NULL) {
|
||||||
|
major = 1;
|
||||||
|
minor = 0;
|
||||||
|
} else {
|
||||||
|
GLAD_IMPL_UTIL_SSCANF(version, "%d.%d", &major, &minor);
|
||||||
|
}
|
||||||
|
|
||||||
|
GLAD_EGL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
|
||||||
|
GLAD_EGL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
|
||||||
|
GLAD_EGL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
|
||||||
|
GLAD_EGL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
|
||||||
|
GLAD_EGL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
|
||||||
|
GLAD_EGL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1;
|
||||||
|
|
||||||
|
return GLAD_MAKE_VERSION(major, minor);
|
||||||
|
}
|
||||||
|
|
||||||
|
int gladLoadEGLUserPtr(EGLDisplay display, GLADuserptrloadfunc load, void* userptr) {
|
||||||
|
int version;
|
||||||
|
eglGetDisplay = (PFNEGLGETDISPLAYPROC) load(userptr, "eglGetDisplay");
|
||||||
|
eglGetCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) load(userptr, "eglGetCurrentDisplay");
|
||||||
|
eglQueryString = (PFNEGLQUERYSTRINGPROC) load(userptr, "eglQueryString");
|
||||||
|
eglGetError = (PFNEGLGETERRORPROC) load(userptr, "eglGetError");
|
||||||
|
if (eglGetDisplay == NULL || eglGetCurrentDisplay == NULL || eglQueryString == NULL || eglGetError == NULL) return 0;
|
||||||
|
|
||||||
|
version = glad_egl_find_core_egl(display);
|
||||||
|
if (!version) return 0;
|
||||||
|
glad_egl_load_EGL_VERSION_1_0(load, userptr);
|
||||||
|
glad_egl_load_EGL_VERSION_1_1(load, userptr);
|
||||||
|
glad_egl_load_EGL_VERSION_1_2(load, userptr);
|
||||||
|
glad_egl_load_EGL_VERSION_1_4(load, userptr);
|
||||||
|
glad_egl_load_EGL_VERSION_1_5(load, userptr);
|
||||||
|
|
||||||
|
if (!glad_egl_find_extensions_egl(display)) return 0;
|
||||||
|
|
||||||
|
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
int gladLoadEGL(EGLDisplay display, GLADloadfunc load) {
|
||||||
|
return gladLoadEGLUserPtr(display, glad_egl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef GLAD_EGL
|
||||||
|
|
||||||
|
#ifndef GLAD_LOADER_LIBRARY_C_
|
||||||
|
#define GLAD_LOADER_LIBRARY_C_
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#if GLAD_PLATFORM_WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static void* glad_get_dlopen_handle(const char *lib_names[], int length) {
|
||||||
|
void *handle = NULL;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < length; ++i) {
|
||||||
|
#if GLAD_PLATFORM_WIN32
|
||||||
|
#if GLAD_PLATFORM_UWP
|
||||||
|
size_t buffer_size = (strlen(lib_names[i]) + 1) * sizeof(WCHAR);
|
||||||
|
LPWSTR buffer = (LPWSTR) malloc(buffer_size);
|
||||||
|
if (buffer != NULL) {
|
||||||
|
int ret = MultiByteToWideChar(CP_ACP, 0, lib_names[i], -1, buffer, buffer_size);
|
||||||
|
if (ret != 0) {
|
||||||
|
handle = (void*) LoadPackagedLibrary(buffer, 0);
|
||||||
|
}
|
||||||
|
free((void*) buffer);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
handle = (void*) LoadLibraryA(lib_names[i]);
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
handle = dlopen(lib_names[i], RTLD_LAZY | RTLD_LOCAL);
|
||||||
|
#endif
|
||||||
|
if (handle != NULL) {
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void glad_close_dlopen_handle(void* handle) {
|
||||||
|
if (handle != NULL) {
|
||||||
|
#if GLAD_PLATFORM_WIN32
|
||||||
|
FreeLibrary((HMODULE) handle);
|
||||||
|
#else
|
||||||
|
dlclose(handle);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static GLADapiproc glad_dlsym_handle(void* handle, const char *name) {
|
||||||
|
if (handle == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if GLAD_PLATFORM_WIN32
|
||||||
|
return (GLADapiproc) GetProcAddress((HMODULE) handle, name);
|
||||||
|
#else
|
||||||
|
return GLAD_GNUC_EXTENSION (GLADapiproc) dlsym(handle, name);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* GLAD_LOADER_LIBRARY_C_ */
|
||||||
|
|
||||||
|
struct _glad_egl_userptr {
|
||||||
|
void *handle;
|
||||||
|
PFNEGLGETPROCADDRESSPROC get_proc_address_ptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
static GLADapiproc glad_egl_get_proc(void *vuserptr, const char* name) {
|
||||||
|
struct _glad_egl_userptr userptr = *(struct _glad_egl_userptr*) vuserptr;
|
||||||
|
GLADapiproc result = NULL;
|
||||||
|
|
||||||
|
result = glad_dlsym_handle(userptr.handle, name);
|
||||||
|
if (result == NULL) {
|
||||||
|
result = GLAD_GNUC_EXTENSION (GLADapiproc) userptr.get_proc_address_ptr(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void* _egl_handle = NULL;
|
||||||
|
|
||||||
|
static void* glad_egl_dlopen_handle(void) {
|
||||||
|
#if GLAD_PLATFORM_APPLE
|
||||||
|
static const char *NAMES[] = {"libEGL.dylib"};
|
||||||
|
#elif GLAD_PLATFORM_WIN32
|
||||||
|
static const char *NAMES[] = {"libEGL.dll", "EGL.dll"};
|
||||||
|
#else
|
||||||
|
static const char *NAMES[] = {"libEGL.so.1", "libEGL.so"};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_egl_handle == NULL) {
|
||||||
|
_egl_handle = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
return _egl_handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct _glad_egl_userptr glad_egl_build_userptr(void *handle) {
|
||||||
|
struct _glad_egl_userptr userptr;
|
||||||
|
userptr.handle = handle;
|
||||||
|
userptr.get_proc_address_ptr = (PFNEGLGETPROCADDRESSPROC) glad_dlsym_handle(handle, "eglGetProcAddress");
|
||||||
|
return userptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
int gladLoaderLoadEGL(EGLDisplay display) {
|
||||||
|
int version = 0;
|
||||||
|
void *handle = NULL;
|
||||||
|
int did_load = 0;
|
||||||
|
struct _glad_egl_userptr userptr;
|
||||||
|
|
||||||
|
did_load = _egl_handle == NULL;
|
||||||
|
handle = glad_egl_dlopen_handle();
|
||||||
|
if (handle != NULL) {
|
||||||
|
userptr = glad_egl_build_userptr(handle);
|
||||||
|
|
||||||
|
if (userptr.get_proc_address_ptr != NULL) {
|
||||||
|
version = gladLoadEGLUserPtr(display, glad_egl_get_proc, &userptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!version && did_load) {
|
||||||
|
gladLoaderUnloadEGL();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void gladLoaderUnloadEGL(void) {
|
||||||
|
if (_egl_handle != NULL) {
|
||||||
|
glad_close_dlopen_handle(_egl_handle);
|
||||||
|
_egl_handle = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* GLAD_EGL */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
1115
quark/vendor/glad/src/vulkan.c
vendored
Normal file
1115
quark/vendor/glad/src/vulkan.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue