summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-08-24 17:34:47 +0200
committerJulien Cristau <jcristau@debian.org>2008-08-24 17:34:47 +0200
commit16358bb3cc6ec89aaa63ed838709b0ad04ba87e3 (patch)
tree9e3025d3039548ec162e8d0262e30fe5f87589a9 /progs
parentef160330e53f7a0de79c153bbde6ee3831a7d3a5 (diff)
parent7c81124d7c4a4d1da9f48cbf7e82ab1a3a970a7a (diff)
Merge branch 'mesa_7_2_branch' of git.freedesktop.org:/git/mesa/mesa into debian-experimental
Diffstat (limited to 'progs')
-rw-r--r--progs/glsl/trirast.c2
-rw-r--r--progs/util/shaderutil.c15
2 files changed, 10 insertions, 7 deletions
diff --git a/progs/glsl/trirast.c b/progs/glsl/trirast.c
index 67cbac0546c..89df64fc718 100644
--- a/progs/glsl/trirast.c
+++ b/progs/glsl/trirast.c
@@ -190,7 +190,7 @@ Init(void)
"}\n";
static const char *vertShaderText =
"void main() {\n"
- " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
+ " gl_Position = ftransform(); \n"
"}\n";
if (!ShadersSupported())
diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c
index 477209ab45f..4f17dd7efa1 100644
--- a/progs/util/shaderutil.c
+++ b/progs/util/shaderutil.c
@@ -27,12 +27,15 @@ 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;
+ const char *version = (const char *) glGetString(GL_VERSION);
+ if (version[0] == '2' && version[1] == '.') {
+ return GL_TRUE;
+ }
+ else if (glutExtensionSupported("GL_ARB_vertex_shader")
+ && glutExtensionSupported("GL_ARB_fragment_shader")
+ && glutExtensionSupported("GL_ARB_shader_objects")) {
+ fprintf(stderr, "Warning: Trying ARB GLSL instead of OpenGL 2.x. This may not work.\n");
+ return GL_TRUE;
}
return GL_TRUE;
}