Changeset View
Changeset View
Standalone View
Standalone View
libraries/source/glad/src/wgl.cpp
/** | |||||
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 | |||||
*/ | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <glad/wgl.h> | #include <glad/wgl.h> | ||||
#ifndef GLAD_IMPL_UTIL_C_ | #ifndef GLAD_IMPL_UTIL_C_ | ||||
#define GLAD_IMPL_UTIL_C_ | #define GLAD_IMPL_UTIL_C_ | ||||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | int gladLoadWGLUserPtr(HDC hdc, GLADuserptrloadfunc load, void *userptr) { | ||||
version = glad_wgl_find_core_wgl(); | version = glad_wgl_find_core_wgl(); | ||||
if (!glad_wgl_find_extensions_wgl(hdc)) return 0; | if (!glad_wgl_find_extensions_wgl(hdc)) return 0; | ||||
glad_wgl_load_WGL_ARB_extensions_string(load, userptr); | glad_wgl_load_WGL_ARB_extensions_string(load, userptr); | ||||
glad_wgl_load_WGL_EXT_extensions_string(load, userptr); | glad_wgl_load_WGL_EXT_extensions_string(load, userptr); | ||||
glad_wgl_load_WGL_EXT_swap_control(load, userptr); | glad_wgl_load_WGL_EXT_swap_control(load, userptr); | ||||
return version; | return version; | ||||
} | } | ||||
int gladLoadWGL(HDC hdc, GLADloadfunc load) { | int gladLoadWGL(HDC hdc, GLADloadfunc load) { | ||||
return gladLoadWGLUserPtr(hdc, glad_wgl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); | return gladLoadWGLUserPtr(hdc, glad_wgl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); | ||||
} | } | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif |
Wildfire Games · Phabricator