cogl-primitive: Fix the texture attribute offsets

The offsets for the texture coordinate attributes in the convenience
constructors were all wrong.
This commit is contained in:
Neil Roberts 2010-11-04 17:21:56 +00:00
parent 17aaaac336
commit 390bdd2a27

View File

@ -265,7 +265,7 @@ cogl_primitive_new_p2t2 (CoglVerticesMode mode,
cogl_vertex_attribute_new (array, cogl_vertex_attribute_new (array,
"cogl_tex_coord0_in", "cogl_tex_coord0_in",
sizeof (CoglP2T2Vertex), sizeof (CoglP2T2Vertex),
offsetof (CoglP2T2Vertex, x), offsetof (CoglP2T2Vertex, s),
2, 2,
COGL_VERTEX_ATTRIBUTE_TYPE_FLOAT); COGL_VERTEX_ATTRIBUTE_TYPE_FLOAT);
attributes[2] = NULL; attributes[2] = NULL;
@ -299,7 +299,7 @@ cogl_primitive_new_p3t2 (CoglVerticesMode mode,
cogl_vertex_attribute_new (array, cogl_vertex_attribute_new (array,
"cogl_tex_coord0_in", "cogl_tex_coord0_in",
sizeof (CoglP3T2Vertex), sizeof (CoglP3T2Vertex),
offsetof (CoglP3T2Vertex, x), offsetof (CoglP3T2Vertex, s),
2, 2,
COGL_VERTEX_ATTRIBUTE_TYPE_FLOAT); COGL_VERTEX_ATTRIBUTE_TYPE_FLOAT);
attributes[2] = NULL; attributes[2] = NULL;
@ -333,7 +333,7 @@ cogl_primitive_new_p2t2c4 (CoglVerticesMode mode,
cogl_vertex_attribute_new (array, cogl_vertex_attribute_new (array,
"cogl_tex_coord0_in", "cogl_tex_coord0_in",
sizeof (CoglP2T2C4Vertex), sizeof (CoglP2T2C4Vertex),
offsetof (CoglP2T2C4Vertex, x), offsetof (CoglP2T2C4Vertex, s),
2, 2,
COGL_VERTEX_ATTRIBUTE_TYPE_FLOAT); COGL_VERTEX_ATTRIBUTE_TYPE_FLOAT);
attributes[2] = attributes[2] =
@ -374,7 +374,7 @@ cogl_primitive_new_p3t2c4 (CoglVerticesMode mode,
cogl_vertex_attribute_new (array, cogl_vertex_attribute_new (array,
"cogl_tex_coord0_in", "cogl_tex_coord0_in",
sizeof (CoglP3T2C4Vertex), sizeof (CoglP3T2C4Vertex),
offsetof (CoglP3T2C4Vertex, x), offsetof (CoglP3T2C4Vertex, s),
2, 2,
COGL_VERTEX_ATTRIBUTE_TYPE_FLOAT); COGL_VERTEX_ATTRIBUTE_TYPE_FLOAT);
attributes[2] = attributes[2] =