x-related EGL code (stub)
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 28 May 2008 14:42:13 +0000 (08:42 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 28 May 2008 14:42:36 +0000 (08:42 -0600)
src/egl/main/eglx.c [new file with mode: 0644]
src/egl/main/eglx.h [new file with mode: 0644]

diff --git a/src/egl/main/eglx.c b/src/egl/main/eglx.c
new file mode 100644 (file)
index 0000000..4b33080
--- /dev/null
@@ -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 (file)
index 0000000..4323d55
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef EGLX_INCLUDED
+#define EGLX_INCLUDED
+
+
+#include "egldisplay.h"
+
+
+extern const char *
+_xeglChooseDriver(_EGLDisplay *dpy);
+
+
+#endif /* EGLX_INCLUDED */