frontend/gui refactor

This commit is contained in:
MihailRis
2024-01-31 04:26:35 +03:00
parent 49fdcdfb27
commit 8c722b146e
17 changed files with 331 additions and 332 deletions
+10
View File
@@ -9,8 +9,13 @@ GfxContext::GfxContext(const GfxContext* parent, Viewport& viewport, Batch2D* g2
}
GfxContext::~GfxContext() {
while (scissorsCount--) {
Window::popScissor();
}
if (parent == nullptr)
return;
if (depthMask_ != parent->depthMask_) {
glDepthMask(parent->depthMask_);
}
@@ -77,3 +82,8 @@ void GfxContext::blendMode(blendmode mode) {
blendMode_ = mode;
Window::setBlendMode(mode);
}
void GfxContext::scissors(glm::vec4 area) {
Window::pushScissor(area);
scissorsCount++;
}