On 21-Apr-16 4:08 PM, Emil Velikov wrote:
On 20 April 2016 at 16:52, Mircea Gherzan <mircea.gher...@intel.com> wrote:
This header should not blindly include the GLX and should also
conditionally define functions that use GLX parameters. The
MESA_EGL_NO_X11_HEADERS macro is used to check if we're building without
GLX support.

Eek, I new this will come to bite. Although let's try another approach.

Signed-off-by: Mircea Gherzan <mircea.gher...@intel.com>
---
 include/GL/mesa_glinterop.h | 37 ++++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
index 814064d..cd3151f 100644
--- a/include/GL/mesa_glinterop.h
+++ b/include/GL/mesa_glinterop.h
@@ -50,7 +50,12 @@
 #ifndef MESA_GLINTEROP_H
 #define MESA_GLINTEROP_H

+#ifdef MESA_EGL_NO_X11_HEADERS
+#include <GL/gl.h>
+#else
 #include <GL/glx.h>
+#endif
+
 #include <EGL/egl.h>

Drop the includes altogether, and forward declare the needed symbols.

Why not use the configure.ac-based approach suggested by Chuck?

Marek, that would require updating the closed source side of things.
Although considering there hasn't been a mesa release that includes
the interface I'd vote for that.

Does this sound OK or I'm missing something ?

--
- Mircea
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to