minecraft-pi-reborn/media-layer/stubs/src/EGL.c

54 lines
2.5 KiB
C
Raw Normal View History

2021-06-17 21:32:24 +00:00
/*
* This is only loaded when no other EGL library is present on the system to silence linker errors.
*
* All EGL calls are manually patched out in mods/src/compat/egl.c.
* Unlike with bcm_host, EGL can't just be always stubbed out with LD_PRELOAD, because in some situations GLFW has it as a dependency.
*
* So normally, MCPI just loads the real EGL and never uses it (because MCPI's EGL calls were patched out).
* However, since the real EGL is still loaded, GLFW can use it if it needs to.
*
* This stub library is just in case the system has no EGL library present.
*/
2020-10-30 22:25:08 +00:00
#include <EGL/egl.h>
2021-06-17 21:32:24 +00:00
#include <libreborn/libreborn.h>
#define IMPOSSIBLE() ERR("(%s:%i) This Should Never Be Called", __FILE__, __LINE__)
2021-02-21 19:53:17 +00:00
// EGL Is Replaced With GLFW
2020-10-30 22:25:08 +00:00
EGLDisplay eglGetDisplay(__attribute__((unused)) NativeDisplayType native_display) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLBoolean eglInitialize(__attribute__((unused)) EGLDisplay display, __attribute__((unused)) EGLint *major, __attribute__((unused)) EGLint *minor) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLBoolean eglChooseConfig(__attribute__((unused)) EGLDisplay display, __attribute__((unused)) EGLint const *attrib_list, __attribute__((unused)) EGLConfig *configs, __attribute__((unused)) EGLint config_size, __attribute__((unused)) EGLint *num_config) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLBoolean eglBindAPI(__attribute__((unused)) EGLenum api) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLContext eglCreateContext(__attribute__((unused)) EGLDisplay display, __attribute__((unused)) EGLConfig config, __attribute__((unused)) EGLContext share_context, __attribute__((unused)) EGLint const *attrib_list) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLSurface eglCreateWindowSurface(__attribute__((unused)) EGLDisplay display, __attribute__((unused)) EGLConfig config, __attribute__((unused)) NativeWindowType native_window, __attribute__((unused)) EGLint const *attrib_list) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLBoolean eglMakeCurrent(__attribute__((unused)) EGLDisplay display, __attribute__((unused)) EGLSurface draw, __attribute__((unused)) EGLSurface read, __attribute__((unused)) EGLContext context) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLBoolean eglDestroySurface(__attribute__((unused)) EGLDisplay display, __attribute__((unused)) EGLSurface surface) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLBoolean eglDestroyContext(__attribute__((unused)) EGLDisplay display, __attribute__((unused)) EGLContext context) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLBoolean eglTerminate(__attribute__((unused)) EGLDisplay display) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
2020-10-30 22:25:08 +00:00
}
EGLBoolean eglSwapBuffers(__attribute__((unused)) EGLDisplay display, __attribute__((unused)) EGLSurface surface) {
2021-06-17 21:32:24 +00:00
IMPOSSIBLE();
}