| Index: trunk/src/cc/output/geometry_binding.cc
|
| ===================================================================
|
| --- trunk/src/cc/output/geometry_binding.cc (revision 191370)
|
| +++ trunk/src/cc/output/geometry_binding.cc (working copy)
|
| @@ -16,6 +16,14 @@
|
| : context_(context),
|
| quad_vertices_vbo_(0),
|
| quad_elements_vbo_(0) {
|
| + float vertices[] = {
|
| + quad_vertex_rect.x(), quad_vertex_rect.bottom(), 0.0f, 0.0f,
|
| + 1.0f, quad_vertex_rect.x(), quad_vertex_rect.y(), 0.0f,
|
| + 0.0f, 0.0f, quad_vertex_rect.right(), quad_vertex_rect.y(),
|
| + 0.0f, 1.0f, 0.0f, quad_vertex_rect.right(),
|
| + quad_vertex_rect.bottom(), 0.0f, 1.0f, 1.0f
|
| + };
|
| +
|
| struct Vertex {
|
| float a_position[3];
|
| float a_texCoord[2];
|
| @@ -39,28 +47,18 @@
|
| Quad quad_list[8];
|
| QuadIndex quad_index_list[8];
|
| for (int i = 0; i < 8; i++) {
|
| - Vertex v0 = { { quad_vertex_rect.x(), quad_vertex_rect.bottom(), 0.0f, },
|
| - { 0.0f, 1.0f, },
|
| - i * 4.0f + 0.0f };
|
| - Vertex v1 = { { quad_vertex_rect.x(), quad_vertex_rect.y(), 0.0f, },
|
| - { 0.0f, 0.0f, },
|
| + Vertex v0 = { quad_vertex_rect.x(), quad_vertex_rect.bottom(), 0.0f, 0.0f,
|
| + 1.0f, i * 4.0f + 0.0f };
|
| + Vertex v1 = { quad_vertex_rect.x(), quad_vertex_rect.y(), 0.0f, 0.0f, 0.0f,
|
| i * 4.0f + 1.0f };
|
| - Vertex v2 = { { quad_vertex_rect.right(), quad_vertex_rect.y(), 0.0f, },
|
| - { 1.0f, .0f, },
|
| - i * 4.0f + 2.0f };
|
| - Vertex v3 = { { quad_vertex_rect.right(),
|
| - quad_vertex_rect.bottom(),
|
| - 0.0f, },
|
| - { 1.0f, 1.0f, },
|
| - i * 4.0f + 3.0f };
|
| + Vertex v2 = { quad_vertex_rect.right(), quad_vertex_rect.y(), 0.0f, 1.0f,
|
| + 0.0f, i * 4.0f + 2.0f };
|
| + Vertex v3 = { quad_vertex_rect.right(), quad_vertex_rect.bottom(), 0.0f,
|
| + 1.0f, 1.0f, i * 4.0f + 3.0f };
|
| Quad x = { v0, v1, v2, v3 };
|
| quad_list[i] = x;
|
| - QuadIndex y = { { 0 + 4 * i,
|
| - 1 + 4 * i,
|
| - 2 + 4 * i,
|
| - 3 + 4 * i,
|
| - 0 + 4 * i,
|
| - 2 + 4 * i } };
|
| + QuadIndex y = { 0 + 4 * i, 1 + 4 * i, 2 + 4 * i, 3 + 4 * i, 0 + 4 * i,
|
| + 2 + 4 * i };
|
| quad_index_list[i] = y;
|
| }
|
|
|
|
|