frontend/gui refactor
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user