summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/attribute.cpp
blob: d5240b5b7a6051128b8fbec53cd0d81531406c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <mbgl/gl/attribute.hpp>
#include <mbgl/gl/context.hpp>

namespace mbgl {
namespace gl {

using namespace platform;

optional<AttributeLocation> queryLocation(ProgramID id, const char* name) {
    GLint attributeLocation = MBGL_CHECK_ERROR(glGetAttribLocation(id, name));
    if (attributeLocation != -1) {
        return attributeLocation;
    } else {
        return {};
    }
}

} // namespace gl
} // namespace mbgl