mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
remove Viewport class
This commit is contained in:
parent
105561ad77
commit
9843a1fc27
17 changed files with 60 additions and 115 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue