From 8f24e863c3745b59e00978fbba306077629b5684 Mon Sep 17 00:00:00 2001 From: Tom Fogal Date: Wed, 18 Nov 2009 20:19:29 -0700 Subject: progs: Fix quoting issue with empty set of PROGRAM_DIRS. Quotes are important to make sure the argument to test -n really is the empty string, but that requires stringifying PROGRAM_DIRS. Signed-off-by: Brian Paul --- progs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'progs') diff --git a/progs/Makefile b/progs/Makefile index 3700707dfb..d5852fa416 100644 --- a/progs/Makefile +++ b/progs/Makefile @@ -4,7 +4,7 @@ TOP = .. include $(TOP)/configs/current -SUBDIRS = $(PROGRAM_DIRS) +SUBDIRS = "$(strip "$(PROGRAM_DIRS)")" default: message subdirs -- cgit v1.2.3 From da0883114b1dceceff8a38deea1bb870fda40464 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 23 Nov 2009 18:32:27 -0800 Subject: shaderutil: Fix detection of shaders Check for versions >= 2.0 (because some drivers return 3.0), and return GL_FALSE if shaders are not detected. --- progs/util/shaderutil.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'progs') diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c index 4db950016b..629b6f1d97 100644 --- a/progs/util/shaderutil.c +++ b/progs/util/shaderutil.c @@ -25,7 +25,11 @@ GLboolean ShadersSupported(void) { const char *version = (const char *) glGetString(GL_VERSION); - if (version[0] == '2' && version[1] == '.') { + + /* NVIDIA binary drivers will return "3.0.0", and they clearly support + * shaders. + */ + if (version[0] >= '2' && version[1] == '.') { return GL_TRUE; } else if (glutExtensionSupported("GL_ARB_vertex_shader") @@ -34,7 +38,7 @@ ShadersSupported(void) fprintf(stderr, "Warning: Trying ARB GLSL instead of OpenGL 2.x. This may not work.\n"); return GL_TRUE; } - return GL_TRUE; + return GL_FALSE; } -- cgit v1.2.3