summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/program.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-07-19 10:03:59 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-07-19 10:03:59 -0700
commitb18bb32e378ea8429b1ee7c83c209d75c82f1e4e (patch)
tree4c284c2972b3998f8525c94790d8eed0d7360fa6 /src/mbgl/gl/program.hpp
parente7f45e0b19eaa86b587e5269f85ecd0eb8a55de7 (diff)
downloadqtlocation-mapboxgl-b18bb32e378ea8429b1ee7c83c209d75c82f1e4e.tar.gz
[core] Revert conditional attribute bindingupstream/rv-eed89fc
Reverts eed89fcf9d099266aa793375ad63493e880f8a80, which causes issues on certain Android devices. We don't actually need this change on this branch, I brought it over only to make the subsequent commits cleanly cherry-pickable.
Diffstat (limited to 'src/mbgl/gl/program.hpp')
-rw-r--r--src/mbgl/gl/program.hpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mbgl/gl/program.hpp b/src/mbgl/gl/program.hpp
index 3b54ec194a..1a429c6630 100644
--- a/src/mbgl/gl/program.hpp
+++ b/src/mbgl/gl/program.hpp
@@ -34,17 +34,15 @@ public:
: program(
context.createProgram(context.createShader(ShaderType::Vertex, vertexSource),
context.createShader(ShaderType::Fragment, fragmentSource))),
- uniformsState((context.linkProgram(program), Uniforms::bindLocations(program))),
- attributeLocations(Attributes::bindLocations(program)) {
- // Re-link program after manually binding only active attributes in Attributes::bindLocations
- context.linkProgram(program);
+ attributeLocations(Attributes::bindLocations(program)),
+ uniformsState((context.linkProgram(program), Uniforms::bindLocations(program))) {
}
template <class BinaryProgram>
Program(Context& context, const BinaryProgram& binaryProgram)
: program(context.createProgram(binaryProgram.format(), binaryProgram.code())),
- uniformsState(Uniforms::loadNamedLocations(binaryProgram)),
- attributeLocations(Attributes::loadNamedLocations(binaryProgram)) {
+ attributeLocations(Attributes::loadNamedLocations(binaryProgram)),
+ uniformsState(Uniforms::loadNamedLocations(binaryProgram)) {
}
static Program createProgram(gl::Context& context,
@@ -142,8 +140,8 @@ public:
private:
UniqueProgram program;
- typename Uniforms::State uniformsState;
typename Attributes::Locations attributeLocations;
+ typename Uniforms::State uniformsState;
};
} // namespace gl