2022-05-29 22:44:27 +00:00
|
|
|
#define GLFW_INCLUDE_NONE
|
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
|
|
|
|
#include <libreborn/libreborn.h>
|
|
|
|
|
|
|
|
// Load GL Function
|
|
|
|
#define GL_FUNC(name, return_type, args) \
|
|
|
|
typedef return_type (*real_##name##_t)args; \
|
|
|
|
\
|
2022-06-30 23:53:32 +00:00
|
|
|
static real_##name##_t real_##name() { \
|
2022-05-29 22:44:27 +00:00
|
|
|
static real_##name##_t func = NULL; \
|
|
|
|
if (!func) { \
|
|
|
|
func = (real_##name##_t) glfwGetProcAddress(#name); \
|
|
|
|
if (!func) { \
|
|
|
|
ERR("Error Resolving GL Symbol: " #name ": %s", dlerror()); \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
return func; \
|
|
|
|
}
|