mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
update DrawContext
This commit is contained in:
parent
cf12338a32
commit
3590bd14cd
9 changed files with 67 additions and 45 deletions
|
|
@ -12,19 +12,22 @@ class DrawContext {
|
|||
const DrawContext* parent;
|
||||
Viewport viewport;
|
||||
Batch2D* const g2d;
|
||||
Flushable* flushable = nullptr;
|
||||
Framebuffer* fbo = nullptr;
|
||||
bool depthMask = true;
|
||||
bool depthTest = false;
|
||||
bool cullFace = false;
|
||||
BlendMode blendMode = BlendMode::normal;
|
||||
int scissorsCount = 0;
|
||||
float lineWidth = 1.0f;
|
||||
public:
|
||||
DrawContext(const DrawContext* parent, Viewport viewport, Batch2D* g2d);
|
||||
DrawContext(const DrawContext* parent, Viewport viewport, Batch2D* g2d);
|
||||
~DrawContext();
|
||||
|
||||
Batch2D* getBatch2D() const;
|
||||
|
||||
const Viewport& getViewport() const;
|
||||
DrawContext sub() const;
|
||||
DrawContext sub(Flushable* flushable=nullptr) const;
|
||||
|
||||
void setViewport(const Viewport& viewport);
|
||||
void setFramebuffer(Framebuffer* fbo);
|
||||
|
|
@ -33,6 +36,7 @@ public:
|
|||
void setCullFace(bool flag);
|
||||
void setBlendMode(BlendMode mode);
|
||||
void setScissors(glm::vec4 area);
|
||||
void setLineWidth(float width);
|
||||
};
|
||||
|
||||
#endif // GRAPHICS_CORE_GFX_CONTEXT_HPP_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue