diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-08-21 14:33:17 -0400 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-09-14 15:15:08 +0200 |
commit | 6db8e65394838e3269351cf393a8820cea1326a7 (patch) | |
tree | 5439249b57d8993c9e7283b31554de2af2d0cfa4 /src | |
parent | 9ff66acf61c33c4b073ea44d0932807e9c7632be (diff) | |
download | qtlocation-mapboxgl-6db8e65394838e3269351cf393a8820cea1326a7.tar.gz |
don't validate the program
it's not in a state where validation always succeeds with all drivers, e.g. because textures might not be attached yet
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/shader/shader.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mbgl/shader/shader.cpp b/src/mbgl/shader/shader.cpp index 1e3df1bbc2..ed4cb729b3 100644 --- a/src/mbgl/shader/shader.cpp +++ b/src/mbgl/shader/shader.cpp @@ -67,31 +67,6 @@ Shader::Shader(const char *name_, const GLchar *vertSource, const GLchar *fragSo } } - { - // Validate program - GLint status; - MBGL_CHECK_ERROR(glValidateProgram(program)); - - MBGL_CHECK_ERROR(glGetProgramiv(program, GL_VALIDATE_STATUS, &status)); - if (status == 0) { - GLint logLength; - MBGL_CHECK_ERROR(glGetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength)); - const auto log = std::make_unique<GLchar[]>(logLength); - if (logLength > 0) { - MBGL_CHECK_ERROR(glGetProgramInfoLog(program, logLength, &logLength, log.get())); - Log::Error(Event::Shader, "Program failed to validate: %s", log.get()); - } - - MBGL_CHECK_ERROR(glDeleteShader(vertShader)); - vertShader = 0; - MBGL_CHECK_ERROR(glDeleteShader(fragShader)); - fragShader = 0; - MBGL_CHECK_ERROR(glDeleteProgram(program)); - program = 0; - throw util::ShaderException(std::string { "Program " } + name + " failed to link: " + log.get()); - } - } - // Remove the compiled shaders; they are now part of the program. MBGL_CHECK_ERROR(glDetachShader(program, vertShader)); MBGL_CHECK_ERROR(glDeleteShader(vertShader)); |