summaryrefslogtreecommitdiffstats
path: root/src/GalOgl.cpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-11-14 13:24:30 +0100
committerLaG1924 <lag1924@gmail.com>2021-11-15 06:40:28 +0100
commit1e40c0b0e6928558c5ea02612d52860ba80d9f05 (patch)
tree7e83f0a48873c02e181851435e7c9ec2b144918c /src/GalOgl.cpp
parentAdded dynamic textures for Gal (diff)
downloadAltCraft-1e40c0b0e6928558c5ea02612d52860ba80d9f05.tar
AltCraft-1e40c0b0e6928558c5ea02612d52860ba80d9f05.tar.gz
AltCraft-1e40c0b0e6928558c5ea02612d52860ba80d9f05.tar.bz2
AltCraft-1e40c0b0e6928558c5ea02612d52860ba80d9f05.tar.lz
AltCraft-1e40c0b0e6928558c5ea02612d52860ba80d9f05.tar.xz
AltCraft-1e40c0b0e6928558c5ea02612d52860ba80d9f05.tar.zst
AltCraft-1e40c0b0e6928558c5ea02612d52860ba80d9f05.zip
Diffstat (limited to 'src/GalOgl.cpp')
-rw-r--r--src/GalOgl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/GalOgl.cpp b/src/GalOgl.cpp
index e39f5f0..7a662e8 100644
--- a/src/GalOgl.cpp
+++ b/src/GalOgl.cpp
@@ -584,6 +584,18 @@ public:
}
+ virtual void SetScissor(size_t x = 0, size_t y = 0, size_t width = 0, size_t height = 0) override {
+ glEnable(GL_SCISSOR_TEST);
+ glScissor(x, y, width, height);
+ }
+
+ virtual void SetScissor(bool enabled) override {
+ if (enabled)
+ glEnable(GL_SCISSOR_TEST);
+ else
+ glDisable(GL_SCISSOR_TEST);
+ }
+
virtual std::shared_ptr<Buffer> CreateBuffer() override {
auto buff = std::make_shared<BufferOgl>();