x-related EGL code (stub)

This commit is contained in:
Brian Paul 2008-05-28 08:42:13 -06:00
parent 276552c0dd
commit 95c917f7dd
2 changed files with 49 additions and 0 deletions

37
src/egl/main/eglx.c Normal file
View File

@ -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
}

12
src/egl/main/eglx.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef EGLX_INCLUDED
#define EGLX_INCLUDED
#include "egldisplay.h"
extern const char *
_xeglChooseDriver(_EGLDisplay *dpy);
#endif /* EGLX_INCLUDED */