-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- From 1f80772f964bd2253a2d569eea4d93fe7a1baa1f Mon Sep 17 00:00:00 2001
From: Corbin Simpson <[EMAIL PROTECTED]>
Date: Sat, 16 Aug 2008 08:22:53 -0700
Subject: [PATCH] Fix GLSL detection
 Look for extensions instead of OGL 2.0, this lets non-2.0 drivers do GLSL.

- ---
 progs/util/shaderutil.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c
index 477209a..bd000a6 100644
- --- a/progs/util/shaderutil.c
+++ b/progs/util/shaderutil.c
@@ -27,14 +27,12 @@ Init(void)
 GLboolean
 ShadersSupported(void)
 {
- -   const char *version;
- -
- -   version = (const char *) glGetString(GL_VERSION);
- -   if (version[0] != '2' || version[1] != '.') {
- -      printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
- -      return GL_FALSE;
+   if (glutExtensionSupported("GL_ARB_vertex_shader")
+       && glutExtensionSupported("GL_ARB_fragment_shader")
+       && glutExtensionSupported("GL_ARB_shader_objects")) {
+      return GL_TRUE;
    }
- -   return GL_TRUE;
+   return GL_FALSE;
 }


- --
1.5.6.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkim8V4ACgkQeCCY8PC5utCYhQCdG8mIr2BXFkKyFRI/lr9iZinX
dogAn0CdLgTdmiYJ/HS9oI+bnF86mAiW
=+RLV
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to