+ // Create a VAO of a very specific form: All the given attribute indices
+ // are bound to start of the given VBO and contain two-component floats.
+ // Keeps ownership of the VAO; you must call release_vec2_vao() of deleting
+ // it when you no longer want it. VAOs are not sharable across contexts.
+ //
+ // These are not cached primarily for performance, but rather to work
+ // around an NVIDIA driver bug where glVertexAttribPointer() is thread-hostile
+ // (ie., simultaneous GL work in unrelated contexts can cause the driver
+ // to free() memory that was never malloc()-ed).
+ GLuint create_vec2_vao(const std::set<GLint> &attribute_indices,
+ GLuint vbo_num);
+ void release_vec2_vao(const GLuint vao_num);
+