From 2e35ceca65bbebf07c15ea2cff932a8749955c2b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 20 Aug 2009 11:19:43 -0700 Subject: [PATCH] ephyr: Use GLEW. This will hide all sorts of extension stuff from us. --- configure.ac | 9 +++++++++ glamor/glamor.c | 2 ++ glamor/glamor_core.c | 1 - glamor/glamor_priv.h | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 10069be66..3954ecc06 100644 --- a/configure.ac +++ b/configure.ac @@ -2011,6 +2011,15 @@ if test "$KDRIVE" = yes; then AC_MSG_ERROR([Xephyr dependencies missing]) fi + AC_CHECK_LIB(GLEW, glewInit, [ + AC_CHECK_HEADER(GL/glew.h, [], [ + AC_MSG_ERROR([requires glew http://glew.sourceforge.net/]) + ]) + ], [ + AC_MSG_ERROR([requires glew http://glew.sourceforge.net/]) + ]) + XEPHYR_LIBS="$XEPHYR_LIBS -lGLEW" + # Xephyr needs nanosleep() which is in librt on Solaris AC_CHECK_FUNC([nanosleep], [], AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) diff --git a/glamor/glamor.c b/glamor/glamor.c index a45745985..08e7ff966 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -115,6 +115,8 @@ glamor_init(ScreenPtr screen) glamor_priv->saved_destroy_pixmap = screen->DestroyPixmap; screen->DestroyPixmap = glamor_destroy_pixmap; + glewInit(); + return TRUE; } diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c index eaa6b2d1e..651414b6e 100644 --- a/glamor/glamor_core.c +++ b/glamor/glamor_core.c @@ -36,7 +36,6 @@ #endif #include -#include "GL/gl.h" #include "glamor_priv.h" diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index ef043d035..285799da5 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -29,6 +29,7 @@ #define GLAMOR_PRIV_H #include "glamor.h" +#include typedef struct glamor_screen_private { CreateGCProcPtr saved_create_gc;