aboutsummaryrefslogtreecommitdiff
path: root/src/backend/gl/egl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/gl/egl.h')
-rw-r--r--src/backend/gl/egl.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/backend/gl/egl.h b/src/backend/gl/egl.h
new file mode 100644
index 0000000..171b173
--- /dev/null
+++ b/src/backend/gl/egl.h
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: MPL-2.0
+// Copyright (c) Yuxuan Shui <[email protected]>
+#pragma once
+#include <stdbool.h>
+// Older version of glx.h defines function prototypes for these extensions...
+// Rename them to avoid conflicts
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <GL/gl.h>
+#include <GL/glext.h>
+#include <xcb/render.h>
+#include <xcb/xcb.h>
+
+#include "compiler.h"
+#include "log.h"
+#include "utils.h"
+#include "x.h"
+
+struct eglext_info {
+ bool initialized;
+ bool has_EGL_MESA_query_driver;
+ bool has_EGL_EXT_buffer_age;
+ bool has_EGL_EXT_create_context_robustness;
+ bool has_EGL_KHR_image_pixmap;
+};
+
+extern struct eglext_info eglext;
+
+#ifdef EGL_MESA_query_driver
+extern PFNEGLGETDISPLAYDRIVERNAMEPROC eglGetDisplayDriverName;
+#endif
+
+void eglext_init(EGLDisplay);