-
- // Prepare the geometry for the fullscreen quad used in this phase.
- // (We have separate VAOs per shader, since the bindings can in theory
- // be different.)
- float vertices[] = {
- 0.0f, 1.0f,
- 0.0f, 0.0f,
- 1.0f, 1.0f,
- 1.0f, 0.0f
- };
-
- glGenVertexArrays(1, &phase->vao);
- check_error();
- glBindVertexArray(phase->vao);
- check_error();
-
- phase->position_vbo = fill_vertex_attribute(phase->glsl_program_num, "position", 2, GL_FLOAT, sizeof(vertices), vertices);
- phase->texcoord_vbo = fill_vertex_attribute(phase->glsl_program_num, "texcoord", 2, GL_FLOAT, sizeof(vertices), vertices); // Same as vertices.
-
- glBindVertexArray(0);
- check_error();