summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/program.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gl/program.hpp')
-rw-r--r--src/mbgl/gl/program.hpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mbgl/gl/program.hpp b/src/mbgl/gl/program.hpp
index 3757c442de..e9f47694a6 100644
--- a/src/mbgl/gl/program.hpp
+++ b/src/mbgl/gl/program.hpp
@@ -49,15 +49,9 @@ public:
const std::initializer_list<const char*>& fragmentSource)
: program(context.createProgram(
context.createShader(ShaderType::Vertex, vertexSource),
- context.createShader(ShaderType::Fragment, fragmentSource))),
- attributeLocations(context, program) {
- // Re-link program after manually binding only active attributes in Attributes::queryLocations
- context.linkProgram(program);
-
- // We have to re-initialize the uniforms state from the bindings as the uniform locations
- // get shifted on some implementations
+ context.createShader(ShaderType::Fragment, fragmentSource))) {
+ attributeLocations.queryLocations(program);
uniformStates.queryLocations(program);
-
// Texture units are specified via uniforms as well, so we need query their locations
textureStates.queryLocations(program);
}