mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
GfxContext, render refactor
This commit is contained in:
parent
ea729760d4
commit
e3743b8463
12 changed files with 270 additions and 103 deletions
27
src/graphics/GfxContext.h
Normal file
27
src/graphics/GfxContext.h
Normal 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_
|
||||
Loading…
Add table
Add a link
Reference in a new issue