#ifndef MESA_GLINTEROP_H
#define MESA_GLINTEROP_H
+#if defined(MESA_EGL_NO_X11_HEADERS)
+#include <GL/gl.h>
+#else
#include <GL/glx.h>
+#endif
#include <EGL/egl.h>
#ifdef __cplusplus
} mesa_glinterop_export_out;
+#if !defined(MESA_EGL_NO_X11_HEADERS)
/**
* Query device information.
*
*
* \return MESA_GLINTEROP_SUCCESS or MESA_GLINTEROP_* != 0 on error
*/
+
GLAPI int GLAPIENTRY
MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,
mesa_glinterop_device_info *out);
+#endif
/**
mesa_glinterop_device_info *out);
+#if !defined(MESA_EGL_NO_X11_HEADERS)
/**
* Create and return a DMABUF handle corresponding to the given OpenGL
* object, and return other parameters about the OpenGL object.
*
* \return MESA_GLINTEROP_SUCCESS or MESA_GLINTEROP_* != 0 on error
*/
+
GLAPI int GLAPIENTRY
MesaGLInteropGLXExportObject(Display *dpy, GLXContext context,
const mesa_glinterop_export_in *in,
mesa_glinterop_export_out *out);
+#endif
/**
const mesa_glinterop_export_in *in,
mesa_glinterop_export_out *out);
-
+#if !defined(MESA_EGL_NO_X11_HEADERS)
typedef int (APIENTRYP PFNMESAGLINTEROPGLXQUERYDEVICEINFOPROC)(Display *dpy, GLXContext context,
mesa_glinterop_device_info *out);
+#endif
typedef int (APIENTRYP PFNMESAGLINTEROPEGLQUERYDEVICEINFOPROC)(EGLDisplay dpy, EGLContext context,
mesa_glinterop_device_info *out);
+#if !defined(MESA_EGL_NO_X11_HEADERS)
typedef int (APIENTRYP PFNMESAGLINTEROPGLXEXPORTOBJECTPROC)(Display *dpy, GLXContext context,
const mesa_glinterop_export_in *in,
mesa_glinterop_export_out *out);
+#endif
typedef int (APIENTRYP PFNMESAGLINTEROPEGLEXPORTOBJECTPROC)(EGLDisplay dpy, EGLContext context,
const mesa_glinterop_export_in *in,
mesa_glinterop_export_out *out);