Move background tile shader selection back to the render layer (#1200)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
Bart Louwers
parent
90aea725e5
commit
dc5f6c4d69
@@ -7,6 +7,7 @@
|
||||
#include <mbgl/gl/vertex_buffer_resource.hpp>
|
||||
#include <mbgl/programs/segment.hpp>
|
||||
#include <mbgl/shaders/gl/shader_program_gl.hpp>
|
||||
#include <mbgl/util/logging.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace gl {
|
||||
@@ -28,8 +29,11 @@ void DrawableGL::draw(const PaintParameters& parameters) const {
|
||||
if (shaderGL.getGLProgramID() != context.program.getCurrentValue()) {
|
||||
context.program = shaderGL.getGLProgramID();
|
||||
}
|
||||
} else {
|
||||
context.program = value::Program::Default;
|
||||
}
|
||||
if (!shader || context.program.getCurrentValue() == 0) {
|
||||
mbgl::Log::Warning(Event::General, "Missing shader for drawable " + util::toString(getId()) + "/" + getName());
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
context.setDepthMode(parameters.depthModeForSublayer(getSubLayerIndex(), getDepthType()));
|
||||
|
||||
Reference in New Issue
Block a user