summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gl/value.cpp')
-rw-r--r--src/mbgl/gl/value.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mbgl/gl/value.cpp b/src/mbgl/gl/value.cpp
index c081c941f5..32c632d101 100644
--- a/src/mbgl/gl/value.cpp
+++ b/src/mbgl/gl/value.cpp
@@ -267,6 +267,18 @@ Viewport::Type Viewport::Get() {
{ static_cast<uint32_t>(viewport[2]), static_cast<uint32_t>(viewport[3]) } };
}
+const constexpr ScissorTest::Type ScissorTest::Default;
+
+void ScissorTest::Set(const Type& value) {
+ MBGL_CHECK_ERROR(value ? glEnable(GL_SCISSOR_TEST) : glDisable(GL_SCISSOR_TEST));
+}
+
+ScissorTest::Type ScissorTest::Get() {
+ Type scissorTest;
+ MBGL_CHECK_ERROR(scissorTest = glIsEnabled(GL_SCISSOR_TEST));
+ return scissorTest;
+}
+
const constexpr BindFramebuffer::Type BindFramebuffer::Default;
void BindFramebuffer::Set(const Type& value) {