summaryrefslogtreecommitdiff
path: root/src/mbgl/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/map')
-rw-r--r--src/mbgl/map/backend.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mbgl/map/backend.cpp b/src/mbgl/map/backend.cpp
index 4c84453c1f..83c2fed00b 100644
--- a/src/mbgl/map/backend.cpp
+++ b/src/mbgl/map/backend.cpp
@@ -38,6 +38,11 @@ void Backend::assumeViewport(int32_t x, int32_t y, const Size& size) {
assert(gl::value::Viewport::Get() == getContext().viewport.getCurrentValue());
}
+void Backend::assumeScissorTest(bool enabled) {
+ getContext().scissorTest.setCurrentValue(enabled);
+ assert(gl::value::ScissorTest::Get() == getContext().scissorTest.getCurrentValue());
+}
+
bool Backend::implicitFramebufferBound() {
return getContext().bindFramebuffer.getCurrentValue() == ImplicitFramebufferBinding;
}
@@ -54,6 +59,11 @@ void Backend::setViewport(int32_t x, int32_t y, const Size& size) {
assert(gl::value::Viewport::Get() == getContext().viewport.getCurrentValue());
}
+void Backend::setScissorTest(bool enabled) {
+ getContext().scissorTest = enabled;
+ assert(gl::value::ScissorTest::Get() == getContext().scissorTest.getCurrentValue());
+}
+
Backend::~Backend() = default;
} // namespace mbgl