summaryrefslogtreecommitdiff
path: root/src/egl/main/eglx.c
blob: 4b33080f1a65ea79220bb888d5f94c1c3f90bd3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
}