1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Implement rendering pipeline and post-processing (#12465)

Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: lhofhansl <lhofhansl@yahoo.com>
This commit is contained in:
x2048 2022-09-06 08:25:18 +02:00 committed by GitHub
parent 464043b8ab
commit ff6dcfea82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 1476 additions and 565 deletions

View file

@ -26,43 +26,28 @@ class Camera;
class Client;
class Hud;
class Minimap;
class RenderPipeline;
class RenderTarget;
class RenderingCore
{
protected:
v2u32 screensize;
v2u32 virtual_size;
video::SColor skycolor;
bool show_hud;
bool show_minimap;
bool draw_wield_tool;
bool draw_crosshair;
IrrlichtDevice *device;
video::IVideoDriver *driver;
scene::ISceneManager *smgr;
gui::IGUIEnvironment *guienv;
Client *client;
Camera *camera;
Minimap *mapper;
Hud *hud;
ShadowRenderer *shadow_renderer;
void updateScreenSize();
virtual void initTextures() {}
virtual void clearTextures() {}
RenderPipeline *pipeline;
virtual void beforeDraw() {}
virtual void drawAll() = 0;
v2f virtual_size_scale;
v2u32 virtual_size { 0, 0 };
void draw3D();
void drawHUD();
void drawPostFx();
virtual void createPipeline() {}
public:
RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud);
RenderingCore(IrrlichtDevice *device, Client *client, Hud *hud,
ShadowRenderer *shadow_renderer, RenderPipeline *pipeline,
v2f virtual_size_scale);
RenderingCore(const RenderingCore &) = delete;
RenderingCore(RenderingCore &&) = delete;
virtual ~RenderingCore();
@ -74,7 +59,7 @@ public:
void draw(video::SColor _skycolor, bool _show_hud, bool _show_minimap,
bool _draw_wield_tool, bool _draw_crosshair);
inline v2u32 getVirtualSize() const { return virtual_size; }
v2u32 getVirtualSize() const;
ShadowRenderer *get_shadow_renderer() { return shadow_renderer; };
};