diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-06-01 21:32:26 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-06-13 13:37:41 +0300 |
commit | a05f060153497e1be6515120b65f580f4551f9e0 (patch) | |
tree | b736fe12eebe4bfdac0154c4e45d4dbf26207b57 /src/mbgl/map | |
parent | 28eb2e635417c7fb8d746a9ed1d76774066098b3 (diff) | |
download | qtlocation-mapboxgl-a05f060153497e1be6515120b65f580f4551f9e0.tar.gz |
[core] Added Backend::{assume,set}ScissorTest
Diffstat (limited to 'src/mbgl/map')
-rw-r--r-- | src/mbgl/map/backend.cpp | 10 |
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 |