aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-05-28 08:42:13 -0600
committerBrian Paul <[email protected]>2008-05-28 08:42:36 -0600
commit95c917f7dd6e837cb1b280be617a795dd57c9f13 (patch)
tree6a5ad1f15ce18d123d0af8baa27fb508659ec70d
parent276552c0dd8d9d68b8324c42b05c768c45a9db76 (diff)
x-related EGL code (stub)
-rw-r--r--src/egl/main/eglx.c37
-rw-r--r--src/egl/main/eglx.h12
2 files changed, 49 insertions, 0 deletions
diff --git a/src/egl/main/eglx.c b/src/egl/main/eglx.c
new file mode 100644
index 00000000000..4b33080f1a6
--- /dev/null
+++ b/src/egl/main/eglx.c
@@ -0,0 +1,37 @@
+
+/**
+ * X-specific EGL code.
+ *
+ * Any glue code needed to make EGL work with X is placed in this file.
+ */
+
+
+#include <assert.h>
+#include <stdio.h>
+#include <X11/Xlib.h>
+#include "eglx.h"
+
+
+
+/**
+ * Given an X Display ptr (at dpy->Xdpy) try to determine the appropriate
+ * device driver. Return its name.
+ */
+const char *
+_xeglChooseDriver(_EGLDisplay *dpy)
+{
+#ifdef _EGL_PLATFORM_X
+ _XPrivDisplay xdpy = (_XPrivDisplay) dpy->Xdpy;
+
+ assert(dpy);
+ assert(dpy->Xdpy);
+
+ printf("%s\n", xdpy->display_name);
+
+ return "foo"; /* XXX todo */
+#else
+ return NULL;
+#endif
+}
+
+
diff --git a/src/egl/main/eglx.h b/src/egl/main/eglx.h
new file mode 100644
index 00000000000..4323d558381
--- /dev/null
+++ b/src/egl/main/eglx.h
@@ -0,0 +1,12 @@
+#ifndef EGLX_INCLUDED
+#define EGLX_INCLUDED
+
+
+#include "egldisplay.h"
+
+
+extern const char *
+_xeglChooseDriver(_EGLDisplay *dpy);
+
+
+#endif /* EGLX_INCLUDED */