diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-10-28 18:17:33 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-11-08 08:09:29 -0800 |
commit | 66bdbc3b969083b9d647abdf72784be64a125949 (patch) | |
tree | 9f2f1c6eb3d0569926420459c2c9afda50c66fd0 /src/mbgl/gl/uniform.cpp | |
parent | 36210fe4e9c68a52dedc90548d90e77cf39a2228 (diff) | |
download | qtlocation-mapboxgl-66bdbc3b969083b9d647abdf72784be64a125949.tar.gz |
[core] Introduce gl::Program template
Diffstat (limited to 'src/mbgl/gl/uniform.cpp')
-rw-r--r-- | src/mbgl/gl/uniform.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/gl/uniform.cpp b/src/mbgl/gl/uniform.cpp index 8018953fb5..7b674f2cde 100644 --- a/src/mbgl/gl/uniform.cpp +++ b/src/mbgl/gl/uniform.cpp @@ -7,6 +7,10 @@ namespace mbgl { namespace gl { +UniformLocation uniformLocation(ProgramID id, const char* name) { + return MBGL_CHECK_ERROR(glGetUniformLocation(id, name)); +} + template <> void bindUniform<float>(UniformLocation location, const float& t) { MBGL_CHECK_ERROR(glUniform1f(location, t)); |