progs/glsl: Fix vsraytrace GLSL compilation error.
authorVinson Lee <vlee@vmware.com>
Thu, 25 Mar 2010 05:53:23 +0000 (22:53 -0700)
committerVinson Lee <vlee@vmware.com>
Thu, 25 Mar 2010 05:53:23 +0000 (22:53 -0700)
Fixes the following GLSL error on Mac OS X.
'=' :  assigning non-constant to 'const 3-component vector of float'

progs/glsl/vsraytrace.c

index d7726c787b850549135bb5fe3953a390ec64dde0..962b1bdb4c1ab02c58d90bc2c17f4765729b3fa5 100644 (file)
@@ -202,7 +202,7 @@ static const char* vsSource =
   "void main()                                                         \n"
   "{                                                                   \n"
   "  const vec3 cameraPos = vec3(0,0,3);                               \n"
-  "  const vec3 rayDir = normalize(vec3(gl_Vertex.x, gl_Vertex.y, -1.0) * rot);\n"
+  "  vec3 rayDir = normalize(vec3(gl_Vertex.x, gl_Vertex.y, -1.0) * rot);\n"
   "  Ray ray = Ray(cameraPos, rayDir);                                 \n"
   "  gl_Position = gl_Vertex;                                          \n"
   "  gl_FrontColor = trace1(ray);                                      \n"