remove Viewport class

This commit is contained in:
MihailRis 2025-04-02 17:35:17 +03:00
parent 105561ad77
commit 9843a1fc27
17 changed files with 60 additions and 115 deletions

View file

@ -1,7 +1,9 @@
#pragma once
#include <glm/vec2.hpp>
#include <glm/vec4.hpp>
#include "commons.hpp"
#include "Viewport.hpp"
#include "typedefs.hpp"
class Window;
@ -11,7 +13,7 @@ class Framebuffer;
class DrawContext {
Window& window;
const DrawContext* parent;
Viewport viewport;
glm::uvec2 viewport;
Batch2D* g2d;
Flushable* flushable = nullptr;
Framebuffer* fbo = nullptr;
@ -31,10 +33,10 @@ public:
Batch2D* getBatch2D() const;
const Viewport& getViewport() const;
const glm::uvec2& getViewport() const;
DrawContext sub(Flushable* flushable=nullptr) const;
void setViewport(const Viewport& viewport);
void setViewport(const glm::uvec2& viewport);
void setFramebuffer(Framebuffer* fbo);
void setDepthMask(bool flag);
void setDepthTest(bool flag);