mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-04 04:47:22 +12:00
Fix typo
This commit is contained in:
parent
42cbcc1380
commit
5d9ded47da
35 changed files with 37343 additions and 21800 deletions
14
third_party/glad/CMakeLists.txt
vendored
14
third_party/glad/CMakeLists.txt
vendored
|
@ -1,7 +1,11 @@
|
|||
add_library(glad STATIC
|
||||
src/gl.c
|
||||
include/glad/gl.h
|
||||
include/KHR/khrplatform.h
|
||||
)
|
||||
set(GLAD_FILES src/gl.c include/KHR/khrplatform.h)
|
||||
|
||||
if(WIN32)
|
||||
set(GLAD_FILES ${GLAD_FILES} src/glad_wgl.c)
|
||||
elseif(NOT APPLE)
|
||||
set(GLAD_FILES ${GLAD_FILES} src/glad_egl.c src/glad_glx.c)
|
||||
endif()
|
||||
|
||||
add_library(glad STATIC ${GLAD_FILES})
|
||||
|
||||
target_include_directories(glad PUBLIC "include")
|
||||
|
|
169
third_party/glad/include/glad/eglplatform.h
vendored
Normal file
169
third_party/glad/include/glad/eglplatform.h
vendored
Normal file
|
@ -0,0 +1,169 @@
|
|||
#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(__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 */
|
31540
third_party/glad/include/glad/gl.h
vendored
31540
third_party/glad/include/glad/gl.h
vendored
File diff suppressed because one or more lines are too long
1628
third_party/glad/include/glad/glad_egl.h
vendored
Normal file
1628
third_party/glad/include/glad/glad_egl.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
1262
third_party/glad/include/glad/glad_glx.h
vendored
Normal file
1262
third_party/glad/include/glad/glad_glx.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
1014
third_party/glad/include/glad/glad_wgl.h
vendored
Normal file
1014
third_party/glad/include/glad/glad_wgl.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
19209
third_party/glad/src/gl.c
vendored
19209
third_party/glad/src/gl.c
vendored
File diff suppressed because one or more lines are too long
45
third_party/glad/src/glad_egl.c
vendored
Normal file
45
third_party/glad/src/glad_egl.c
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
|
||||
EGL loader generated by glad 0.1.36 on Thu Sep 15 11:06:51 2022.
|
||||
|
||||
Language/Generator: C/C++
|
||||
Specification: egl
|
||||
APIs: egl=1.5
|
||||
Profile: -
|
||||
Extensions:
|
||||
|
||||
Loader: True
|
||||
Local files: True
|
||||
Omit khrplatform: False
|
||||
Reproducible: False
|
||||
|
||||
Commandline:
|
||||
--api="egl=1.5" --generator="c" --spec="egl" --local-files --extensions=""
|
||||
Online:
|
||||
https://glad.dav1d.de/#language=c&specification=egl&loader=on&api=egl%3D1.5
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glad/glad_egl.h>
|
||||
|
||||
int gladLoadEGL(void) {
|
||||
return gladLoadEGLLoader((GLADloadproc)eglGetProcAddress);
|
||||
}
|
||||
|
||||
static int find_extensionsEGL(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void find_coreEGL(void) {
|
||||
}
|
||||
|
||||
int gladLoadEGLLoader(GLADloadproc load) {
|
||||
(void) load;
|
||||
find_coreEGL();
|
||||
|
||||
if (!find_extensionsEGL()) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
880
third_party/glad/src/glad_glx.c
vendored
Normal file
880
third_party/glad/src/glad_glx.c
vendored
Normal file
|
@ -0,0 +1,880 @@
|
|||
/*
|
||||
|
||||
GLX loader generated by glad 0.1.36 on Sat Oct 8 13:52:35 2022.
|
||||
|
||||
Language/Generator: C/C++
|
||||
Specification: glx
|
||||
APIs: glx=1.4
|
||||
Profile: -
|
||||
Extensions:
|
||||
GLX_3DFX_multisample,
|
||||
GLX_AMD_gpu_association,
|
||||
GLX_ARB_context_flush_control,
|
||||
GLX_ARB_create_context,
|
||||
GLX_ARB_create_context_no_error,
|
||||
GLX_ARB_create_context_profile,
|
||||
GLX_ARB_create_context_robustness,
|
||||
GLX_ARB_fbconfig_float,
|
||||
GLX_ARB_framebuffer_sRGB,
|
||||
GLX_ARB_get_proc_address,
|
||||
GLX_ARB_multisample,
|
||||
GLX_ARB_robustness_application_isolation,
|
||||
GLX_ARB_robustness_share_group_isolation,
|
||||
GLX_ARB_vertex_buffer_object,
|
||||
GLX_EXT_buffer_age,
|
||||
GLX_EXT_context_priority,
|
||||
GLX_EXT_create_context_es2_profile,
|
||||
GLX_EXT_create_context_es_profile,
|
||||
GLX_EXT_fbconfig_packed_float,
|
||||
GLX_EXT_framebuffer_sRGB,
|
||||
GLX_EXT_get_drawable_type,
|
||||
GLX_EXT_import_context,
|
||||
GLX_EXT_libglvnd,
|
||||
GLX_EXT_no_config_context,
|
||||
GLX_EXT_stereo_tree,
|
||||
GLX_EXT_swap_control,
|
||||
GLX_EXT_swap_control_tear,
|
||||
GLX_EXT_texture_from_pixmap,
|
||||
GLX_EXT_visual_info,
|
||||
GLX_EXT_visual_rating,
|
||||
GLX_INTEL_swap_event,
|
||||
GLX_MESA_agp_offset,
|
||||
GLX_MESA_copy_sub_buffer,
|
||||
GLX_MESA_pixmap_colormap,
|
||||
GLX_MESA_query_renderer,
|
||||
GLX_MESA_release_buffers,
|
||||
GLX_MESA_set_3dfx_mode,
|
||||
GLX_MESA_swap_control,
|
||||
GLX_NV_copy_buffer,
|
||||
GLX_NV_copy_image,
|
||||
GLX_NV_delay_before_swap,
|
||||
GLX_NV_float_buffer,
|
||||
GLX_NV_multigpu_context,
|
||||
GLX_NV_multisample_coverage,
|
||||
GLX_NV_present_video,
|
||||
GLX_NV_robustness_video_memory_purge,
|
||||
GLX_NV_swap_group,
|
||||
GLX_NV_video_capture,
|
||||
GLX_NV_video_out,
|
||||
GLX_OML_swap_method,
|
||||
GLX_OML_sync_control,
|
||||
GLX_SGIS_blended_overlay,
|
||||
GLX_SGIS_multisample,
|
||||
GLX_SGIS_shared_multisample,
|
||||
GLX_SGIX_dmbuffer,
|
||||
GLX_SGIX_fbconfig,
|
||||
GLX_SGIX_hyperpipe,
|
||||
GLX_SGIX_pbuffer,
|
||||
GLX_SGIX_swap_barrier,
|
||||
GLX_SGIX_swap_group,
|
||||
GLX_SGIX_video_resize,
|
||||
GLX_SGIX_video_source,
|
||||
GLX_SGIX_visual_select_group,
|
||||
GLX_SGI_cushion,
|
||||
GLX_SGI_make_current_read,
|
||||
GLX_SGI_swap_control,
|
||||
GLX_SGI_video_sync,
|
||||
GLX_SUN_get_transparent_index
|
||||
Loader: True
|
||||
Local files: True
|
||||
Omit khrplatform: False
|
||||
Reproducible: False
|
||||
|
||||
Commandline:
|
||||
--api="glx=1.4" --generator="c" --spec="glx" --local-files --extensions="GLX_3DFX_multisample,GLX_AMD_gpu_association,GLX_ARB_context_flush_control,GLX_ARB_create_context,GLX_ARB_create_context_no_error,GLX_ARB_create_context_profile,GLX_ARB_create_context_robustness,GLX_ARB_fbconfig_float,GLX_ARB_framebuffer_sRGB,GLX_ARB_get_proc_address,GLX_ARB_multisample,GLX_ARB_robustness_application_isolation,GLX_ARB_robustness_share_group_isolation,GLX_ARB_vertex_buffer_object,GLX_EXT_buffer_age,GLX_EXT_context_priority,GLX_EXT_create_context_es2_profile,GLX_EXT_create_context_es_profile,GLX_EXT_fbconfig_packed_float,GLX_EXT_framebuffer_sRGB,GLX_EXT_get_drawable_type,GLX_EXT_import_context,GLX_EXT_libglvnd,GLX_EXT_no_config_context,GLX_EXT_stereo_tree,GLX_EXT_swap_control,GLX_EXT_swap_control_tear,GLX_EXT_texture_from_pixmap,GLX_EXT_visual_info,GLX_EXT_visual_rating,GLX_INTEL_swap_event,GLX_MESA_agp_offset,GLX_MESA_copy_sub_buffer,GLX_MESA_pixmap_colormap,GLX_MESA_query_renderer,GLX_MESA_release_buffers,GLX_MESA_set_3dfx_mode,GLX_MESA_swap_control,GLX_NV_copy_buffer,GLX_NV_copy_image,GLX_NV_delay_before_swap,GLX_NV_float_buffer,GLX_NV_multigpu_context,GLX_NV_multisample_coverage,GLX_NV_present_video,GLX_NV_robustness_video_memory_purge,GLX_NV_swap_group,GLX_NV_video_capture,GLX_NV_video_out,GLX_OML_swap_method,GLX_OML_sync_control,GLX_SGIS_blended_overlay,GLX_SGIS_multisample,GLX_SGIS_shared_multisample,GLX_SGIX_dmbuffer,GLX_SGIX_fbconfig,GLX_SGIX_hyperpipe,GLX_SGIX_pbuffer,GLX_SGIX_swap_barrier,GLX_SGIX_swap_group,GLX_SGIX_video_resize,GLX_SGIX_video_source,GLX_SGIX_visual_select_group,GLX_SGI_cushion,GLX_SGI_make_current_read,GLX_SGI_swap_control,GLX_SGI_video_sync,GLX_SUN_get_transparent_index"
|
||||
Online:
|
||||
Too many extensions
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glad/glad_glx.h>
|
||||
|
||||
static void* get_proc(const char *namez);
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#ifndef _WINDOWS_
|
||||
#undef APIENTRY
|
||||
#endif
|
||||
#include <windows.h>
|
||||
static HMODULE libGL;
|
||||
|
||||
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||
static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef __has_include
|
||||
#if __has_include(<winapifamily.h>)
|
||||
#define HAVE_WINAPIFAMILY 1
|
||||
#endif
|
||||
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
|
||||
#define HAVE_WINAPIFAMILY 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINAPIFAMILY
|
||||
#include <winapifamily.h>
|
||||
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#define IS_UWP 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static
|
||||
int open_glx(void) {
|
||||
#ifndef IS_UWP
|
||||
libGL = LoadLibraryW(L"opengl32.dll");
|
||||
if(libGL != NULL) {
|
||||
void (* tmp)(void);
|
||||
tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress");
|
||||
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp;
|
||||
return gladGetProcAddressPtr != NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
void close_glx(void) {
|
||||
if(libGL != NULL) {
|
||||
FreeLibrary((HMODULE) libGL);
|
||||
libGL = NULL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
static void* libGL;
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__HAIKU__)
|
||||
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||
static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||
#endif
|
||||
|
||||
static
|
||||
int open_glx(void) {
|
||||
#ifdef __APPLE__
|
||||
static const char *NAMES[] = {
|
||||
"../Frameworks/OpenGL.framework/OpenGL",
|
||||
"/Library/Frameworks/OpenGL.framework/OpenGL",
|
||||
"/System/Library/Frameworks/OpenGL.framework/OpenGL",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
|
||||
};
|
||||
#else
|
||||
static const char *NAMES[] = {"libGL.so.1", "libGL.so"};
|
||||
#endif
|
||||
|
||||
unsigned int index = 0;
|
||||
for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) {
|
||||
libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
|
||||
|
||||
if(libGL != NULL) {
|
||||
#if defined(__APPLE__) || defined(__HAIKU__)
|
||||
return 1;
|
||||
#else
|
||||
gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
|
||||
"glXGetProcAddressARB");
|
||||
return gladGetProcAddressPtr != NULL;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
void close_glx(void) {
|
||||
if(libGL != NULL) {
|
||||
dlclose(libGL);
|
||||
libGL = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static
|
||||
void* get_proc(const char *namez) {
|
||||
void* result = NULL;
|
||||
if(libGL == NULL) return NULL;
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__HAIKU__)
|
||||
if(gladGetProcAddressPtr != NULL) {
|
||||
result = gladGetProcAddressPtr(namez);
|
||||
}
|
||||
#endif
|
||||
if(result == NULL) {
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
result = (void*)GetProcAddress((HMODULE) libGL, namez);
|
||||
#else
|
||||
result = dlsym(libGL, namez);
|
||||
#endif
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int gladLoadGLX(Display *dpy, int screen) {
|
||||
int status = 0;
|
||||
|
||||
if(open_glx()) {
|
||||
status = gladLoadGLXLoader((GLADloadproc)get_proc, dpy, screen);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void gladUnloadGLX(void) {
|
||||
close_glx();
|
||||
}
|
||||
|
||||
static Display *GLADGLXDisplay = 0;
|
||||
static int GLADGLXscreen = 0;
|
||||
|
||||
static int get_exts(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void free_exts(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
static int has_ext(const char *ext) {
|
||||
const char *terminator;
|
||||
const char *loc;
|
||||
const char *extensions;
|
||||
|
||||
if(!GLAD_GLX_VERSION_1_1)
|
||||
return 0;
|
||||
|
||||
extensions = glXQueryExtensionsString(GLADGLXDisplay, GLADGLXscreen);
|
||||
|
||||
if(extensions == NULL || ext == NULL)
|
||||
return 0;
|
||||
|
||||
while(1) {
|
||||
loc = strstr(extensions, ext);
|
||||
if(loc == NULL)
|
||||
break;
|
||||
|
||||
terminator = loc + strlen(ext);
|
||||
if((loc == extensions || *(loc - 1) == ' ') &&
|
||||
(*terminator == ' ' || *terminator == '\0'))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
extensions = terminator;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GLAD_GLX_VERSION_1_0 = 0;
|
||||
int GLAD_GLX_VERSION_1_1 = 0;
|
||||
int GLAD_GLX_VERSION_1_2 = 0;
|
||||
int GLAD_GLX_VERSION_1_3 = 0;
|
||||
int GLAD_GLX_VERSION_1_4 = 0;
|
||||
PFNGLXCHOOSEFBCONFIGPROC glad_glXChooseFBConfig = NULL;
|
||||
PFNGLXCHOOSEVISUALPROC glad_glXChooseVisual = NULL;
|
||||
PFNGLXCOPYCONTEXTPROC glad_glXCopyContext = NULL;
|
||||
PFNGLXCREATECONTEXTPROC glad_glXCreateContext = NULL;
|
||||
PFNGLXCREATEGLXPIXMAPPROC glad_glXCreateGLXPixmap = NULL;
|
||||
PFNGLXCREATENEWCONTEXTPROC glad_glXCreateNewContext = NULL;
|
||||
PFNGLXCREATEPBUFFERPROC glad_glXCreatePbuffer = NULL;
|
||||
PFNGLXCREATEPIXMAPPROC glad_glXCreatePixmap = NULL;
|
||||
PFNGLXCREATEWINDOWPROC glad_glXCreateWindow = NULL;
|
||||
PFNGLXDESTROYCONTEXTPROC glad_glXDestroyContext = NULL;
|
||||
PFNGLXDESTROYGLXPIXMAPPROC glad_glXDestroyGLXPixmap = NULL;
|
||||
PFNGLXDESTROYPBUFFERPROC glad_glXDestroyPbuffer = NULL;
|
||||
PFNGLXDESTROYPIXMAPPROC glad_glXDestroyPixmap = NULL;
|
||||
PFNGLXDESTROYWINDOWPROC glad_glXDestroyWindow = NULL;
|
||||
PFNGLXGETCLIENTSTRINGPROC glad_glXGetClientString = NULL;
|
||||
PFNGLXGETCONFIGPROC glad_glXGetConfig = NULL;
|
||||
PFNGLXGETCURRENTCONTEXTPROC glad_glXGetCurrentContext = NULL;
|
||||
PFNGLXGETCURRENTDISPLAYPROC glad_glXGetCurrentDisplay = NULL;
|
||||
PFNGLXGETCURRENTDRAWABLEPROC glad_glXGetCurrentDrawable = NULL;
|
||||
PFNGLXGETCURRENTREADDRAWABLEPROC glad_glXGetCurrentReadDrawable = NULL;
|
||||
PFNGLXGETFBCONFIGATTRIBPROC glad_glXGetFBConfigAttrib = NULL;
|
||||
PFNGLXGETFBCONFIGSPROC glad_glXGetFBConfigs = NULL;
|
||||
PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress = NULL;
|
||||
PFNGLXGETSELECTEDEVENTPROC glad_glXGetSelectedEvent = NULL;
|
||||
PFNGLXGETVISUALFROMFBCONFIGPROC glad_glXGetVisualFromFBConfig = NULL;
|
||||
PFNGLXISDIRECTPROC glad_glXIsDirect = NULL;
|
||||
PFNGLXMAKECONTEXTCURRENTPROC glad_glXMakeContextCurrent = NULL;
|
||||
PFNGLXMAKECURRENTPROC glad_glXMakeCurrent = NULL;
|
||||
PFNGLXQUERYCONTEXTPROC glad_glXQueryContext = NULL;
|
||||
PFNGLXQUERYDRAWABLEPROC glad_glXQueryDrawable = NULL;
|
||||
PFNGLXQUERYEXTENSIONPROC glad_glXQueryExtension = NULL;
|
||||
PFNGLXQUERYEXTENSIONSSTRINGPROC glad_glXQueryExtensionsString = NULL;
|
||||
PFNGLXQUERYSERVERSTRINGPROC glad_glXQueryServerString = NULL;
|
||||
PFNGLXQUERYVERSIONPROC glad_glXQueryVersion = NULL;
|
||||
PFNGLXSELECTEVENTPROC glad_glXSelectEvent = NULL;
|
||||
PFNGLXSWAPBUFFERSPROC glad_glXSwapBuffers = NULL;
|
||||
PFNGLXUSEXFONTPROC glad_glXUseXFont = NULL;
|
||||
PFNGLXWAITGLPROC glad_glXWaitGL = NULL;
|
||||
PFNGLXWAITXPROC glad_glXWaitX = NULL;
|
||||
int GLAD_GLX_3DFX_multisample = 0;
|
||||
int GLAD_GLX_AMD_gpu_association = 0;
|
||||
int GLAD_GLX_ARB_context_flush_control = 0;
|
||||
int GLAD_GLX_ARB_create_context = 0;
|
||||
int GLAD_GLX_ARB_create_context_no_error = 0;
|
||||
int GLAD_GLX_ARB_create_context_profile = 0;
|
||||
int GLAD_GLX_ARB_create_context_robustness = 0;
|
||||
int GLAD_GLX_ARB_fbconfig_float = 0;
|
||||
int GLAD_GLX_ARB_framebuffer_sRGB = 0;
|
||||
int GLAD_GLX_ARB_get_proc_address = 0;
|
||||
int GLAD_GLX_ARB_multisample = 0;
|
||||
int GLAD_GLX_ARB_robustness_application_isolation = 0;
|
||||
int GLAD_GLX_ARB_robustness_share_group_isolation = 0;
|
||||
int GLAD_GLX_ARB_vertex_buffer_object = 0;
|
||||
int GLAD_GLX_EXT_buffer_age = 0;
|
||||
int GLAD_GLX_EXT_context_priority = 0;
|
||||
int GLAD_GLX_EXT_create_context_es2_profile = 0;
|
||||
int GLAD_GLX_EXT_create_context_es_profile = 0;
|
||||
int GLAD_GLX_EXT_fbconfig_packed_float = 0;
|
||||
int GLAD_GLX_EXT_framebuffer_sRGB = 0;
|
||||
int GLAD_GLX_EXT_get_drawable_type = 0;
|
||||
int GLAD_GLX_EXT_import_context = 0;
|
||||
int GLAD_GLX_EXT_libglvnd = 0;
|
||||
int GLAD_GLX_EXT_no_config_context = 0;
|
||||
int GLAD_GLX_EXT_stereo_tree = 0;
|
||||
int GLAD_GLX_EXT_swap_control = 0;
|
||||
int GLAD_GLX_EXT_swap_control_tear = 0;
|
||||
int GLAD_GLX_EXT_texture_from_pixmap = 0;
|
||||
int GLAD_GLX_EXT_visual_info = 0;
|
||||
int GLAD_GLX_EXT_visual_rating = 0;
|
||||
int GLAD_GLX_INTEL_swap_event = 0;
|
||||
int GLAD_GLX_MESA_agp_offset = 0;
|
||||
int GLAD_GLX_MESA_copy_sub_buffer = 0;
|
||||
int GLAD_GLX_MESA_pixmap_colormap = 0;
|
||||
int GLAD_GLX_MESA_query_renderer = 0;
|
||||
int GLAD_GLX_MESA_release_buffers = 0;
|
||||
int GLAD_GLX_MESA_set_3dfx_mode = 0;
|
||||
int GLAD_GLX_MESA_swap_control = 0;
|
||||
int GLAD_GLX_NV_copy_buffer = 0;
|
||||
int GLAD_GLX_NV_copy_image = 0;
|
||||
int GLAD_GLX_NV_delay_before_swap = 0;
|
||||
int GLAD_GLX_NV_float_buffer = 0;
|
||||
int GLAD_GLX_NV_multigpu_context = 0;
|
||||
int GLAD_GLX_NV_multisample_coverage = 0;
|
||||
int GLAD_GLX_NV_present_video = 0;
|
||||
int GLAD_GLX_NV_robustness_video_memory_purge = 0;
|
||||
int GLAD_GLX_NV_swap_group = 0;
|
||||
int GLAD_GLX_NV_video_capture = 0;
|
||||
int GLAD_GLX_NV_video_out = 0;
|
||||
int GLAD_GLX_OML_swap_method = 0;
|
||||
int GLAD_GLX_OML_sync_control = 0;
|
||||
int GLAD_GLX_SGIS_blended_overlay = 0;
|
||||
int GLAD_GLX_SGIS_multisample = 0;
|
||||
int GLAD_GLX_SGIS_shared_multisample = 0;
|
||||
int GLAD_GLX_SGIX_dmbuffer = 0;
|
||||
int GLAD_GLX_SGIX_fbconfig = 0;
|
||||
int GLAD_GLX_SGIX_hyperpipe = 0;
|
||||
int GLAD_GLX_SGIX_pbuffer = 0;
|
||||
int GLAD_GLX_SGIX_swap_barrier = 0;
|
||||
int GLAD_GLX_SGIX_swap_group = 0;
|
||||
int GLAD_GLX_SGIX_video_resize = 0;
|
||||
int GLAD_GLX_SGIX_video_source = 0;
|
||||
int GLAD_GLX_SGIX_visual_select_group = 0;
|
||||
int GLAD_GLX_SGI_cushion = 0;
|
||||
int GLAD_GLX_SGI_make_current_read = 0;
|
||||
int GLAD_GLX_SGI_swap_control = 0;
|
||||
int GLAD_GLX_SGI_video_sync = 0;
|
||||
int GLAD_GLX_SUN_get_transparent_index = 0;
|
||||
PFNGLXGETGPUIDSAMDPROC glad_glXGetGPUIDsAMD = NULL;
|
||||
PFNGLXGETGPUINFOAMDPROC glad_glXGetGPUInfoAMD = NULL;
|
||||
PFNGLXGETCONTEXTGPUIDAMDPROC glad_glXGetContextGPUIDAMD = NULL;
|
||||
PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC glad_glXCreateAssociatedContextAMD = NULL;
|
||||
PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_glXCreateAssociatedContextAttribsAMD = NULL;
|
||||
PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC glad_glXDeleteAssociatedContextAMD = NULL;
|
||||
PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_glXMakeAssociatedContextCurrentAMD = NULL;
|
||||
PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_glXGetCurrentAssociatedContextAMD = NULL;
|
||||
PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC glad_glXBlitContextFramebufferAMD = NULL;
|
||||
PFNGLXCREATECONTEXTATTRIBSARBPROC glad_glXCreateContextAttribsARB = NULL;
|
||||
PFNGLXGETPROCADDRESSARBPROC glad_glXGetProcAddressARB = NULL;
|
||||
PFNGLXGETCURRENTDISPLAYEXTPROC glad_glXGetCurrentDisplayEXT = NULL;
|
||||
PFNGLXQUERYCONTEXTINFOEXTPROC glad_glXQueryContextInfoEXT = NULL;
|
||||
PFNGLXGETCONTEXTIDEXTPROC glad_glXGetContextIDEXT = NULL;
|
||||
PFNGLXIMPORTCONTEXTEXTPROC glad_glXImportContextEXT = NULL;
|
||||
PFNGLXFREECONTEXTEXTPROC glad_glXFreeContextEXT = NULL;
|
||||
PFNGLXSWAPINTERVALEXTPROC glad_glXSwapIntervalEXT = NULL;
|
||||
PFNGLXBINDTEXIMAGEEXTPROC glad_glXBindTexImageEXT = NULL;
|
||||
PFNGLXRELEASETEXIMAGEEXTPROC glad_glXReleaseTexImageEXT = NULL;
|
||||
PFNGLXGETAGPOFFSETMESAPROC glad_glXGetAGPOffsetMESA = NULL;
|
||||
PFNGLXCOPYSUBBUFFERMESAPROC glad_glXCopySubBufferMESA = NULL;
|
||||
PFNGLXCREATEGLXPIXMAPMESAPROC glad_glXCreateGLXPixmapMESA = NULL;
|
||||
PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC glad_glXQueryCurrentRendererIntegerMESA = NULL;
|
||||
PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC glad_glXQueryCurrentRendererStringMESA = NULL;
|
||||
PFNGLXQUERYRENDERERINTEGERMESAPROC glad_glXQueryRendererIntegerMESA = NULL;
|
||||
PFNGLXQUERYRENDERERSTRINGMESAPROC glad_glXQueryRendererStringMESA = NULL;
|
||||
PFNGLXRELEASEBUFFERSMESAPROC glad_glXReleaseBuffersMESA = NULL;
|
||||
PFNGLXSET3DFXMODEMESAPROC glad_glXSet3DfxModeMESA = NULL;
|
||||
PFNGLXGETSWAPINTERVALMESAPROC glad_glXGetSwapIntervalMESA = NULL;
|
||||
PFNGLXSWAPINTERVALMESAPROC glad_glXSwapIntervalMESA = NULL;
|
||||
PFNGLXCOPYBUFFERSUBDATANVPROC glad_glXCopyBufferSubDataNV = NULL;
|
||||
PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC glad_glXNamedCopyBufferSubDataNV = NULL;
|
||||
PFNGLXCOPYIMAGESUBDATANVPROC glad_glXCopyImageSubDataNV = NULL;
|
||||
PFNGLXDELAYBEFORESWAPNVPROC glad_glXDelayBeforeSwapNV = NULL;
|
||||
PFNGLXENUMERATEVIDEODEVICESNVPROC glad_glXEnumerateVideoDevicesNV = NULL;
|
||||
PFNGLXBINDVIDEODEVICENVPROC glad_glXBindVideoDeviceNV = NULL;
|
||||
PFNGLXJOINSWAPGROUPNVPROC glad_glXJoinSwapGroupNV = NULL;
|
||||
PFNGLXBINDSWAPBARRIERNVPROC glad_glXBindSwapBarrierNV = NULL;
|
||||
PFNGLXQUERYSWAPGROUPNVPROC glad_glXQuerySwapGroupNV = NULL;
|
||||
PFNGLXQUERYMAXSWAPGROUPSNVPROC glad_glXQueryMaxSwapGroupsNV = NULL;
|
||||
PFNGLXQUERYFRAMECOUNTNVPROC glad_glXQueryFrameCountNV = NULL;
|
||||
PFNGLXRESETFRAMECOUNTNVPROC glad_glXResetFrameCountNV = NULL;
|
||||
PFNGLXBINDVIDEOCAPTUREDEVICENVPROC glad_glXBindVideoCaptureDeviceNV = NULL;
|
||||
PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_glXEnumerateVideoCaptureDevicesNV = NULL;
|
||||
PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC glad_glXLockVideoCaptureDeviceNV = NULL;
|
||||
PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC glad_glXQueryVideoCaptureDeviceNV = NULL;
|
||||
PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC glad_glXReleaseVideoCaptureDeviceNV = NULL;
|
||||
PFNGLXGETVIDEODEVICENVPROC glad_glXGetVideoDeviceNV = NULL;
|
||||
PFNGLXRELEASEVIDEODEVICENVPROC glad_glXReleaseVideoDeviceNV = NULL;
|
||||
PFNGLXBINDVIDEOIMAGENVPROC glad_glXBindVideoImageNV = NULL;
|
||||
PFNGLXRELEASEVIDEOIMAGENVPROC glad_glXReleaseVideoImageNV = NULL;
|
||||
PFNGLXSENDPBUFFERTOVIDEONVPROC glad_glXSendPbufferToVideoNV = NULL;
|
||||
PFNGLXGETVIDEOINFONVPROC glad_glXGetVideoInfoNV = NULL;
|
||||
PFNGLXGETSYNCVALUESOMLPROC glad_glXGetSyncValuesOML = NULL;
|
||||
PFNGLXGETMSCRATEOMLPROC glad_glXGetMscRateOML = NULL;
|
||||
PFNGLXSWAPBUFFERSMSCOMLPROC glad_glXSwapBuffersMscOML = NULL;
|
||||
PFNGLXWAITFORMSCOMLPROC glad_glXWaitForMscOML = NULL;
|
||||
PFNGLXWAITFORSBCOMLPROC glad_glXWaitForSbcOML = NULL;
|
||||
#ifdef _DM_BUFFER_H_
|
||||
PFNGLXASSOCIATEDMPBUFFERSGIXPROC glad_glXAssociateDMPbufferSGIX = NULL;
|
||||
#endif
|
||||
PFNGLXGETFBCONFIGATTRIBSGIXPROC glad_glXGetFBConfigAttribSGIX = NULL;
|
||||
PFNGLXCHOOSEFBCONFIGSGIXPROC glad_glXChooseFBConfigSGIX = NULL;
|
||||
PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC glad_glXCreateGLXPixmapWithConfigSGIX = NULL;
|
||||
PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC glad_glXCreateContextWithConfigSGIX = NULL;
|
||||
PFNGLXGETVISUALFROMFBCONFIGSGIXPROC glad_glXGetVisualFromFBConfigSGIX = NULL;
|
||||
PFNGLXGETFBCONFIGFROMVISUALSGIXPROC glad_glXGetFBConfigFromVisualSGIX = NULL;
|
||||
PFNGLXQUERYHYPERPIPENETWORKSGIXPROC glad_glXQueryHyperpipeNetworkSGIX = NULL;
|
||||
PFNGLXHYPERPIPECONFIGSGIXPROC glad_glXHyperpipeConfigSGIX = NULL;
|
||||
PFNGLXQUERYHYPERPIPECONFIGSGIXPROC glad_glXQueryHyperpipeConfigSGIX = NULL;
|
||||
PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC glad_glXDestroyHyperpipeConfigSGIX = NULL;
|
||||
PFNGLXBINDHYPERPIPESGIXPROC glad_glXBindHyperpipeSGIX = NULL;
|
||||
PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC glad_glXQueryHyperpipeBestAttribSGIX = NULL;
|
||||
PFNGLXHYPERPIPEATTRIBSGIXPROC glad_glXHyperpipeAttribSGIX = NULL;
|
||||
PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC glad_glXQueryHyperpipeAttribSGIX = NULL;
|
||||
PFNGLXCREATEGLXPBUFFERSGIXPROC glad_glXCreateGLXPbufferSGIX = NULL;
|
||||
PFNGLXDESTROYGLXPBUFFERSGIXPROC glad_glXDestroyGLXPbufferSGIX = NULL;
|
||||
PFNGLXQUERYGLXPBUFFERSGIXPROC glad_glXQueryGLXPbufferSGIX = NULL;
|
||||
PFNGLXSELECTEVENTSGIXPROC glad_glXSelectEventSGIX = NULL;
|
||||
PFNGLXGETSELECTEDEVENTSGIXPROC glad_glXGetSelectedEventSGIX = NULL;
|
||||
PFNGLXBINDSWAPBARRIERSGIXPROC glad_glXBindSwapBarrierSGIX = NULL;
|
||||
PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC glad_glXQueryMaxSwapBarriersSGIX = NULL;
|
||||
PFNGLXJOINSWAPGROUPSGIXPROC glad_glXJoinSwapGroupSGIX = NULL;
|
||||
PFNGLXBINDCHANNELTOWINDOWSGIXPROC glad_glXBindChannelToWindowSGIX = NULL;
|
||||
PFNGLXCHANNELRECTSGIXPROC glad_glXChannelRectSGIX = NULL;
|
||||
PFNGLXQUERYCHANNELRECTSGIXPROC glad_glXQueryChannelRectSGIX = NULL;
|
||||
PFNGLXQUERYCHANNELDELTASSGIXPROC glad_glXQueryChannelDeltasSGIX = NULL;
|
||||
PFNGLXCHANNELRECTSYNCSGIXPROC glad_glXChannelRectSyncSGIX = NULL;
|
||||
#ifdef _VL_H_
|
||||
PFNGLXCREATEGLXVIDEOSOURCESGIXPROC glad_glXCreateGLXVideoSourceSGIX = NULL;
|
||||
PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC glad_glXDestroyGLXVideoSourceSGIX = NULL;
|
||||
#endif
|
||||
PFNGLXCUSHIONSGIPROC glad_glXCushionSGI = NULL;
|
||||
PFNGLXMAKECURRENTREADSGIPROC glad_glXMakeCurrentReadSGI = NULL;
|
||||
PFNGLXGETCURRENTREADDRAWABLESGIPROC glad_glXGetCurrentReadDrawableSGI = NULL;
|
||||
PFNGLXSWAPINTERVALSGIPROC glad_glXSwapIntervalSGI = NULL;
|
||||
PFNGLXGETVIDEOSYNCSGIPROC glad_glXGetVideoSyncSGI = NULL;
|
||||
PFNGLXWAITVIDEOSYNCSGIPROC glad_glXWaitVideoSyncSGI = NULL;
|
||||
PFNGLXGETTRANSPARENTINDEXSUNPROC glad_glXGetTransparentIndexSUN = NULL;
|
||||
static void load_GLX_VERSION_1_0(GLADloadproc load) {
|
||||
if(!GLAD_GLX_VERSION_1_0) return;
|
||||
glad_glXChooseVisual = (PFNGLXCHOOSEVISUALPROC)load("glXChooseVisual");
|
||||
glad_glXCreateContext = (PFNGLXCREATECONTEXTPROC)load("glXCreateContext");
|
||||
glad_glXDestroyContext = (PFNGLXDESTROYCONTEXTPROC)load("glXDestroyContext");
|
||||
glad_glXMakeCurrent = (PFNGLXMAKECURRENTPROC)load("glXMakeCurrent");
|
||||
glad_glXCopyContext = (PFNGLXCOPYCONTEXTPROC)load("glXCopyContext");
|
||||
glad_glXSwapBuffers = (PFNGLXSWAPBUFFERSPROC)load("glXSwapBuffers");
|
||||
glad_glXCreateGLXPixmap = (PFNGLXCREATEGLXPIXMAPPROC)load("glXCreateGLXPixmap");
|
||||
glad_glXDestroyGLXPixmap = (PFNGLXDESTROYGLXPIXMAPPROC)load("glXDestroyGLXPixmap");
|
||||
glad_glXQueryExtension = (PFNGLXQUERYEXTENSIONPROC)load("glXQueryExtension");
|
||||
glad_glXQueryVersion = (PFNGLXQUERYVERSIONPROC)load("glXQueryVersion");
|
||||
glad_glXIsDirect = (PFNGLXISDIRECTPROC)load("glXIsDirect");
|
||||
glad_glXGetConfig = (PFNGLXGETCONFIGPROC)load("glXGetConfig");
|
||||
glad_glXGetCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC)load("glXGetCurrentContext");
|
||||
glad_glXGetCurrentDrawable = (PFNGLXGETCURRENTDRAWABLEPROC)load("glXGetCurrentDrawable");
|
||||
glad_glXWaitGL = (PFNGLXWAITGLPROC)load("glXWaitGL");
|
||||
glad_glXWaitX = (PFNGLXWAITXPROC)load("glXWaitX");
|
||||
glad_glXUseXFont = (PFNGLXUSEXFONTPROC)load("glXUseXFont");
|
||||
}
|
||||
static void load_GLX_VERSION_1_1(GLADloadproc load) {
|
||||
if(!GLAD_GLX_VERSION_1_1) return;
|
||||
glad_glXQueryExtensionsString = (PFNGLXQUERYEXTENSIONSSTRINGPROC)load("glXQueryExtensionsString");
|
||||
glad_glXQueryServerString = (PFNGLXQUERYSERVERSTRINGPROC)load("glXQueryServerString");
|
||||
glad_glXGetClientString = (PFNGLXGETCLIENTSTRINGPROC)load("glXGetClientString");
|
||||
}
|
||||
static void load_GLX_VERSION_1_2(GLADloadproc load) {
|
||||
if(!GLAD_GLX_VERSION_1_2) return;
|
||||
glad_glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)load("glXGetCurrentDisplay");
|
||||
}
|
||||
static void load_GLX_VERSION_1_3(GLADloadproc load) {
|
||||
if(!GLAD_GLX_VERSION_1_3) return;
|
||||
glad_glXGetFBConfigs = (PFNGLXGETFBCONFIGSPROC)load("glXGetFBConfigs");
|
||||
glad_glXChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC)load("glXChooseFBConfig");
|
||||
glad_glXGetFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC)load("glXGetFBConfigAttrib");
|
||||
glad_glXGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC)load("glXGetVisualFromFBConfig");
|
||||
glad_glXCreateWindow = (PFNGLXCREATEWINDOWPROC)load("glXCreateWindow");
|
||||
glad_glXDestroyWindow = (PFNGLXDESTROYWINDOWPROC)load("glXDestroyWindow");
|
||||
glad_glXCreatePixmap = (PFNGLXCREATEPIXMAPPROC)load("glXCreatePixmap");
|
||||
glad_glXDestroyPixmap = (PFNGLXDESTROYPIXMAPPROC)load("glXDestroyPixmap");
|
||||
glad_glXCreatePbuffer = (PFNGLXCREATEPBUFFERPROC)load("glXCreatePbuffer");
|
||||
glad_glXDestroyPbuffer = (PFNGLXDESTROYPBUFFERPROC)load("glXDestroyPbuffer");
|
||||
glad_glXQueryDrawable = (PFNGLXQUERYDRAWABLEPROC)load("glXQueryDrawable");
|
||||
glad_glXCreateNewContext = (PFNGLXCREATENEWCONTEXTPROC)load("glXCreateNewContext");
|
||||
glad_glXMakeContextCurrent = (PFNGLXMAKECONTEXTCURRENTPROC)load("glXMakeContextCurrent");
|
||||
glad_glXGetCurrentReadDrawable = (PFNGLXGETCURRENTREADDRAWABLEPROC)load("glXGetCurrentReadDrawable");
|
||||
glad_glXQueryContext = (PFNGLXQUERYCONTEXTPROC)load("glXQueryContext");
|
||||
glad_glXSelectEvent = (PFNGLXSELECTEVENTPROC)load("glXSelectEvent");
|
||||
glad_glXGetSelectedEvent = (PFNGLXGETSELECTEDEVENTPROC)load("glXGetSelectedEvent");
|
||||
}
|
||||
static void load_GLX_VERSION_1_4(GLADloadproc load) {
|
||||
if(!GLAD_GLX_VERSION_1_4) return;
|
||||
glad_glXGetProcAddress = (PFNGLXGETPROCADDRESSPROC)load("glXGetProcAddress");
|
||||
}
|
||||
static void load_GLX_AMD_gpu_association(GLADloadproc load) {
|
||||
if(!GLAD_GLX_AMD_gpu_association) return;
|
||||
glad_glXGetGPUIDsAMD = (PFNGLXGETGPUIDSAMDPROC)load("glXGetGPUIDsAMD");
|
||||
glad_glXGetGPUInfoAMD = (PFNGLXGETGPUINFOAMDPROC)load("glXGetGPUInfoAMD");
|
||||
glad_glXGetContextGPUIDAMD = (PFNGLXGETCONTEXTGPUIDAMDPROC)load("glXGetContextGPUIDAMD");
|
||||
glad_glXCreateAssociatedContextAMD = (PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC)load("glXCreateAssociatedContextAMD");
|
||||
glad_glXCreateAssociatedContextAttribsAMD = (PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC)load("glXCreateAssociatedContextAttribsAMD");
|
||||
glad_glXDeleteAssociatedContextAMD = (PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC)load("glXDeleteAssociatedContextAMD");
|
||||
glad_glXMakeAssociatedContextCurrentAMD = (PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)load("glXMakeAssociatedContextCurrentAMD");
|
||||
glad_glXGetCurrentAssociatedContextAMD = (PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC)load("glXGetCurrentAssociatedContextAMD");
|
||||
glad_glXBlitContextFramebufferAMD = (PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC)load("glXBlitContextFramebufferAMD");
|
||||
}
|
||||
static void load_GLX_ARB_create_context(GLADloadproc load) {
|
||||
if(!GLAD_GLX_ARB_create_context) return;
|
||||
glad_glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)load("glXCreateContextAttribsARB");
|
||||
}
|
||||
static void load_GLX_ARB_get_proc_address(GLADloadproc load) {
|
||||
if(!GLAD_GLX_ARB_get_proc_address) return;
|
||||
glad_glXGetProcAddressARB = (PFNGLXGETPROCADDRESSARBPROC)load("glXGetProcAddressARB");
|
||||
}
|
||||
static void load_GLX_EXT_import_context(GLADloadproc load) {
|
||||
if(!GLAD_GLX_EXT_import_context) return;
|
||||
glad_glXGetCurrentDisplayEXT = (PFNGLXGETCURRENTDISPLAYEXTPROC)load("glXGetCurrentDisplayEXT");
|
||||
glad_glXQueryContextInfoEXT = (PFNGLXQUERYCONTEXTINFOEXTPROC)load("glXQueryContextInfoEXT");
|
||||
glad_glXGetContextIDEXT = (PFNGLXGETCONTEXTIDEXTPROC)load("glXGetContextIDEXT");
|
||||
glad_glXImportContextEXT = (PFNGLXIMPORTCONTEXTEXTPROC)load("glXImportContextEXT");
|
||||
glad_glXFreeContextEXT = (PFNGLXFREECONTEXTEXTPROC)load("glXFreeContextEXT");
|
||||
}
|
||||
static void load_GLX_EXT_swap_control(GLADloadproc load) {
|
||||
if(!GLAD_GLX_EXT_swap_control) return;
|
||||
glad_glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)load("glXSwapIntervalEXT");
|
||||
}
|
||||
static void load_GLX_EXT_texture_from_pixmap(GLADloadproc load) {
|
||||
if(!GLAD_GLX_EXT_texture_from_pixmap) return;
|
||||
glad_glXBindTexImageEXT = (PFNGLXBINDTEXIMAGEEXTPROC)load("glXBindTexImageEXT");
|
||||
glad_glXReleaseTexImageEXT = (PFNGLXRELEASETEXIMAGEEXTPROC)load("glXReleaseTexImageEXT");
|
||||
}
|
||||
static void load_GLX_MESA_agp_offset(GLADloadproc load) {
|
||||
if(!GLAD_GLX_MESA_agp_offset) return;
|
||||
glad_glXGetAGPOffsetMESA = (PFNGLXGETAGPOFFSETMESAPROC)load("glXGetAGPOffsetMESA");
|
||||
}
|
||||
static void load_GLX_MESA_copy_sub_buffer(GLADloadproc load) {
|
||||
if(!GLAD_GLX_MESA_copy_sub_buffer) return;
|
||||
glad_glXCopySubBufferMESA = (PFNGLXCOPYSUBBUFFERMESAPROC)load("glXCopySubBufferMESA");
|
||||
}
|
||||
static void load_GLX_MESA_pixmap_colormap(GLADloadproc load) {
|
||||
if(!GLAD_GLX_MESA_pixmap_colormap) return;
|
||||
glad_glXCreateGLXPixmapMESA = (PFNGLXCREATEGLXPIXMAPMESAPROC)load("glXCreateGLXPixmapMESA");
|
||||
}
|
||||
static void load_GLX_MESA_query_renderer(GLADloadproc load) {
|
||||
if(!GLAD_GLX_MESA_query_renderer) return;
|
||||
glad_glXQueryCurrentRendererIntegerMESA = (PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC)load("glXQueryCurrentRendererIntegerMESA");
|
||||
glad_glXQueryCurrentRendererStringMESA = (PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC)load("glXQueryCurrentRendererStringMESA");
|
||||
glad_glXQueryRendererIntegerMESA = (PFNGLXQUERYRENDERERINTEGERMESAPROC)load("glXQueryRendererIntegerMESA");
|
||||
glad_glXQueryRendererStringMESA = (PFNGLXQUERYRENDERERSTRINGMESAPROC)load("glXQueryRendererStringMESA");
|
||||
}
|
||||
static void load_GLX_MESA_release_buffers(GLADloadproc load) {
|
||||
if(!GLAD_GLX_MESA_release_buffers) return;
|
||||
glad_glXReleaseBuffersMESA = (PFNGLXRELEASEBUFFERSMESAPROC)load("glXReleaseBuffersMESA");
|
||||
}
|
||||
static void load_GLX_MESA_set_3dfx_mode(GLADloadproc load) {
|
||||
if(!GLAD_GLX_MESA_set_3dfx_mode) return;
|
||||
glad_glXSet3DfxModeMESA = (PFNGLXSET3DFXMODEMESAPROC)load("glXSet3DfxModeMESA");
|
||||
}
|
||||
static void load_GLX_MESA_swap_control(GLADloadproc load) {
|
||||
if(!GLAD_GLX_MESA_swap_control) return;
|
||||
glad_glXGetSwapIntervalMESA = (PFNGLXGETSWAPINTERVALMESAPROC)load("glXGetSwapIntervalMESA");
|
||||
glad_glXSwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)load("glXSwapIntervalMESA");
|
||||
}
|
||||
static void load_GLX_NV_copy_buffer(GLADloadproc load) {
|
||||
if(!GLAD_GLX_NV_copy_buffer) return;
|
||||
glad_glXCopyBufferSubDataNV = (PFNGLXCOPYBUFFERSUBDATANVPROC)load("glXCopyBufferSubDataNV");
|
||||
glad_glXNamedCopyBufferSubDataNV = (PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC)load("glXNamedCopyBufferSubDataNV");
|
||||
}
|
||||
static void load_GLX_NV_copy_image(GLADloadproc load) {
|
||||
if(!GLAD_GLX_NV_copy_image) return;
|
||||
glad_glXCopyImageSubDataNV = (PFNGLXCOPYIMAGESUBDATANVPROC)load("glXCopyImageSubDataNV");
|
||||
}
|
||||
static void load_GLX_NV_delay_before_swap(GLADloadproc load) {
|
||||
if(!GLAD_GLX_NV_delay_before_swap) return;
|
||||
glad_glXDelayBeforeSwapNV = (PFNGLXDELAYBEFORESWAPNVPROC)load("glXDelayBeforeSwapNV");
|
||||
}
|
||||
static void load_GLX_NV_present_video(GLADloadproc load) {
|
||||
if(!GLAD_GLX_NV_present_video) return;
|
||||
glad_glXEnumerateVideoDevicesNV = (PFNGLXENUMERATEVIDEODEVICESNVPROC)load("glXEnumerateVideoDevicesNV");
|
||||
glad_glXBindVideoDeviceNV = (PFNGLXBINDVIDEODEVICENVPROC)load("glXBindVideoDeviceNV");
|
||||
}
|
||||
static void load_GLX_NV_swap_group(GLADloadproc load) {
|
||||
if(!GLAD_GLX_NV_swap_group) return;
|
||||
glad_glXJoinSwapGroupNV = (PFNGLXJOINSWAPGROUPNVPROC)load("glXJoinSwapGroupNV");
|
||||
glad_glXBindSwapBarrierNV = (PFNGLXBINDSWAPBARRIERNVPROC)load("glXBindSwapBarrierNV");
|
||||
glad_glXQuerySwapGroupNV = (PFNGLXQUERYSWAPGROUPNVPROC)load("glXQuerySwapGroupNV");
|
||||
glad_glXQueryMaxSwapGroupsNV = (PFNGLXQUERYMAXSWAPGROUPSNVPROC)load("glXQueryMaxSwapGroupsNV");
|
||||
glad_glXQueryFrameCountNV = (PFNGLXQUERYFRAMECOUNTNVPROC)load("glXQueryFrameCountNV");
|
||||
glad_glXResetFrameCountNV = (PFNGLXRESETFRAMECOUNTNVPROC)load("glXResetFrameCountNV");
|
||||
}
|
||||
static void load_GLX_NV_video_capture(GLADloadproc load) {
|
||||
if(!GLAD_GLX_NV_video_capture) return;
|
||||
glad_glXBindVideoCaptureDeviceNV = (PFNGLXBINDVIDEOCAPTUREDEVICENVPROC)load("glXBindVideoCaptureDeviceNV");
|
||||
glad_glXEnumerateVideoCaptureDevicesNV = (PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC)load("glXEnumerateVideoCaptureDevicesNV");
|
||||
glad_glXLockVideoCaptureDeviceNV = (PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC)load("glXLockVideoCaptureDeviceNV");
|
||||
glad_glXQueryVideoCaptureDeviceNV = (PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC)load("glXQueryVideoCaptureDeviceNV");
|
||||
glad_glXReleaseVideoCaptureDeviceNV = (PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC)load("glXReleaseVideoCaptureDeviceNV");
|
||||
}
|
||||
static void load_GLX_NV_video_out(GLADloadproc load) {
|
||||
if(!GLAD_GLX_NV_video_out) return;
|
||||
glad_glXGetVideoDeviceNV = (PFNGLXGETVIDEODEVICENVPROC)load("glXGetVideoDeviceNV");
|
||||
glad_glXReleaseVideoDeviceNV = (PFNGLXRELEASEVIDEODEVICENVPROC)load("glXReleaseVideoDeviceNV");
|
||||
glad_glXBindVideoImageNV = (PFNGLXBINDVIDEOIMAGENVPROC)load("glXBindVideoImageNV");
|
||||
glad_glXReleaseVideoImageNV = (PFNGLXRELEASEVIDEOIMAGENVPROC)load("glXReleaseVideoImageNV");
|
||||
glad_glXSendPbufferToVideoNV = (PFNGLXSENDPBUFFERTOVIDEONVPROC)load("glXSendPbufferToVideoNV");
|
||||
glad_glXGetVideoInfoNV = (PFNGLXGETVIDEOINFONVPROC)load("glXGetVideoInfoNV");
|
||||
}
|
||||
static void load_GLX_OML_sync_control(GLADloadproc load) {
|
||||
if(!GLAD_GLX_OML_sync_control) return;
|
||||
glad_glXGetSyncValuesOML = (PFNGLXGETSYNCVALUESOMLPROC)load("glXGetSyncValuesOML");
|
||||
glad_glXGetMscRateOML = (PFNGLXGETMSCRATEOMLPROC)load("glXGetMscRateOML");
|
||||
glad_glXSwapBuffersMscOML = (PFNGLXSWAPBUFFERSMSCOMLPROC)load("glXSwapBuffersMscOML");
|
||||
glad_glXWaitForMscOML = (PFNGLXWAITFORMSCOMLPROC)load("glXWaitForMscOML");
|
||||
glad_glXWaitForSbcOML = (PFNGLXWAITFORSBCOMLPROC)load("glXWaitForSbcOML");
|
||||
}
|
||||
static void load_GLX_SGIX_dmbuffer(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGIX_dmbuffer) return;
|
||||
#ifdef _DM_BUFFER_H_
|
||||
glad_glXAssociateDMPbufferSGIX = (PFNGLXASSOCIATEDMPBUFFERSGIXPROC)load("glXAssociateDMPbufferSGIX");
|
||||
#else
|
||||
(void)load;
|
||||
#endif
|
||||
}
|
||||
static void load_GLX_SGIX_fbconfig(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGIX_fbconfig) return;
|
||||
glad_glXGetFBConfigAttribSGIX = (PFNGLXGETFBCONFIGATTRIBSGIXPROC)load("glXGetFBConfigAttribSGIX");
|
||||
glad_glXChooseFBConfigSGIX = (PFNGLXCHOOSEFBCONFIGSGIXPROC)load("glXChooseFBConfigSGIX");
|
||||
glad_glXCreateGLXPixmapWithConfigSGIX = (PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC)load("glXCreateGLXPixmapWithConfigSGIX");
|
||||
glad_glXCreateContextWithConfigSGIX = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC)load("glXCreateContextWithConfigSGIX");
|
||||
glad_glXGetVisualFromFBConfigSGIX = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC)load("glXGetVisualFromFBConfigSGIX");
|
||||
glad_glXGetFBConfigFromVisualSGIX = (PFNGLXGETFBCONFIGFROMVISUALSGIXPROC)load("glXGetFBConfigFromVisualSGIX");
|
||||
}
|
||||
static void load_GLX_SGIX_hyperpipe(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGIX_hyperpipe) return;
|
||||
glad_glXQueryHyperpipeNetworkSGIX = (PFNGLXQUERYHYPERPIPENETWORKSGIXPROC)load("glXQueryHyperpipeNetworkSGIX");
|
||||
glad_glXHyperpipeConfigSGIX = (PFNGLXHYPERPIPECONFIGSGIXPROC)load("glXHyperpipeConfigSGIX");
|
||||
glad_glXQueryHyperpipeConfigSGIX = (PFNGLXQUERYHYPERPIPECONFIGSGIXPROC)load("glXQueryHyperpipeConfigSGIX");
|
||||
glad_glXDestroyHyperpipeConfigSGIX = (PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC)load("glXDestroyHyperpipeConfigSGIX");
|
||||
glad_glXBindHyperpipeSGIX = (PFNGLXBINDHYPERPIPESGIXPROC)load("glXBindHyperpipeSGIX");
|
||||
glad_glXQueryHyperpipeBestAttribSGIX = (PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC)load("glXQueryHyperpipeBestAttribSGIX");
|
||||
glad_glXHyperpipeAttribSGIX = (PFNGLXHYPERPIPEATTRIBSGIXPROC)load("glXHyperpipeAttribSGIX");
|
||||
glad_glXQueryHyperpipeAttribSGIX = (PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC)load("glXQueryHyperpipeAttribSGIX");
|
||||
}
|
||||
static void load_GLX_SGIX_pbuffer(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGIX_pbuffer) return;
|
||||
glad_glXCreateGLXPbufferSGIX = (PFNGLXCREATEGLXPBUFFERSGIXPROC)load("glXCreateGLXPbufferSGIX");
|
||||
glad_glXDestroyGLXPbufferSGIX = (PFNGLXDESTROYGLXPBUFFERSGIXPROC)load("glXDestroyGLXPbufferSGIX");
|
||||
glad_glXQueryGLXPbufferSGIX = (PFNGLXQUERYGLXPBUFFERSGIXPROC)load("glXQueryGLXPbufferSGIX");
|
||||
glad_glXSelectEventSGIX = (PFNGLXSELECTEVENTSGIXPROC)load("glXSelectEventSGIX");
|
||||
glad_glXGetSelectedEventSGIX = (PFNGLXGETSELECTEDEVENTSGIXPROC)load("glXGetSelectedEventSGIX");
|
||||
}
|
||||
static void load_GLX_SGIX_swap_barrier(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGIX_swap_barrier) return;
|
||||
glad_glXBindSwapBarrierSGIX = (PFNGLXBINDSWAPBARRIERSGIXPROC)load("glXBindSwapBarrierSGIX");
|
||||
glad_glXQueryMaxSwapBarriersSGIX = (PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC)load("glXQueryMaxSwapBarriersSGIX");
|
||||
}
|
||||
static void load_GLX_SGIX_swap_group(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGIX_swap_group) return;
|
||||
glad_glXJoinSwapGroupSGIX = (PFNGLXJOINSWAPGROUPSGIXPROC)load("glXJoinSwapGroupSGIX");
|
||||
}
|
||||
static void load_GLX_SGIX_video_resize(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGIX_video_resize) return;
|
||||
glad_glXBindChannelToWindowSGIX = (PFNGLXBINDCHANNELTOWINDOWSGIXPROC)load("glXBindChannelToWindowSGIX");
|
||||
glad_glXChannelRectSGIX = (PFNGLXCHANNELRECTSGIXPROC)load("glXChannelRectSGIX");
|
||||
glad_glXQueryChannelRectSGIX = (PFNGLXQUERYCHANNELRECTSGIXPROC)load("glXQueryChannelRectSGIX");
|
||||
glad_glXQueryChannelDeltasSGIX = (PFNGLXQUERYCHANNELDELTASSGIXPROC)load("glXQueryChannelDeltasSGIX");
|
||||
glad_glXChannelRectSyncSGIX = (PFNGLXCHANNELRECTSYNCSGIXPROC)load("glXChannelRectSyncSGIX");
|
||||
}
|
||||
static void load_GLX_SGIX_video_source(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGIX_video_source) return;
|
||||
#ifdef _VL_H_
|
||||
glad_glXCreateGLXVideoSourceSGIX = (PFNGLXCREATEGLXVIDEOSOURCESGIXPROC)load("glXCreateGLXVideoSourceSGIX");
|
||||
glad_glXDestroyGLXVideoSourceSGIX = (PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC)load("glXDestroyGLXVideoSourceSGIX");
|
||||
#else
|
||||
(void)load;
|
||||
#endif
|
||||
}
|
||||
static void load_GLX_SGI_cushion(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGI_cushion) return;
|
||||
glad_glXCushionSGI = (PFNGLXCUSHIONSGIPROC)load("glXCushionSGI");
|
||||
}
|
||||
static void load_GLX_SGI_make_current_read(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGI_make_current_read) return;
|
||||
glad_glXMakeCurrentReadSGI = (PFNGLXMAKECURRENTREADSGIPROC)load("glXMakeCurrentReadSGI");
|
||||
glad_glXGetCurrentReadDrawableSGI = (PFNGLXGETCURRENTREADDRAWABLESGIPROC)load("glXGetCurrentReadDrawableSGI");
|
||||
}
|
||||
static void load_GLX_SGI_swap_control(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGI_swap_control) return;
|
||||
glad_glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)load("glXSwapIntervalSGI");
|
||||
}
|
||||
static void load_GLX_SGI_video_sync(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGI_video_sync) return;
|
||||
glad_glXGetVideoSyncSGI = (PFNGLXGETVIDEOSYNCSGIPROC)load("glXGetVideoSyncSGI");
|
||||
glad_glXWaitVideoSyncSGI = (PFNGLXWAITVIDEOSYNCSGIPROC)load("glXWaitVideoSyncSGI");
|
||||
}
|
||||
static void load_GLX_SUN_get_transparent_index(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SUN_get_transparent_index) return;
|
||||
glad_glXGetTransparentIndexSUN = (PFNGLXGETTRANSPARENTINDEXSUNPROC)load("glXGetTransparentIndexSUN");
|
||||
}
|
||||
static int find_extensionsGLX(void) {
|
||||
if (!get_exts()) return 0;
|
||||
GLAD_GLX_3DFX_multisample = has_ext("GLX_3DFX_multisample");
|
||||
GLAD_GLX_AMD_gpu_association = has_ext("GLX_AMD_gpu_association");
|
||||
GLAD_GLX_ARB_context_flush_control = has_ext("GLX_ARB_context_flush_control");
|
||||
GLAD_GLX_ARB_create_context = has_ext("GLX_ARB_create_context");
|
||||
GLAD_GLX_ARB_create_context_no_error = has_ext("GLX_ARB_create_context_no_error");
|
||||
GLAD_GLX_ARB_create_context_profile = has_ext("GLX_ARB_create_context_profile");
|
||||
GLAD_GLX_ARB_create_context_robustness = has_ext("GLX_ARB_create_context_robustness");
|
||||
GLAD_GLX_ARB_fbconfig_float = has_ext("GLX_ARB_fbconfig_float");
|
||||
GLAD_GLX_ARB_framebuffer_sRGB = has_ext("GLX_ARB_framebuffer_sRGB");
|
||||
GLAD_GLX_ARB_get_proc_address = has_ext("GLX_ARB_get_proc_address");
|
||||
GLAD_GLX_ARB_multisample = has_ext("GLX_ARB_multisample");
|
||||
GLAD_GLX_ARB_robustness_application_isolation = has_ext("GLX_ARB_robustness_application_isolation");
|
||||
GLAD_GLX_ARB_robustness_share_group_isolation = has_ext("GLX_ARB_robustness_share_group_isolation");
|
||||
GLAD_GLX_ARB_vertex_buffer_object = has_ext("GLX_ARB_vertex_buffer_object");
|
||||
GLAD_GLX_EXT_buffer_age = has_ext("GLX_EXT_buffer_age");
|
||||
GLAD_GLX_EXT_context_priority = has_ext("GLX_EXT_context_priority");
|
||||
GLAD_GLX_EXT_create_context_es2_profile = has_ext("GLX_EXT_create_context_es2_profile");
|
||||
GLAD_GLX_EXT_create_context_es_profile = has_ext("GLX_EXT_create_context_es_profile");
|
||||
GLAD_GLX_EXT_fbconfig_packed_float = has_ext("GLX_EXT_fbconfig_packed_float");
|
||||
GLAD_GLX_EXT_framebuffer_sRGB = has_ext("GLX_EXT_framebuffer_sRGB");
|
||||
GLAD_GLX_EXT_get_drawable_type = has_ext("GLX_EXT_get_drawable_type");
|
||||
GLAD_GLX_EXT_import_context = has_ext("GLX_EXT_import_context");
|
||||
GLAD_GLX_EXT_libglvnd = has_ext("GLX_EXT_libglvnd");
|
||||
GLAD_GLX_EXT_no_config_context = has_ext("GLX_EXT_no_config_context");
|
||||
GLAD_GLX_EXT_stereo_tree = has_ext("GLX_EXT_stereo_tree");
|
||||
GLAD_GLX_EXT_swap_control = has_ext("GLX_EXT_swap_control");
|
||||
GLAD_GLX_EXT_swap_control_tear = has_ext("GLX_EXT_swap_control_tear");
|
||||
GLAD_GLX_EXT_texture_from_pixmap = has_ext("GLX_EXT_texture_from_pixmap");
|
||||
GLAD_GLX_EXT_visual_info = has_ext("GLX_EXT_visual_info");
|
||||
GLAD_GLX_EXT_visual_rating = has_ext("GLX_EXT_visual_rating");
|
||||
GLAD_GLX_INTEL_swap_event = has_ext("GLX_INTEL_swap_event");
|
||||
GLAD_GLX_MESA_agp_offset = has_ext("GLX_MESA_agp_offset");
|
||||
GLAD_GLX_MESA_copy_sub_buffer = has_ext("GLX_MESA_copy_sub_buffer");
|
||||
GLAD_GLX_MESA_pixmap_colormap = has_ext("GLX_MESA_pixmap_colormap");
|
||||
GLAD_GLX_MESA_query_renderer = has_ext("GLX_MESA_query_renderer");
|
||||
GLAD_GLX_MESA_release_buffers = has_ext("GLX_MESA_release_buffers");
|
||||
GLAD_GLX_MESA_set_3dfx_mode = has_ext("GLX_MESA_set_3dfx_mode");
|
||||
GLAD_GLX_MESA_swap_control = has_ext("GLX_MESA_swap_control");
|
||||
GLAD_GLX_NV_copy_buffer = has_ext("GLX_NV_copy_buffer");
|
||||
GLAD_GLX_NV_copy_image = has_ext("GLX_NV_copy_image");
|
||||
GLAD_GLX_NV_delay_before_swap = has_ext("GLX_NV_delay_before_swap");
|
||||
GLAD_GLX_NV_float_buffer = has_ext("GLX_NV_float_buffer");
|
||||
GLAD_GLX_NV_multigpu_context = has_ext("GLX_NV_multigpu_context");
|
||||
GLAD_GLX_NV_multisample_coverage = has_ext("GLX_NV_multisample_coverage");
|
||||
GLAD_GLX_NV_present_video = has_ext("GLX_NV_present_video");
|
||||
GLAD_GLX_NV_robustness_video_memory_purge = has_ext("GLX_NV_robustness_video_memory_purge");
|
||||
GLAD_GLX_NV_swap_group = has_ext("GLX_NV_swap_group");
|
||||
GLAD_GLX_NV_video_capture = has_ext("GLX_NV_video_capture");
|
||||
GLAD_GLX_NV_video_out = has_ext("GLX_NV_video_out");
|
||||
GLAD_GLX_OML_swap_method = has_ext("GLX_OML_swap_method");
|
||||
GLAD_GLX_OML_sync_control = has_ext("GLX_OML_sync_control");
|
||||
GLAD_GLX_SGIS_blended_overlay = has_ext("GLX_SGIS_blended_overlay");
|
||||
GLAD_GLX_SGIS_multisample = has_ext("GLX_SGIS_multisample");
|
||||
GLAD_GLX_SGIS_shared_multisample = has_ext("GLX_SGIS_shared_multisample");
|
||||
GLAD_GLX_SGIX_dmbuffer = has_ext("GLX_SGIX_dmbuffer");
|
||||
GLAD_GLX_SGIX_fbconfig = has_ext("GLX_SGIX_fbconfig");
|
||||
GLAD_GLX_SGIX_hyperpipe = has_ext("GLX_SGIX_hyperpipe");
|
||||
GLAD_GLX_SGIX_pbuffer = has_ext("GLX_SGIX_pbuffer");
|
||||
GLAD_GLX_SGIX_swap_barrier = has_ext("GLX_SGIX_swap_barrier");
|
||||
GLAD_GLX_SGIX_swap_group = has_ext("GLX_SGIX_swap_group");
|
||||
GLAD_GLX_SGIX_video_resize = has_ext("GLX_SGIX_video_resize");
|
||||
GLAD_GLX_SGIX_video_source = has_ext("GLX_SGIX_video_source");
|
||||
GLAD_GLX_SGIX_visual_select_group = has_ext("GLX_SGIX_visual_select_group");
|
||||
GLAD_GLX_SGI_cushion = has_ext("GLX_SGI_cushion");
|
||||
GLAD_GLX_SGI_make_current_read = has_ext("GLX_SGI_make_current_read");
|
||||
GLAD_GLX_SGI_swap_control = has_ext("GLX_SGI_swap_control");
|
||||
GLAD_GLX_SGI_video_sync = has_ext("GLX_SGI_video_sync");
|
||||
GLAD_GLX_SUN_get_transparent_index = has_ext("GLX_SUN_get_transparent_index");
|
||||
free_exts();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void find_coreGLX(Display *dpy, int screen) {
|
||||
int major = 0, minor = 0;
|
||||
if(dpy == 0 && GLADGLXDisplay == 0) {
|
||||
dpy = XOpenDisplay(0);
|
||||
screen = XScreenNumberOfScreen(XDefaultScreenOfDisplay(dpy));
|
||||
} else if(dpy == 0) {
|
||||
dpy = GLADGLXDisplay;
|
||||
screen = GLADGLXscreen;
|
||||
}
|
||||
glXQueryVersion(dpy, &major, &minor);
|
||||
GLADGLXDisplay = dpy;
|
||||
GLADGLXscreen = screen;
|
||||
GLAD_GLX_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
|
||||
GLAD_GLX_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
|
||||
GLAD_GLX_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
|
||||
GLAD_GLX_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
|
||||
GLAD_GLX_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
|
||||
}
|
||||
|
||||
int gladLoadGLXLoader(GLADloadproc load, Display *dpy, int screen) {
|
||||
glXQueryVersion = (PFNGLXQUERYVERSIONPROC)load("glXQueryVersion");
|
||||
if(glXQueryVersion == NULL) return 0;
|
||||
find_coreGLX(dpy, screen);
|
||||
load_GLX_VERSION_1_0(load);
|
||||
load_GLX_VERSION_1_1(load);
|
||||
load_GLX_VERSION_1_2(load);
|
||||
load_GLX_VERSION_1_3(load);
|
||||
load_GLX_VERSION_1_4(load);
|
||||
|
||||
if (!find_extensionsGLX()) return 0;
|
||||
load_GLX_AMD_gpu_association(load);
|
||||
load_GLX_ARB_create_context(load);
|
||||
load_GLX_ARB_get_proc_address(load);
|
||||
load_GLX_EXT_import_context(load);
|
||||
load_GLX_EXT_swap_control(load);
|
||||
load_GLX_EXT_texture_from_pixmap(load);
|
||||
load_GLX_MESA_agp_offset(load);
|
||||
load_GLX_MESA_copy_sub_buffer(load);
|
||||
load_GLX_MESA_pixmap_colormap(load);
|
||||
load_GLX_MESA_query_renderer(load);
|
||||
load_GLX_MESA_release_buffers(load);
|
||||
load_GLX_MESA_set_3dfx_mode(load);
|
||||
load_GLX_MESA_swap_control(load);
|
||||
load_GLX_NV_copy_buffer(load);
|
||||
load_GLX_NV_copy_image(load);
|
||||
load_GLX_NV_delay_before_swap(load);
|
||||
load_GLX_NV_present_video(load);
|
||||
load_GLX_NV_swap_group(load);
|
||||
load_GLX_NV_video_capture(load);
|
||||
load_GLX_NV_video_out(load);
|
||||
load_GLX_OML_sync_control(load);
|
||||
load_GLX_SGIX_dmbuffer(load);
|
||||
load_GLX_SGIX_fbconfig(load);
|
||||
load_GLX_SGIX_hyperpipe(load);
|
||||
load_GLX_SGIX_pbuffer(load);
|
||||
load_GLX_SGIX_swap_barrier(load);
|
||||
load_GLX_SGIX_swap_group(load);
|
||||
load_GLX_SGIX_video_resize(load);
|
||||
load_GLX_SGIX_video_source(load);
|
||||
load_GLX_SGI_cushion(load);
|
||||
load_GLX_SGI_make_current_read(load);
|
||||
load_GLX_SGI_swap_control(load);
|
||||
load_GLX_SGI_video_sync(load);
|
||||
load_GLX_SUN_get_transparent_index(load);
|
||||
return 1;
|
||||
}
|
||||
|
756
third_party/glad/src/glad_wgl.c
vendored
Normal file
756
third_party/glad/src/glad_wgl.c
vendored
Normal file
|
@ -0,0 +1,756 @@
|
|||
/*
|
||||
|
||||
WGL loader generated by glad 0.1.36 on Thu Sep 15 11:18:46 2022.
|
||||
|
||||
Language/Generator: C/C++
|
||||
Specification: wgl
|
||||
APIs: wgl=1.0
|
||||
Profile: -
|
||||
Extensions:
|
||||
WGL_3DFX_multisample,
|
||||
WGL_3DL_stereo_control,
|
||||
WGL_AMD_gpu_association,
|
||||
WGL_ARB_buffer_region,
|
||||
WGL_ARB_context_flush_control,
|
||||
WGL_ARB_create_context,
|
||||
WGL_ARB_create_context_no_error,
|
||||
WGL_ARB_create_context_profile,
|
||||
WGL_ARB_create_context_robustness,
|
||||
WGL_ARB_extensions_string,
|
||||
WGL_ARB_framebuffer_sRGB,
|
||||
WGL_ARB_make_current_read,
|
||||
WGL_ARB_multisample,
|
||||
WGL_ARB_pbuffer,
|
||||
WGL_ARB_pixel_format,
|
||||
WGL_ARB_pixel_format_float,
|
||||
WGL_ARB_render_texture,
|
||||
WGL_ARB_robustness_application_isolation,
|
||||
WGL_ARB_robustness_share_group_isolation,
|
||||
WGL_ATI_pixel_format_float,
|
||||
WGL_ATI_render_texture_rectangle,
|
||||
WGL_EXT_colorspace,
|
||||
WGL_EXT_create_context_es2_profile,
|
||||
WGL_EXT_create_context_es_profile,
|
||||
WGL_EXT_depth_float,
|
||||
WGL_EXT_display_color_table,
|
||||
WGL_EXT_extensions_string,
|
||||
WGL_EXT_framebuffer_sRGB,
|
||||
WGL_EXT_make_current_read,
|
||||
WGL_EXT_multisample,
|
||||
WGL_EXT_pbuffer,
|
||||
WGL_EXT_pixel_format,
|
||||
WGL_EXT_pixel_format_packed_float,
|
||||
WGL_EXT_swap_control,
|
||||
WGL_EXT_swap_control_tear,
|
||||
WGL_I3D_digital_video_control,
|
||||
WGL_I3D_gamma,
|
||||
WGL_I3D_genlock,
|
||||
WGL_I3D_image_buffer,
|
||||
WGL_I3D_swap_frame_lock,
|
||||
WGL_I3D_swap_frame_usage,
|
||||
WGL_NV_DX_interop,
|
||||
WGL_NV_DX_interop2,
|
||||
WGL_NV_copy_image,
|
||||
WGL_NV_delay_before_swap,
|
||||
WGL_NV_float_buffer,
|
||||
WGL_NV_gpu_affinity,
|
||||
WGL_NV_multigpu_context,
|
||||
WGL_NV_multisample_coverage,
|
||||
WGL_NV_present_video,
|
||||
WGL_NV_render_depth_texture,
|
||||
WGL_NV_render_texture_rectangle,
|
||||
WGL_NV_swap_group,
|
||||
WGL_NV_vertex_array_range,
|
||||
WGL_NV_video_capture,
|
||||
WGL_NV_video_output,
|
||||
WGL_OML_sync_control
|
||||
Loader: True
|
||||
Local files: True
|
||||
Omit khrplatform: False
|
||||
Reproducible: False
|
||||
|
||||
Commandline:
|
||||
--api="wgl=1.0" --generator="c" --spec="wgl" --local-files --extensions="WGL_3DFX_multisample,WGL_3DL_stereo_control,WGL_AMD_gpu_association,WGL_ARB_buffer_region,WGL_ARB_context_flush_control,WGL_ARB_create_context,WGL_ARB_create_context_no_error,WGL_ARB_create_context_profile,WGL_ARB_create_context_robustness,WGL_ARB_extensions_string,WGL_ARB_framebuffer_sRGB,WGL_ARB_make_current_read,WGL_ARB_multisample,WGL_ARB_pbuffer,WGL_ARB_pixel_format,WGL_ARB_pixel_format_float,WGL_ARB_render_texture,WGL_ARB_robustness_application_isolation,WGL_ARB_robustness_share_group_isolation,WGL_ATI_pixel_format_float,WGL_ATI_render_texture_rectangle,WGL_EXT_colorspace,WGL_EXT_create_context_es2_profile,WGL_EXT_create_context_es_profile,WGL_EXT_depth_float,WGL_EXT_display_color_table,WGL_EXT_extensions_string,WGL_EXT_framebuffer_sRGB,WGL_EXT_make_current_read,WGL_EXT_multisample,WGL_EXT_pbuffer,WGL_EXT_pixel_format,WGL_EXT_pixel_format_packed_float,WGL_EXT_swap_control,WGL_EXT_swap_control_tear,WGL_I3D_digital_video_control,WGL_I3D_gamma,WGL_I3D_genlock,WGL_I3D_image_buffer,WGL_I3D_swap_frame_lock,WGL_I3D_swap_frame_usage,WGL_NV_DX_interop,WGL_NV_DX_interop2,WGL_NV_copy_image,WGL_NV_delay_before_swap,WGL_NV_float_buffer,WGL_NV_gpu_affinity,WGL_NV_multigpu_context,WGL_NV_multisample_coverage,WGL_NV_present_video,WGL_NV_render_depth_texture,WGL_NV_render_texture_rectangle,WGL_NV_swap_group,WGL_NV_vertex_array_range,WGL_NV_video_capture,WGL_NV_video_output,WGL_OML_sync_control"
|
||||
Online:
|
||||
Too many extensions
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glad/glad_wgl.h>
|
||||
|
||||
static void* get_proc(const char *namez);
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#ifndef _WINDOWS_
|
||||
#undef APIENTRY
|
||||
#endif
|
||||
#include <windows.h>
|
||||
static HMODULE libGL;
|
||||
|
||||
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||
static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef __has_include
|
||||
#if __has_include(<winapifamily.h>)
|
||||
#define HAVE_WINAPIFAMILY 1
|
||||
#endif
|
||||
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
|
||||
#define HAVE_WINAPIFAMILY 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINAPIFAMILY
|
||||
#include <winapifamily.h>
|
||||
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#define IS_UWP 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static
|
||||
int open_wgl(void) {
|
||||
#ifndef IS_UWP
|
||||
libGL = LoadLibraryW(L"opengl32.dll");
|
||||
if(libGL != NULL) {
|
||||
void (* tmp)(void);
|
||||
tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress");
|
||||
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp;
|
||||
return gladGetProcAddressPtr != NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
void close_wgl(void) {
|
||||
if(libGL != NULL) {
|
||||
FreeLibrary((HMODULE) libGL);
|
||||
libGL = NULL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
static void* libGL;
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__HAIKU__)
|
||||
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||
static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||
#endif
|
||||
|
||||
static
|
||||
int open_wgl(void) {
|
||||
#ifdef __APPLE__
|
||||
static const char *NAMES[] = {
|
||||
"../Frameworks/OpenGL.framework/OpenGL",
|
||||
"/Library/Frameworks/OpenGL.framework/OpenGL",
|
||||
"/System/Library/Frameworks/OpenGL.framework/OpenGL",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
|
||||
};
|
||||
#else
|
||||
static const char *NAMES[] = {"libGL.so.1", "libGL.so"};
|
||||
#endif
|
||||
|
||||
unsigned int index = 0;
|
||||
for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) {
|
||||
libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
|
||||
|
||||
if(libGL != NULL) {
|
||||
#if defined(__APPLE__) || defined(__HAIKU__)
|
||||
return 1;
|
||||
#else
|
||||
gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
|
||||
"glXGetProcAddressARB");
|
||||
return gladGetProcAddressPtr != NULL;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
void close_wgl(void) {
|
||||
if(libGL != NULL) {
|
||||
dlclose(libGL);
|
||||
libGL = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static
|
||||
void* get_proc(const char *namez) {
|
||||
void* result = NULL;
|
||||
if(libGL == NULL) return NULL;
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__HAIKU__)
|
||||
if(gladGetProcAddressPtr != NULL) {
|
||||
result = gladGetProcAddressPtr(namez);
|
||||
}
|
||||
#endif
|
||||
if(result == NULL) {
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
result = (void*)GetProcAddress((HMODULE) libGL, namez);
|
||||
#else
|
||||
result = dlsym(libGL, namez);
|
||||
#endif
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int gladLoadWGL(HDC hdc) {
|
||||
int status = 0;
|
||||
|
||||
if(open_wgl()) {
|
||||
status = gladLoadWGLLoader((GLADloadproc)get_proc, hdc);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void gladUnloadGLX(void) {
|
||||
close_wgl();
|
||||
}
|
||||
|
||||
static HDC GLADWGLhdc = (HDC)INVALID_HANDLE_VALUE;
|
||||
|
||||
static int get_exts(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void free_exts(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
static int has_ext(const char *ext) {
|
||||
const char *terminator;
|
||||
const char *loc;
|
||||
const char *extensions;
|
||||
|
||||
if(wglGetExtensionsStringEXT == NULL && wglGetExtensionsStringARB == NULL)
|
||||
return 0;
|
||||
|
||||
if(wglGetExtensionsStringARB == NULL || GLADWGLhdc == INVALID_HANDLE_VALUE)
|
||||
extensions = wglGetExtensionsStringEXT();
|
||||
else
|
||||
extensions = wglGetExtensionsStringARB(GLADWGLhdc);
|
||||
|
||||
if(extensions == NULL || ext == NULL)
|
||||
return 0;
|
||||
|
||||
while(1) {
|
||||
loc = strstr(extensions, ext);
|
||||
if(loc == NULL)
|
||||
break;
|
||||
|
||||
terminator = loc + strlen(ext);
|
||||
if((loc == extensions || *(loc - 1) == ' ') &&
|
||||
(*terminator == ' ' || *terminator == '\0'))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
extensions = terminator;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
int GLAD_WGL_VERSION_1_0 = 0;
|
||||
int GLAD_WGL_3DFX_multisample = 0;
|
||||
int GLAD_WGL_3DL_stereo_control = 0;
|
||||
int GLAD_WGL_AMD_gpu_association = 0;
|
||||
int GLAD_WGL_ARB_buffer_region = 0;
|
||||
int GLAD_WGL_ARB_context_flush_control = 0;
|
||||
int GLAD_WGL_ARB_create_context = 0;
|
||||
int GLAD_WGL_ARB_create_context_no_error = 0;
|
||||
int GLAD_WGL_ARB_create_context_profile = 0;
|
||||
int GLAD_WGL_ARB_create_context_robustness = 0;
|
||||
int GLAD_WGL_ARB_extensions_string = 0;
|
||||
int GLAD_WGL_ARB_framebuffer_sRGB = 0;
|
||||
int GLAD_WGL_ARB_make_current_read = 0;
|
||||
int GLAD_WGL_ARB_multisample = 0;
|
||||
int GLAD_WGL_ARB_pbuffer = 0;
|
||||
int GLAD_WGL_ARB_pixel_format = 0;
|
||||
int GLAD_WGL_ARB_pixel_format_float = 0;
|
||||
int GLAD_WGL_ARB_render_texture = 0;
|
||||
int GLAD_WGL_ARB_robustness_application_isolation = 0;
|
||||
int GLAD_WGL_ARB_robustness_share_group_isolation = 0;
|
||||
int GLAD_WGL_ATI_pixel_format_float = 0;
|
||||
int GLAD_WGL_ATI_render_texture_rectangle = 0;
|
||||
int GLAD_WGL_EXT_colorspace = 0;
|
||||
int GLAD_WGL_EXT_create_context_es2_profile = 0;
|
||||
int GLAD_WGL_EXT_create_context_es_profile = 0;
|
||||
int GLAD_WGL_EXT_depth_float = 0;
|
||||
int GLAD_WGL_EXT_display_color_table = 0;
|
||||
int GLAD_WGL_EXT_extensions_string = 0;
|
||||
int GLAD_WGL_EXT_framebuffer_sRGB = 0;
|
||||
int GLAD_WGL_EXT_make_current_read = 0;
|
||||
int GLAD_WGL_EXT_multisample = 0;
|
||||
int GLAD_WGL_EXT_pbuffer = 0;
|
||||
int GLAD_WGL_EXT_pixel_format = 0;
|
||||
int GLAD_WGL_EXT_pixel_format_packed_float = 0;
|
||||
int GLAD_WGL_EXT_swap_control = 0;
|
||||
int GLAD_WGL_EXT_swap_control_tear = 0;
|
||||
int GLAD_WGL_I3D_digital_video_control = 0;
|
||||
int GLAD_WGL_I3D_gamma = 0;
|
||||
int GLAD_WGL_I3D_genlock = 0;
|
||||
int GLAD_WGL_I3D_image_buffer = 0;
|
||||
int GLAD_WGL_I3D_swap_frame_lock = 0;
|
||||
int GLAD_WGL_I3D_swap_frame_usage = 0;
|
||||
int GLAD_WGL_NV_DX_interop = 0;
|
||||
int GLAD_WGL_NV_DX_interop2 = 0;
|
||||
int GLAD_WGL_NV_copy_image = 0;
|
||||
int GLAD_WGL_NV_delay_before_swap = 0;
|
||||
int GLAD_WGL_NV_float_buffer = 0;
|
||||
int GLAD_WGL_NV_gpu_affinity = 0;
|
||||
int GLAD_WGL_NV_multigpu_context = 0;
|
||||
int GLAD_WGL_NV_multisample_coverage = 0;
|
||||
int GLAD_WGL_NV_present_video = 0;
|
||||
int GLAD_WGL_NV_render_depth_texture = 0;
|
||||
int GLAD_WGL_NV_render_texture_rectangle = 0;
|
||||
int GLAD_WGL_NV_swap_group = 0;
|
||||
int GLAD_WGL_NV_vertex_array_range = 0;
|
||||
int GLAD_WGL_NV_video_capture = 0;
|
||||
int GLAD_WGL_NV_video_output = 0;
|
||||
int GLAD_WGL_OML_sync_control = 0;
|
||||
PFNWGLSETSTEREOEMITTERSTATE3DLPROC glad_wglSetStereoEmitterState3DL = NULL;
|
||||
PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD = NULL;
|
||||
PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD = NULL;
|
||||
PFNWGLGETCONTEXTGPUIDAMDPROC glad_wglGetContextGPUIDAMD = NULL;
|
||||
PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC glad_wglCreateAssociatedContextAMD = NULL;
|
||||
PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_wglCreateAssociatedContextAttribsAMD = NULL;
|
||||
PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC glad_wglDeleteAssociatedContextAMD = NULL;
|
||||
PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD = NULL;
|
||||
PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD = NULL;
|
||||
PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC glad_wglBlitContextFramebufferAMD = NULL;
|
||||
PFNWGLCREATEBUFFERREGIONARBPROC glad_wglCreateBufferRegionARB = NULL;
|
||||
PFNWGLDELETEBUFFERREGIONARBPROC glad_wglDeleteBufferRegionARB = NULL;
|
||||
PFNWGLSAVEBUFFERREGIONARBPROC glad_wglSaveBufferRegionARB = NULL;
|
||||
PFNWGLRESTOREBUFFERREGIONARBPROC glad_wglRestoreBufferRegionARB = NULL;
|
||||
PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB = NULL;
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB = NULL;
|
||||
PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB = NULL;
|
||||
PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB = NULL;
|
||||
PFNWGLCREATEPBUFFERARBPROC glad_wglCreatePbufferARB = NULL;
|
||||
PFNWGLGETPBUFFERDCARBPROC glad_wglGetPbufferDCARB = NULL;
|
||||
PFNWGLRELEASEPBUFFERDCARBPROC glad_wglReleasePbufferDCARB = NULL;
|
||||
PFNWGLDESTROYPBUFFERARBPROC glad_wglDestroyPbufferARB = NULL;
|
||||
PFNWGLQUERYPBUFFERARBPROC glad_wglQueryPbufferARB = NULL;
|
||||
PFNWGLGETPIXELFORMATATTRIBIVARBPROC glad_wglGetPixelFormatAttribivARB = NULL;
|
||||
PFNWGLGETPIXELFORMATATTRIBFVARBPROC glad_wglGetPixelFormatAttribfvARB = NULL;
|
||||
PFNWGLCHOOSEPIXELFORMATARBPROC glad_wglChoosePixelFormatARB = NULL;
|
||||
PFNWGLBINDTEXIMAGEARBPROC glad_wglBindTexImageARB = NULL;
|
||||
PFNWGLRELEASETEXIMAGEARBPROC glad_wglReleaseTexImageARB = NULL;
|
||||
PFNWGLSETPBUFFERATTRIBARBPROC glad_wglSetPbufferAttribARB = NULL;
|
||||
PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC glad_wglCreateDisplayColorTableEXT = NULL;
|
||||
PFNWGLLOADDISPLAYCOLORTABLEEXTPROC glad_wglLoadDisplayColorTableEXT = NULL;
|
||||
PFNWGLBINDDISPLAYCOLORTABLEEXTPROC glad_wglBindDisplayColorTableEXT = NULL;
|
||||
PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC glad_wglDestroyDisplayColorTableEXT = NULL;
|
||||
PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT = NULL;
|
||||
PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT = NULL;
|
||||
PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT = NULL;
|
||||
PFNWGLCREATEPBUFFEREXTPROC glad_wglCreatePbufferEXT = NULL;
|
||||
PFNWGLGETPBUFFERDCEXTPROC glad_wglGetPbufferDCEXT = NULL;
|
||||
PFNWGLRELEASEPBUFFERDCEXTPROC glad_wglReleasePbufferDCEXT = NULL;
|
||||
PFNWGLDESTROYPBUFFEREXTPROC glad_wglDestroyPbufferEXT = NULL;
|
||||
PFNWGLQUERYPBUFFEREXTPROC glad_wglQueryPbufferEXT = NULL;
|
||||
PFNWGLGETPIXELFORMATATTRIBIVEXTPROC glad_wglGetPixelFormatAttribivEXT = NULL;
|
||||
PFNWGLGETPIXELFORMATATTRIBFVEXTPROC glad_wglGetPixelFormatAttribfvEXT = NULL;
|
||||
PFNWGLCHOOSEPIXELFORMATEXTPROC glad_wglChoosePixelFormatEXT = NULL;
|
||||
PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT = NULL;
|
||||
PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT = NULL;
|
||||
PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC glad_wglGetDigitalVideoParametersI3D = NULL;
|
||||
PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC glad_wglSetDigitalVideoParametersI3D = NULL;
|
||||
PFNWGLGETGAMMATABLEPARAMETERSI3DPROC glad_wglGetGammaTableParametersI3D = NULL;
|
||||
PFNWGLSETGAMMATABLEPARAMETERSI3DPROC glad_wglSetGammaTableParametersI3D = NULL;
|
||||
PFNWGLGETGAMMATABLEI3DPROC glad_wglGetGammaTableI3D = NULL;
|
||||
PFNWGLSETGAMMATABLEI3DPROC glad_wglSetGammaTableI3D = NULL;
|
||||
PFNWGLENABLEGENLOCKI3DPROC glad_wglEnableGenlockI3D = NULL;
|
||||
PFNWGLDISABLEGENLOCKI3DPROC glad_wglDisableGenlockI3D = NULL;
|
||||
PFNWGLISENABLEDGENLOCKI3DPROC glad_wglIsEnabledGenlockI3D = NULL;
|
||||
PFNWGLGENLOCKSOURCEI3DPROC glad_wglGenlockSourceI3D = NULL;
|
||||
PFNWGLGETGENLOCKSOURCEI3DPROC glad_wglGetGenlockSourceI3D = NULL;
|
||||
PFNWGLGENLOCKSOURCEEDGEI3DPROC glad_wglGenlockSourceEdgeI3D = NULL;
|
||||
PFNWGLGETGENLOCKSOURCEEDGEI3DPROC glad_wglGetGenlockSourceEdgeI3D = NULL;
|
||||
PFNWGLGENLOCKSAMPLERATEI3DPROC glad_wglGenlockSampleRateI3D = NULL;
|
||||
PFNWGLGETGENLOCKSAMPLERATEI3DPROC glad_wglGetGenlockSampleRateI3D = NULL;
|
||||
PFNWGLGENLOCKSOURCEDELAYI3DPROC glad_wglGenlockSourceDelayI3D = NULL;
|
||||
PFNWGLGETGENLOCKSOURCEDELAYI3DPROC glad_wglGetGenlockSourceDelayI3D = NULL;
|
||||
PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC glad_wglQueryGenlockMaxSourceDelayI3D = NULL;
|
||||
PFNWGLCREATEIMAGEBUFFERI3DPROC glad_wglCreateImageBufferI3D = NULL;
|
||||
PFNWGLDESTROYIMAGEBUFFERI3DPROC glad_wglDestroyImageBufferI3D = NULL;
|
||||
PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC glad_wglAssociateImageBufferEventsI3D = NULL;
|
||||
PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC glad_wglReleaseImageBufferEventsI3D = NULL;
|
||||
PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D = NULL;
|
||||
PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D = NULL;
|
||||
PFNWGLISENABLEDFRAMELOCKI3DPROC glad_wglIsEnabledFrameLockI3D = NULL;
|
||||
PFNWGLQUERYFRAMELOCKMASTERI3DPROC glad_wglQueryFrameLockMasterI3D = NULL;
|
||||
PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D = NULL;
|
||||
PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D = NULL;
|
||||
PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D = NULL;
|
||||
PFNWGLQUERYFRAMETRACKINGI3DPROC glad_wglQueryFrameTrackingI3D = NULL;
|
||||
PFNWGLDXSETRESOURCESHAREHANDLENVPROC glad_wglDXSetResourceShareHandleNV = NULL;
|
||||
PFNWGLDXOPENDEVICENVPROC glad_wglDXOpenDeviceNV = NULL;
|
||||
PFNWGLDXCLOSEDEVICENVPROC glad_wglDXCloseDeviceNV = NULL;
|
||||
PFNWGLDXREGISTEROBJECTNVPROC glad_wglDXRegisterObjectNV = NULL;
|
||||
PFNWGLDXUNREGISTEROBJECTNVPROC glad_wglDXUnregisterObjectNV = NULL;
|
||||
PFNWGLDXOBJECTACCESSNVPROC glad_wglDXObjectAccessNV = NULL;
|
||||
PFNWGLDXLOCKOBJECTSNVPROC glad_wglDXLockObjectsNV = NULL;
|
||||
PFNWGLDXUNLOCKOBJECTSNVPROC glad_wglDXUnlockObjectsNV = NULL;
|
||||
PFNWGLCOPYIMAGESUBDATANVPROC glad_wglCopyImageSubDataNV = NULL;
|
||||
PFNWGLDELAYBEFORESWAPNVPROC glad_wglDelayBeforeSwapNV = NULL;
|
||||
PFNWGLENUMGPUSNVPROC glad_wglEnumGpusNV = NULL;
|
||||
PFNWGLENUMGPUDEVICESNVPROC glad_wglEnumGpuDevicesNV = NULL;
|
||||
PFNWGLCREATEAFFINITYDCNVPROC glad_wglCreateAffinityDCNV = NULL;
|
||||
PFNWGLENUMGPUSFROMAFFINITYDCNVPROC glad_wglEnumGpusFromAffinityDCNV = NULL;
|
||||
PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV = NULL;
|
||||
PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV = NULL;
|
||||
PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV = NULL;
|
||||
PFNWGLQUERYCURRENTCONTEXTNVPROC glad_wglQueryCurrentContextNV = NULL;
|
||||
PFNWGLJOINSWAPGROUPNVPROC glad_wglJoinSwapGroupNV = NULL;
|
||||
PFNWGLBINDSWAPBARRIERNVPROC glad_wglBindSwapBarrierNV = NULL;
|
||||
PFNWGLQUERYSWAPGROUPNVPROC glad_wglQuerySwapGroupNV = NULL;
|
||||
PFNWGLQUERYMAXSWAPGROUPSNVPROC glad_wglQueryMaxSwapGroupsNV = NULL;
|
||||
PFNWGLQUERYFRAMECOUNTNVPROC glad_wglQueryFrameCountNV = NULL;
|
||||
PFNWGLRESETFRAMECOUNTNVPROC glad_wglResetFrameCountNV = NULL;
|
||||
PFNWGLALLOCATEMEMORYNVPROC glad_wglAllocateMemoryNV = NULL;
|
||||
PFNWGLFREEMEMORYNVPROC glad_wglFreeMemoryNV = NULL;
|
||||
PFNWGLBINDVIDEOCAPTUREDEVICENVPROC glad_wglBindVideoCaptureDeviceNV = NULL;
|
||||
PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_wglEnumerateVideoCaptureDevicesNV = NULL;
|
||||
PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC glad_wglLockVideoCaptureDeviceNV = NULL;
|
||||
PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC glad_wglQueryVideoCaptureDeviceNV = NULL;
|
||||
PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC glad_wglReleaseVideoCaptureDeviceNV = NULL;
|
||||
PFNWGLGETVIDEODEVICENVPROC glad_wglGetVideoDeviceNV = NULL;
|
||||
PFNWGLRELEASEVIDEODEVICENVPROC glad_wglReleaseVideoDeviceNV = NULL;
|
||||
PFNWGLBINDVIDEOIMAGENVPROC glad_wglBindVideoImageNV = NULL;
|
||||
PFNWGLRELEASEVIDEOIMAGENVPROC glad_wglReleaseVideoImageNV = NULL;
|
||||
PFNWGLSENDPBUFFERTOVIDEONVPROC glad_wglSendPbufferToVideoNV = NULL;
|
||||
PFNWGLGETVIDEOINFONVPROC glad_wglGetVideoInfoNV = NULL;
|
||||
PFNWGLGETSYNCVALUESOMLPROC glad_wglGetSyncValuesOML = NULL;
|
||||
PFNWGLGETMSCRATEOMLPROC glad_wglGetMscRateOML = NULL;
|
||||
PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML = NULL;
|
||||
PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML = NULL;
|
||||
PFNWGLWAITFORMSCOMLPROC glad_wglWaitForMscOML = NULL;
|
||||
PFNWGLWAITFORSBCOMLPROC glad_wglWaitForSbcOML = NULL;
|
||||
static void load_WGL_3DL_stereo_control(GLADloadproc load) {
|
||||
if(!GLAD_WGL_3DL_stereo_control) return;
|
||||
glad_wglSetStereoEmitterState3DL = (PFNWGLSETSTEREOEMITTERSTATE3DLPROC)load("wglSetStereoEmitterState3DL");
|
||||
}
|
||||
static void load_WGL_AMD_gpu_association(GLADloadproc load) {
|
||||
if(!GLAD_WGL_AMD_gpu_association) return;
|
||||
glad_wglGetGPUIDsAMD = (PFNWGLGETGPUIDSAMDPROC)load("wglGetGPUIDsAMD");
|
||||
glad_wglGetGPUInfoAMD = (PFNWGLGETGPUINFOAMDPROC)load("wglGetGPUInfoAMD");
|
||||
glad_wglGetContextGPUIDAMD = (PFNWGLGETCONTEXTGPUIDAMDPROC)load("wglGetContextGPUIDAMD");
|
||||
glad_wglCreateAssociatedContextAMD = (PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC)load("wglCreateAssociatedContextAMD");
|
||||
glad_wglCreateAssociatedContextAttribsAMD = (PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC)load("wglCreateAssociatedContextAttribsAMD");
|
||||
glad_wglDeleteAssociatedContextAMD = (PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC)load("wglDeleteAssociatedContextAMD");
|
||||
glad_wglMakeAssociatedContextCurrentAMD = (PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)load("wglMakeAssociatedContextCurrentAMD");
|
||||
glad_wglGetCurrentAssociatedContextAMD = (PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC)load("wglGetCurrentAssociatedContextAMD");
|
||||
glad_wglBlitContextFramebufferAMD = (PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC)load("wglBlitContextFramebufferAMD");
|
||||
}
|
||||
static void load_WGL_ARB_buffer_region(GLADloadproc load) {
|
||||
if(!GLAD_WGL_ARB_buffer_region) return;
|
||||
glad_wglCreateBufferRegionARB = (PFNWGLCREATEBUFFERREGIONARBPROC)load("wglCreateBufferRegionARB");
|
||||
glad_wglDeleteBufferRegionARB = (PFNWGLDELETEBUFFERREGIONARBPROC)load("wglDeleteBufferRegionARB");
|
||||
glad_wglSaveBufferRegionARB = (PFNWGLSAVEBUFFERREGIONARBPROC)load("wglSaveBufferRegionARB");
|
||||
glad_wglRestoreBufferRegionARB = (PFNWGLRESTOREBUFFERREGIONARBPROC)load("wglRestoreBufferRegionARB");
|
||||
}
|
||||
static void load_WGL_ARB_create_context(GLADloadproc load) {
|
||||
if(!GLAD_WGL_ARB_create_context) return;
|
||||
glad_wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)load("wglCreateContextAttribsARB");
|
||||
}
|
||||
static void load_WGL_ARB_extensions_string(GLADloadproc load) {
|
||||
if(!GLAD_WGL_ARB_extensions_string) return;
|
||||
glad_wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)load("wglGetExtensionsStringARB");
|
||||
}
|
||||
static void load_WGL_ARB_make_current_read(GLADloadproc load) {
|
||||
if(!GLAD_WGL_ARB_make_current_read) return;
|
||||
glad_wglMakeContextCurrentARB = (PFNWGLMAKECONTEXTCURRENTARBPROC)load("wglMakeContextCurrentARB");
|
||||
glad_wglGetCurrentReadDCARB = (PFNWGLGETCURRENTREADDCARBPROC)load("wglGetCurrentReadDCARB");
|
||||
}
|
||||
static void load_WGL_ARB_pbuffer(GLADloadproc load) {
|
||||
if(!GLAD_WGL_ARB_pbuffer) return;
|
||||
glad_wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)load("wglCreatePbufferARB");
|
||||
glad_wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)load("wglGetPbufferDCARB");
|
||||
glad_wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)load("wglReleasePbufferDCARB");
|
||||
glad_wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)load("wglDestroyPbufferARB");
|
||||
glad_wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)load("wglQueryPbufferARB");
|
||||
}
|
||||
static void load_WGL_ARB_pixel_format(GLADloadproc load) {
|
||||
if(!GLAD_WGL_ARB_pixel_format) return;
|
||||
glad_wglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)load("wglGetPixelFormatAttribivARB");
|
||||
glad_wglGetPixelFormatAttribfvARB = (PFNWGLGETPIXELFORMATATTRIBFVARBPROC)load("wglGetPixelFormatAttribfvARB");
|
||||
glad_wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)load("wglChoosePixelFormatARB");
|
||||
}
|
||||
static void load_WGL_ARB_render_texture(GLADloadproc load) {
|
||||
if(!GLAD_WGL_ARB_render_texture) return;
|
||||
glad_wglBindTexImageARB = (PFNWGLBINDTEXIMAGEARBPROC)load("wglBindTexImageARB");
|
||||
glad_wglReleaseTexImageARB = (PFNWGLRELEASETEXIMAGEARBPROC)load("wglReleaseTexImageARB");
|
||||
glad_wglSetPbufferAttribARB = (PFNWGLSETPBUFFERATTRIBARBPROC)load("wglSetPbufferAttribARB");
|
||||
}
|
||||
static void load_WGL_EXT_display_color_table(GLADloadproc load) {
|
||||
if(!GLAD_WGL_EXT_display_color_table) return;
|
||||
glad_wglCreateDisplayColorTableEXT = (PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC)load("wglCreateDisplayColorTableEXT");
|
||||
glad_wglLoadDisplayColorTableEXT = (PFNWGLLOADDISPLAYCOLORTABLEEXTPROC)load("wglLoadDisplayColorTableEXT");
|
||||
glad_wglBindDisplayColorTableEXT = (PFNWGLBINDDISPLAYCOLORTABLEEXTPROC)load("wglBindDisplayColorTableEXT");
|
||||
glad_wglDestroyDisplayColorTableEXT = (PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC)load("wglDestroyDisplayColorTableEXT");
|
||||
}
|
||||
static void load_WGL_EXT_extensions_string(GLADloadproc load) {
|
||||
if(!GLAD_WGL_EXT_extensions_string) return;
|
||||
glad_wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)load("wglGetExtensionsStringEXT");
|
||||
}
|
||||
static void load_WGL_EXT_make_current_read(GLADloadproc load) {
|
||||
if(!GLAD_WGL_EXT_make_current_read) return;
|
||||
glad_wglMakeContextCurrentEXT = (PFNWGLMAKECONTEXTCURRENTEXTPROC)load("wglMakeContextCurrentEXT");
|
||||
glad_wglGetCurrentReadDCEXT = (PFNWGLGETCURRENTREADDCEXTPROC)load("wglGetCurrentReadDCEXT");
|
||||
}
|
||||
static void load_WGL_EXT_pbuffer(GLADloadproc load) {
|
||||
if(!GLAD_WGL_EXT_pbuffer) return;
|
||||
glad_wglCreatePbufferEXT = (PFNWGLCREATEPBUFFEREXTPROC)load("wglCreatePbufferEXT");
|
||||
glad_wglGetPbufferDCEXT = (PFNWGLGETPBUFFERDCEXTPROC)load("wglGetPbufferDCEXT");
|
||||
glad_wglReleasePbufferDCEXT = (PFNWGLRELEASEPBUFFERDCEXTPROC)load("wglReleasePbufferDCEXT");
|
||||
glad_wglDestroyPbufferEXT = (PFNWGLDESTROYPBUFFEREXTPROC)load("wglDestroyPbufferEXT");
|
||||
glad_wglQueryPbufferEXT = (PFNWGLQUERYPBUFFEREXTPROC)load("wglQueryPbufferEXT");
|
||||
}
|
||||
static void load_WGL_EXT_pixel_format(GLADloadproc load) {
|
||||
if(!GLAD_WGL_EXT_pixel_format) return;
|
||||
glad_wglGetPixelFormatAttribivEXT = (PFNWGLGETPIXELFORMATATTRIBIVEXTPROC)load("wglGetPixelFormatAttribivEXT");
|
||||
glad_wglGetPixelFormatAttribfvEXT = (PFNWGLGETPIXELFORMATATTRIBFVEXTPROC)load("wglGetPixelFormatAttribfvEXT");
|
||||
glad_wglChoosePixelFormatEXT = (PFNWGLCHOOSEPIXELFORMATEXTPROC)load("wglChoosePixelFormatEXT");
|
||||
}
|
||||
static void load_WGL_EXT_swap_control(GLADloadproc load) {
|
||||
if(!GLAD_WGL_EXT_swap_control) return;
|
||||
glad_wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)load("wglSwapIntervalEXT");
|
||||
glad_wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)load("wglGetSwapIntervalEXT");
|
||||
}
|
||||
static void load_WGL_I3D_digital_video_control(GLADloadproc load) {
|
||||
if(!GLAD_WGL_I3D_digital_video_control) return;
|
||||
glad_wglGetDigitalVideoParametersI3D = (PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC)load("wglGetDigitalVideoParametersI3D");
|
||||
glad_wglSetDigitalVideoParametersI3D = (PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC)load("wglSetDigitalVideoParametersI3D");
|
||||
}
|
||||
static void load_WGL_I3D_gamma(GLADloadproc load) {
|
||||
if(!GLAD_WGL_I3D_gamma) return;
|
||||
glad_wglGetGammaTableParametersI3D = (PFNWGLGETGAMMATABLEPARAMETERSI3DPROC)load("wglGetGammaTableParametersI3D");
|
||||
glad_wglSetGammaTableParametersI3D = (PFNWGLSETGAMMATABLEPARAMETERSI3DPROC)load("wglSetGammaTableParametersI3D");
|
||||
glad_wglGetGammaTableI3D = (PFNWGLGETGAMMATABLEI3DPROC)load("wglGetGammaTableI3D");
|
||||
glad_wglSetGammaTableI3D = (PFNWGLSETGAMMATABLEI3DPROC)load("wglSetGammaTableI3D");
|
||||
}
|
||||
static void load_WGL_I3D_genlock(GLADloadproc load) {
|
||||
if(!GLAD_WGL_I3D_genlock) return;
|
||||
glad_wglEnableGenlockI3D = (PFNWGLENABLEGENLOCKI3DPROC)load("wglEnableGenlockI3D");
|
||||
glad_wglDisableGenlockI3D = (PFNWGLDISABLEGENLOCKI3DPROC)load("wglDisableGenlockI3D");
|
||||
glad_wglIsEnabledGenlockI3D = (PFNWGLISENABLEDGENLOCKI3DPROC)load("wglIsEnabledGenlockI3D");
|
||||
glad_wglGenlockSourceI3D = (PFNWGLGENLOCKSOURCEI3DPROC)load("wglGenlockSourceI3D");
|
||||
glad_wglGetGenlockSourceI3D = (PFNWGLGETGENLOCKSOURCEI3DPROC)load("wglGetGenlockSourceI3D");
|
||||
glad_wglGenlockSourceEdgeI3D = (PFNWGLGENLOCKSOURCEEDGEI3DPROC)load("wglGenlockSourceEdgeI3D");
|
||||
glad_wglGetGenlockSourceEdgeI3D = (PFNWGLGETGENLOCKSOURCEEDGEI3DPROC)load("wglGetGenlockSourceEdgeI3D");
|
||||
glad_wglGenlockSampleRateI3D = (PFNWGLGENLOCKSAMPLERATEI3DPROC)load("wglGenlockSampleRateI3D");
|
||||
glad_wglGetGenlockSampleRateI3D = (PFNWGLGETGENLOCKSAMPLERATEI3DPROC)load("wglGetGenlockSampleRateI3D");
|
||||
glad_wglGenlockSourceDelayI3D = (PFNWGLGENLOCKSOURCEDELAYI3DPROC)load("wglGenlockSourceDelayI3D");
|
||||
glad_wglGetGenlockSourceDelayI3D = (PFNWGLGETGENLOCKSOURCEDELAYI3DPROC)load("wglGetGenlockSourceDelayI3D");
|
||||
glad_wglQueryGenlockMaxSourceDelayI3D = (PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC)load("wglQueryGenlockMaxSourceDelayI3D");
|
||||
}
|
||||
static void load_WGL_I3D_image_buffer(GLADloadproc load) {
|
||||
if(!GLAD_WGL_I3D_image_buffer) return;
|
||||
glad_wglCreateImageBufferI3D = (PFNWGLCREATEIMAGEBUFFERI3DPROC)load("wglCreateImageBufferI3D");
|
||||
glad_wglDestroyImageBufferI3D = (PFNWGLDESTROYIMAGEBUFFERI3DPROC)load("wglDestroyImageBufferI3D");
|
||||
glad_wglAssociateImageBufferEventsI3D = (PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC)load("wglAssociateImageBufferEventsI3D");
|
||||
glad_wglReleaseImageBufferEventsI3D = (PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC)load("wglReleaseImageBufferEventsI3D");
|
||||
}
|
||||
static void load_WGL_I3D_swap_frame_lock(GLADloadproc load) {
|
||||
if(!GLAD_WGL_I3D_swap_frame_lock) return;
|
||||
glad_wglEnableFrameLockI3D = (PFNWGLENABLEFRAMELOCKI3DPROC)load("wglEnableFrameLockI3D");
|
||||
glad_wglDisableFrameLockI3D = (PFNWGLDISABLEFRAMELOCKI3DPROC)load("wglDisableFrameLockI3D");
|
||||
glad_wglIsEnabledFrameLockI3D = (PFNWGLISENABLEDFRAMELOCKI3DPROC)load("wglIsEnabledFrameLockI3D");
|
||||
glad_wglQueryFrameLockMasterI3D = (PFNWGLQUERYFRAMELOCKMASTERI3DPROC)load("wglQueryFrameLockMasterI3D");
|
||||
}
|
||||
static void load_WGL_I3D_swap_frame_usage(GLADloadproc load) {
|
||||
if(!GLAD_WGL_I3D_swap_frame_usage) return;
|
||||
glad_wglGetFrameUsageI3D = (PFNWGLGETFRAMEUSAGEI3DPROC)load("wglGetFrameUsageI3D");
|
||||
glad_wglBeginFrameTrackingI3D = (PFNWGLBEGINFRAMETRACKINGI3DPROC)load("wglBeginFrameTrackingI3D");
|
||||
glad_wglEndFrameTrackingI3D = (PFNWGLENDFRAMETRACKINGI3DPROC)load("wglEndFrameTrackingI3D");
|
||||
glad_wglQueryFrameTrackingI3D = (PFNWGLQUERYFRAMETRACKINGI3DPROC)load("wglQueryFrameTrackingI3D");
|
||||
}
|
||||
static void load_WGL_NV_DX_interop(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_DX_interop) return;
|
||||
glad_wglDXSetResourceShareHandleNV = (PFNWGLDXSETRESOURCESHAREHANDLENVPROC)load("wglDXSetResourceShareHandleNV");
|
||||
glad_wglDXOpenDeviceNV = (PFNWGLDXOPENDEVICENVPROC)load("wglDXOpenDeviceNV");
|
||||
glad_wglDXCloseDeviceNV = (PFNWGLDXCLOSEDEVICENVPROC)load("wglDXCloseDeviceNV");
|
||||
glad_wglDXRegisterObjectNV = (PFNWGLDXREGISTEROBJECTNVPROC)load("wglDXRegisterObjectNV");
|
||||
glad_wglDXUnregisterObjectNV = (PFNWGLDXUNREGISTEROBJECTNVPROC)load("wglDXUnregisterObjectNV");
|
||||
glad_wglDXObjectAccessNV = (PFNWGLDXOBJECTACCESSNVPROC)load("wglDXObjectAccessNV");
|
||||
glad_wglDXLockObjectsNV = (PFNWGLDXLOCKOBJECTSNVPROC)load("wglDXLockObjectsNV");
|
||||
glad_wglDXUnlockObjectsNV = (PFNWGLDXUNLOCKOBJECTSNVPROC)load("wglDXUnlockObjectsNV");
|
||||
}
|
||||
static void load_WGL_NV_copy_image(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_copy_image) return;
|
||||
glad_wglCopyImageSubDataNV = (PFNWGLCOPYIMAGESUBDATANVPROC)load("wglCopyImageSubDataNV");
|
||||
}
|
||||
static void load_WGL_NV_delay_before_swap(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_delay_before_swap) return;
|
||||
glad_wglDelayBeforeSwapNV = (PFNWGLDELAYBEFORESWAPNVPROC)load("wglDelayBeforeSwapNV");
|
||||
}
|
||||
static void load_WGL_NV_gpu_affinity(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_gpu_affinity) return;
|
||||
glad_wglEnumGpusNV = (PFNWGLENUMGPUSNVPROC)load("wglEnumGpusNV");
|
||||
glad_wglEnumGpuDevicesNV = (PFNWGLENUMGPUDEVICESNVPROC)load("wglEnumGpuDevicesNV");
|
||||
glad_wglCreateAffinityDCNV = (PFNWGLCREATEAFFINITYDCNVPROC)load("wglCreateAffinityDCNV");
|
||||
glad_wglEnumGpusFromAffinityDCNV = (PFNWGLENUMGPUSFROMAFFINITYDCNVPROC)load("wglEnumGpusFromAffinityDCNV");
|
||||
glad_wglDeleteDCNV = (PFNWGLDELETEDCNVPROC)load("wglDeleteDCNV");
|
||||
}
|
||||
static void load_WGL_NV_present_video(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_present_video) return;
|
||||
glad_wglEnumerateVideoDevicesNV = (PFNWGLENUMERATEVIDEODEVICESNVPROC)load("wglEnumerateVideoDevicesNV");
|
||||
glad_wglBindVideoDeviceNV = (PFNWGLBINDVIDEODEVICENVPROC)load("wglBindVideoDeviceNV");
|
||||
glad_wglQueryCurrentContextNV = (PFNWGLQUERYCURRENTCONTEXTNVPROC)load("wglQueryCurrentContextNV");
|
||||
}
|
||||
static void load_WGL_NV_swap_group(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_swap_group) return;
|
||||
glad_wglJoinSwapGroupNV = (PFNWGLJOINSWAPGROUPNVPROC)load("wglJoinSwapGroupNV");
|
||||
glad_wglBindSwapBarrierNV = (PFNWGLBINDSWAPBARRIERNVPROC)load("wglBindSwapBarrierNV");
|
||||
glad_wglQuerySwapGroupNV = (PFNWGLQUERYSWAPGROUPNVPROC)load("wglQuerySwapGroupNV");
|
||||
glad_wglQueryMaxSwapGroupsNV = (PFNWGLQUERYMAXSWAPGROUPSNVPROC)load("wglQueryMaxSwapGroupsNV");
|
||||
glad_wglQueryFrameCountNV = (PFNWGLQUERYFRAMECOUNTNVPROC)load("wglQueryFrameCountNV");
|
||||
glad_wglResetFrameCountNV = (PFNWGLRESETFRAMECOUNTNVPROC)load("wglResetFrameCountNV");
|
||||
}
|
||||
static void load_WGL_NV_vertex_array_range(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_vertex_array_range) return;
|
||||
glad_wglAllocateMemoryNV = (PFNWGLALLOCATEMEMORYNVPROC)load("wglAllocateMemoryNV");
|
||||
glad_wglFreeMemoryNV = (PFNWGLFREEMEMORYNVPROC)load("wglFreeMemoryNV");
|
||||
}
|
||||
static void load_WGL_NV_video_capture(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_video_capture) return;
|
||||
glad_wglBindVideoCaptureDeviceNV = (PFNWGLBINDVIDEOCAPTUREDEVICENVPROC)load("wglBindVideoCaptureDeviceNV");
|
||||
glad_wglEnumerateVideoCaptureDevicesNV = (PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC)load("wglEnumerateVideoCaptureDevicesNV");
|
||||
glad_wglLockVideoCaptureDeviceNV = (PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC)load("wglLockVideoCaptureDeviceNV");
|
||||
glad_wglQueryVideoCaptureDeviceNV = (PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC)load("wglQueryVideoCaptureDeviceNV");
|
||||
glad_wglReleaseVideoCaptureDeviceNV = (PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC)load("wglReleaseVideoCaptureDeviceNV");
|
||||
}
|
||||
static void load_WGL_NV_video_output(GLADloadproc load) {
|
||||
if(!GLAD_WGL_NV_video_output) return;
|
||||
glad_wglGetVideoDeviceNV = (PFNWGLGETVIDEODEVICENVPROC)load("wglGetVideoDeviceNV");
|
||||
glad_wglReleaseVideoDeviceNV = (PFNWGLRELEASEVIDEODEVICENVPROC)load("wglReleaseVideoDeviceNV");
|
||||
glad_wglBindVideoImageNV = (PFNWGLBINDVIDEOIMAGENVPROC)load("wglBindVideoImageNV");
|
||||
glad_wglReleaseVideoImageNV = (PFNWGLRELEASEVIDEOIMAGENVPROC)load("wglReleaseVideoImageNV");
|
||||
glad_wglSendPbufferToVideoNV = (PFNWGLSENDPBUFFERTOVIDEONVPROC)load("wglSendPbufferToVideoNV");
|
||||
glad_wglGetVideoInfoNV = (PFNWGLGETVIDEOINFONVPROC)load("wglGetVideoInfoNV");
|
||||
}
|
||||
static void load_WGL_OML_sync_control(GLADloadproc load) {
|
||||
if(!GLAD_WGL_OML_sync_control) return;
|
||||
glad_wglGetSyncValuesOML = (PFNWGLGETSYNCVALUESOMLPROC)load("wglGetSyncValuesOML");
|
||||
glad_wglGetMscRateOML = (PFNWGLGETMSCRATEOMLPROC)load("wglGetMscRateOML");
|
||||
glad_wglSwapBuffersMscOML = (PFNWGLSWAPBUFFERSMSCOMLPROC)load("wglSwapBuffersMscOML");
|
||||
glad_wglSwapLayerBuffersMscOML = (PFNWGLSWAPLAYERBUFFERSMSCOMLPROC)load("wglSwapLayerBuffersMscOML");
|
||||
glad_wglWaitForMscOML = (PFNWGLWAITFORMSCOMLPROC)load("wglWaitForMscOML");
|
||||
glad_wglWaitForSbcOML = (PFNWGLWAITFORSBCOMLPROC)load("wglWaitForSbcOML");
|
||||
}
|
||||
static int find_extensionsWGL(void) {
|
||||
if (!get_exts()) return 0;
|
||||
GLAD_WGL_3DFX_multisample = has_ext("WGL_3DFX_multisample");
|
||||
GLAD_WGL_3DL_stereo_control = has_ext("WGL_3DL_stereo_control");
|
||||
GLAD_WGL_AMD_gpu_association = has_ext("WGL_AMD_gpu_association");
|
||||
GLAD_WGL_ARB_buffer_region = has_ext("WGL_ARB_buffer_region");
|
||||
GLAD_WGL_ARB_context_flush_control = has_ext("WGL_ARB_context_flush_control");
|
||||
GLAD_WGL_ARB_create_context = has_ext("WGL_ARB_create_context");
|
||||
GLAD_WGL_ARB_create_context_no_error = has_ext("WGL_ARB_create_context_no_error");
|
||||
GLAD_WGL_ARB_create_context_profile = has_ext("WGL_ARB_create_context_profile");
|
||||
GLAD_WGL_ARB_create_context_robustness = has_ext("WGL_ARB_create_context_robustness");
|
||||
GLAD_WGL_ARB_extensions_string = has_ext("WGL_ARB_extensions_string");
|
||||
GLAD_WGL_ARB_framebuffer_sRGB = has_ext("WGL_ARB_framebuffer_sRGB");
|
||||
GLAD_WGL_ARB_make_current_read = has_ext("WGL_ARB_make_current_read");
|
||||
GLAD_WGL_ARB_multisample = has_ext("WGL_ARB_multisample");
|
||||
GLAD_WGL_ARB_pbuffer = has_ext("WGL_ARB_pbuffer");
|
||||
GLAD_WGL_ARB_pixel_format = has_ext("WGL_ARB_pixel_format");
|
||||
GLAD_WGL_ARB_pixel_format_float = has_ext("WGL_ARB_pixel_format_float");
|
||||
GLAD_WGL_ARB_render_texture = has_ext("WGL_ARB_render_texture");
|
||||
GLAD_WGL_ARB_robustness_application_isolation = has_ext("WGL_ARB_robustness_application_isolation");
|
||||
GLAD_WGL_ARB_robustness_share_group_isolation = has_ext("WGL_ARB_robustness_share_group_isolation");
|
||||
GLAD_WGL_ATI_pixel_format_float = has_ext("WGL_ATI_pixel_format_float");
|
||||
GLAD_WGL_ATI_render_texture_rectangle = has_ext("WGL_ATI_render_texture_rectangle");
|
||||
GLAD_WGL_EXT_colorspace = has_ext("WGL_EXT_colorspace");
|
||||
GLAD_WGL_EXT_create_context_es2_profile = has_ext("WGL_EXT_create_context_es2_profile");
|
||||
GLAD_WGL_EXT_create_context_es_profile = has_ext("WGL_EXT_create_context_es_profile");
|
||||
GLAD_WGL_EXT_depth_float = has_ext("WGL_EXT_depth_float");
|
||||
GLAD_WGL_EXT_display_color_table = has_ext("WGL_EXT_display_color_table");
|
||||
GLAD_WGL_EXT_extensions_string = has_ext("WGL_EXT_extensions_string");
|
||||
GLAD_WGL_EXT_framebuffer_sRGB = has_ext("WGL_EXT_framebuffer_sRGB");
|
||||
GLAD_WGL_EXT_make_current_read = has_ext("WGL_EXT_make_current_read");
|
||||
GLAD_WGL_EXT_multisample = has_ext("WGL_EXT_multisample");
|
||||
GLAD_WGL_EXT_pbuffer = has_ext("WGL_EXT_pbuffer");
|
||||
GLAD_WGL_EXT_pixel_format = has_ext("WGL_EXT_pixel_format");
|
||||
GLAD_WGL_EXT_pixel_format_packed_float = has_ext("WGL_EXT_pixel_format_packed_float");
|
||||
GLAD_WGL_EXT_swap_control = has_ext("WGL_EXT_swap_control");
|
||||
GLAD_WGL_EXT_swap_control_tear = has_ext("WGL_EXT_swap_control_tear");
|
||||
GLAD_WGL_I3D_digital_video_control = has_ext("WGL_I3D_digital_video_control");
|
||||
GLAD_WGL_I3D_gamma = has_ext("WGL_I3D_gamma");
|
||||
GLAD_WGL_I3D_genlock = has_ext("WGL_I3D_genlock");
|
||||
GLAD_WGL_I3D_image_buffer = has_ext("WGL_I3D_image_buffer");
|
||||
GLAD_WGL_I3D_swap_frame_lock = has_ext("WGL_I3D_swap_frame_lock");
|
||||
GLAD_WGL_I3D_swap_frame_usage = has_ext("WGL_I3D_swap_frame_usage");
|
||||
GLAD_WGL_NV_DX_interop = has_ext("WGL_NV_DX_interop");
|
||||
GLAD_WGL_NV_DX_interop2 = has_ext("WGL_NV_DX_interop2");
|
||||
GLAD_WGL_NV_copy_image = has_ext("WGL_NV_copy_image");
|
||||
GLAD_WGL_NV_delay_before_swap = has_ext("WGL_NV_delay_before_swap");
|
||||
GLAD_WGL_NV_float_buffer = has_ext("WGL_NV_float_buffer");
|
||||
GLAD_WGL_NV_gpu_affinity = has_ext("WGL_NV_gpu_affinity");
|
||||
GLAD_WGL_NV_multigpu_context = has_ext("WGL_NV_multigpu_context");
|
||||
GLAD_WGL_NV_multisample_coverage = has_ext("WGL_NV_multisample_coverage");
|
||||
GLAD_WGL_NV_present_video = has_ext("WGL_NV_present_video");
|
||||
GLAD_WGL_NV_render_depth_texture = has_ext("WGL_NV_render_depth_texture");
|
||||
GLAD_WGL_NV_render_texture_rectangle = has_ext("WGL_NV_render_texture_rectangle");
|
||||
GLAD_WGL_NV_swap_group = has_ext("WGL_NV_swap_group");
|
||||
GLAD_WGL_NV_vertex_array_range = has_ext("WGL_NV_vertex_array_range");
|
||||
GLAD_WGL_NV_video_capture = has_ext("WGL_NV_video_capture");
|
||||
GLAD_WGL_NV_video_output = has_ext("WGL_NV_video_output");
|
||||
GLAD_WGL_OML_sync_control = has_ext("WGL_OML_sync_control");
|
||||
free_exts();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void find_coreWGL(HDC hdc) {
|
||||
GLADWGLhdc = hdc;
|
||||
}
|
||||
|
||||
int gladLoadWGLLoader(GLADloadproc load, HDC hdc) {
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)load("wglGetExtensionsStringARB");
|
||||
wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)load("wglGetExtensionsStringEXT");
|
||||
if(wglGetExtensionsStringARB == NULL && wglGetExtensionsStringEXT == NULL) return 0;
|
||||
find_coreWGL(hdc);
|
||||
|
||||
if (!find_extensionsWGL()) return 0;
|
||||
load_WGL_3DL_stereo_control(load);
|
||||
load_WGL_AMD_gpu_association(load);
|
||||
load_WGL_ARB_buffer_region(load);
|
||||
load_WGL_ARB_create_context(load);
|
||||
load_WGL_ARB_extensions_string(load);
|
||||
load_WGL_ARB_make_current_read(load);
|
||||
load_WGL_ARB_pbuffer(load);
|
||||
load_WGL_ARB_pixel_format(load);
|
||||
load_WGL_ARB_render_texture(load);
|
||||
load_WGL_EXT_display_color_table(load);
|
||||
load_WGL_EXT_extensions_string(load);
|
||||
load_WGL_EXT_make_current_read(load);
|
||||
load_WGL_EXT_pbuffer(load);
|
||||
load_WGL_EXT_pixel_format(load);
|
||||
load_WGL_EXT_swap_control(load);
|
||||
load_WGL_I3D_digital_video_control(load);
|
||||
load_WGL_I3D_gamma(load);
|
||||
load_WGL_I3D_genlock(load);
|
||||
load_WGL_I3D_image_buffer(load);
|
||||
load_WGL_I3D_swap_frame_lock(load);
|
||||
load_WGL_I3D_swap_frame_usage(load);
|
||||
load_WGL_NV_DX_interop(load);
|
||||
load_WGL_NV_copy_image(load);
|
||||
load_WGL_NV_delay_before_swap(load);
|
||||
load_WGL_NV_gpu_affinity(load);
|
||||
load_WGL_NV_present_video(load);
|
||||
load_WGL_NV_swap_group(load);
|
||||
load_WGL_NV_vertex_array_range(load);
|
||||
load_WGL_NV_video_capture(load);
|
||||
load_WGL_NV_video_output(load);
|
||||
load_WGL_OML_sync_control(load);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue