#include #include namespace mbgl { namespace gl { AttributeLocation bindAttributeLocation(ProgramID id, AttributeLocation location, const char* name) { MBGL_CHECK_ERROR(glBindAttribLocation(id, location, name)); return location; } void bindAttribute(AttributeLocation location, std::size_t count, DataType type, std::size_t vertexSize, std::size_t vertexOffset, std::size_t attributeOffset) { MBGL_CHECK_ERROR(glEnableVertexAttribArray(location)); MBGL_CHECK_ERROR(glVertexAttribPointer( location, static_cast(count), static_cast(type), GL_FALSE, static_cast(vertexSize), reinterpret_cast(attributeOffset + (vertexSize * vertexOffset)))); } } // namespace gl } // namespace mbgl