mesa_glinterop: remove inclusion of GLX header
authorEmil Velikov <emil.velikov@collabora.com>
Tue, 3 May 2016 11:25:34 +0000 (12:25 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 24 May 2016 22:03:00 +0000 (23:03 +0100)
Since we only need partial information about the GLX symbols we can
forward declare them and drop the include. Obviously each user of the
said API will needs more than what's provides, so they'll include the
GLX header.

If they don't, the compiler will give us a nice warning ;-)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
include/GL/mesa_glinterop.h

index ae71fea00873f62a7d9a14460cc0f3d630596ebb..b76bd7ec2f509f2863b8f642a79f937f6571772b 100644 (file)
 #define MESA_GLINTEROP_H
 
 #include <stddef.h>
-#include <GL/glx.h>
 #include <EGL/egl.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+/* Forward declarations to avoid inclusion of GL/glx.h */
+typedef struct _XDisplay Display;
+typedef struct __GLXcontextRec *GLXContext;
+
 /** Returned error codes. */
 enum {
    MESA_GLINTEROP_SUCCESS = 0,