GfxContext, render refactor

This commit is contained in:
MihailRis
2023-11-19 20:18:44 +03:00
parent ea729760d4
commit e3743b8463
12 changed files with 270 additions and 103 deletions
+27
View File
@@ -0,0 +1,27 @@
#ifndef GRAPHICS_GFX_CONTEXT_H_
#define GRAPHICS_GFX_CONTEXT_H_
#include "../typedefs.h"
#include "Viewport.h"
class Batch2D;
class GfxContext {
const GfxContext* parent;
Viewport& viewport;
Batch2D* const g2d;
bool depthTest_ = false;
bool cullFace_ = false;
public:
GfxContext(const GfxContext* parent, Viewport& viewport, Batch2D* g2d);
~GfxContext();
Batch2D* getBatch2D() const;
const Viewport& getViewport() const;
GfxContext sub() const;
void depthTest(bool flag);
void cullFace(bool flag);
};
#endif // GRAPHICS_GFX_CONTEXT_H_