From 89e20ab3aeff37f0eff79ab0c5e73be3d3185ce8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 17 Nov 2009 19:22:29 -0700 Subject: [PATCH] progs/glsl: use ShadersSupported() --- progs/glsl/multitex.c | 7 ++----- progs/glsl/texdemo1.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/progs/glsl/multitex.c b/progs/glsl/multitex.c index bf46fd5210e..49b32253eed 100644 --- a/progs/glsl/multitex.c +++ b/progs/glsl/multitex.c @@ -369,12 +369,9 @@ InitPrograms(void) static void InitGL(void) { - const char *version = (const char *) glGetString(GL_VERSION); + if (!ShadersSupported()) + exit(1); - if (version[0] != '2' || version[1] != '.') { - printf("Warning: this program expects OpenGL 2.0\n"); - /*exit(1);*/ - } printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER)); printf("Usage:\n"); printf(" a - toggle arrays vs. immediate mode rendering\n"); diff --git a/progs/glsl/texdemo1.c b/progs/glsl/texdemo1.c index 5b1913a722b..2076e6aef94 100644 --- a/progs/glsl/texdemo1.c +++ b/progs/glsl/texdemo1.c @@ -400,11 +400,8 @@ InitPrograms(void) static void Init(GLboolean useImageFiles) { - const char *version = (const char *) glGetString(GL_VERSION); - - if (version[0] != '2' || version[1] != '.') { - printf("Warning: this program expects OpenGL 2.0\n"); - /*exit(1);*/ + if (!ShadersSupported()) { + exit(1); } printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER)); -- 2.30.2