Work around a bug in mesa.

Since I'm not specifying the api when creating my context, mesa is giving
me GL2. This is fair enough, but in GL2, vertex attribute 0 is the vertex
position. This too, is fair enough. The problem is, mesa is assigning 0 to
my vcolor attribute and thus I can't set it. The work around is simply to
swap the declaration order of vcolor and vertex (this really shouldn't work
eiter, I suspect).
This commit is contained in:
Bill Currie 2011-12-28 20:43:56 +09:00
parent 6a44978a0f
commit e69a583f1b

View file

@ -1,4 +1,5 @@
uniform mat4 mvp_mat;
attribute vec4 vcolor;
/** Vertex position.
x, y, s, t
@ -7,7 +8,6 @@ uniform mat4 mvp_mat;
(\a x, \a y) and texture coordinate for the icon (\a s=z, \a t=w).
*/
attribute vec4 vertex;
attribute vec4 vcolor;
varying vec4 color;
varying vec2 st;