ephyr: Use GLEW.

This will hide all sorts of extension stuff from us.
This commit is contained in:
Eric Anholt 2009-08-20 11:19:43 -07:00 committed by Zhigang Gong
parent 370df817ac
commit 2e35ceca65
4 changed files with 12 additions and 1 deletions

View File

@ -2011,6 +2011,15 @@ if test "$KDRIVE" = yes; then
AC_MSG_ERROR([Xephyr dependencies missing]) AC_MSG_ERROR([Xephyr dependencies missing])
fi 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 # Xephyr needs nanosleep() which is in librt on Solaris
AC_CHECK_FUNC([nanosleep], [], AC_CHECK_FUNC([nanosleep], [],
AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt"))

View File

@ -115,6 +115,8 @@ glamor_init(ScreenPtr screen)
glamor_priv->saved_destroy_pixmap = screen->DestroyPixmap; glamor_priv->saved_destroy_pixmap = screen->DestroyPixmap;
screen->DestroyPixmap = glamor_destroy_pixmap; screen->DestroyPixmap = glamor_destroy_pixmap;
glewInit();
return TRUE; return TRUE;
} }

View File

@ -36,7 +36,6 @@
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include "GL/gl.h"
#include "glamor_priv.h" #include "glamor_priv.h"

View File

@ -29,6 +29,7 @@
#define GLAMOR_PRIV_H #define GLAMOR_PRIV_H
#include "glamor.h" #include "glamor.h"
#include <GL/glew.h>
typedef struct glamor_screen_private { typedef struct glamor_screen_private {
CreateGCProcPtr saved_create_gc; CreateGCProcPtr saved_create_gc;