@@ -31,8 +31,9 @@ static gl::ExtensionFunction<
|
||||
{"GL_APPLE_vertex_array_object", "glGenVertexArraysAPPLE"}
|
||||
});
|
||||
|
||||
void VertexArrayObject::Bind(GLuint array) {
|
||||
MBGL_CHECK_ERROR(BindVertexArray(array));
|
||||
void VertexArrayObject::Unbind() {
|
||||
if (!BindVertexArray) return;
|
||||
MBGL_CHECK_ERROR(BindVertexArray(0));
|
||||
}
|
||||
|
||||
void VertexArrayObject::Delete(GLsizei n, const GLuint* arrays) {
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace mbgl {
|
||||
|
||||
class VertexArrayObject : public util::noncopyable {
|
||||
public:
|
||||
static void Bind(GLuint array);
|
||||
static void Unbind();
|
||||
static void Delete(GLsizei n, const GLuint* arrays);
|
||||
|
||||
VertexArrayObject();
|
||||
|
||||
@@ -263,7 +263,7 @@ void Painter::render(const Style& style, TransformState state_, TimePoint time)
|
||||
const gl::debugging::group _("cleanup");
|
||||
|
||||
MBGL_CHECK_ERROR(glBindTexture(GL_TEXTURE_2D, 0));
|
||||
MBGL_CHECK_ERROR(VertexArrayObject::Bind(0));
|
||||
MBGL_CHECK_ERROR(VertexArrayObject::Unbind());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user