From 38fbb8e02f4403f397737ca477acce78d0eec80e Mon Sep 17 00:00:00 2001 From: ikits Date: Thu, 1 May 2003 20:02:23 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@54 783a27ee-832a-0410-bc00-9f386506c6dd --- Makefile | 2 +- src/glew.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5b3f2a9..6e6ce27 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ BIN.SRCS = src/glewinfo.c BIN.OBJS = $(BIN.SRCS:.c=.o) BIN.LIBS = -Llib -L/usr/X11R6/lib -lglut -l$(NAME) -lGLU -lGL -lXmu -lX11 -all: lib/$(LIB.A) bin/$(BIN) +all: lib/$(LIB.A) lib/$(LIB.SO) bin/$(BIN) lib/$(LIB.A): $(LIB.OBJS) $(AR) cr $@ $^ diff --git a/src/glew.c b/src/glew.c index 74aa3af..efed0dc 100644 --- a/src/glew.c +++ b/src/glew.c @@ -3265,7 +3265,7 @@ GLboolean glxewGetExtension (const char *name) { char *p, *end; int len = _glewStrLen(name); - if (glXQueryExtensionsString == NULL) return GL_FALSE; + if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE; p = (char*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScreen(glXGetCurrentDisplay())); if (0 == p) return GL_FALSE; end = p + _glewStrLen(p); @@ -3284,7 +3284,7 @@ static GLint _glxewInit () /* intialize glxew struct */ _glewMemSet(&glxew, 0, sizeof(glxew)); /* initialize core GLX 1.0-1.2 */ - if (_glxewInit_10() || _glxewInit_11() || _glxewInit_12()) return GLEW_ERROR_GLX_VERSION_11_ONLY; + if (_glxewInit_10() || _glxewInit_11() || _glxewInit_12() || glXGetCurrentDisplay == NULL) return GLEW_ERROR_GLX_VERSION_11_ONLY; /* query GLX version */ glXQueryVersion(glXGetCurrentDisplay(), &major, &minor); switch (minor)