src/graphics moved to src/graphics/core

This commit is contained in:
MihailRis 2024-03-18 20:47:35 +03:00
parent ba762584a7
commit b56408a202
63 changed files with 156 additions and 147 deletions

View file

@ -1,38 +0,0 @@
#ifndef GRAPHICS_GFX_CONTEXT_H_
#define GRAPHICS_GFX_CONTEXT_H_
#include "../typedefs.h"
#include "Viewport.h"
#include "../window/Window.h"
class Batch2D;
class Framebuffer;
class GfxContext {
const GfxContext* parent;
Viewport viewport;
Batch2D* const g2d;
Framebuffer* fbo = nullptr;
bool depthMask = true;
bool depthTest = false;
bool cullFace = false;
blendmode blendMode = blendmode::normal;
int scissorsCount = 0;
public:
GfxContext(const GfxContext* parent, const Viewport& viewport, Batch2D* g2d);
~GfxContext();
Batch2D* getBatch2D() const;
const Viewport& getViewport() const;
GfxContext sub() const;
void setViewport(const Viewport& viewport);
void setFramebuffer(Framebuffer* fbo);
void setDepthMask(bool flag);
void setDepthTest(bool flag);
void setCullFace(bool flag);
void setBlendMode(blendmode mode);
void setScissors(glm::vec4 area);
};
#endif // GRAPHICS_GFX_CONTEXT_H_