Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
plain.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4// Copyright (C) 2017 numzero, Lobachevskiy Vitaliy <numzer0@yandex.ru>
5
6#pragma once
7#include "core.h"
8#include "pipeline.h"
9
13class Draw3D : public RenderStep
14{
15public:
16 virtual void setRenderSource(RenderSource *) override {}
17 virtual void setRenderTarget(RenderTarget *target) override { m_target = target; }
18
19 virtual void reset(PipelineContext &context) override {}
20 virtual void run(PipelineContext &context) override;
21
22private:
24};
25
26class DrawWield : public RenderStep
27{
28public:
29 virtual void setRenderSource(RenderSource *) override {}
30 virtual void setRenderTarget(RenderTarget *target) override { m_target = target; }
31
32 virtual void reset(PipelineContext &context) override {}
33 virtual void run(PipelineContext &context) override;
34
35private:
37};
38
42class DrawHUD : public RenderStep
43{
44public:
45 virtual void setRenderSource(RenderSource *) override {}
46 virtual void setRenderTarget(RenderTarget *) override {}
47
48 virtual void reset(PipelineContext &context) override {}
49 virtual void run(PipelineContext &context) override;
50};
51
53{
54public:
55 virtual void setRenderTarget(RenderTarget *) override;
56 virtual void run(PipelineContext &context) override;
57private:
59};
60
62{
63public:
64 virtual void run(PipelineContext &context) override;
65};
66
71class UpscaleStep : public RenderStep
72{
73public:
74
75 virtual void setRenderSource(RenderSource *source) override { m_source = source; }
76 virtual void setRenderTarget(RenderTarget *target) override { m_target = target; }
77 virtual void reset(PipelineContext &context) override {};
78 virtual void run(PipelineContext &context) override;
79private:
82};
83
84std::unique_ptr<RenderStep> create3DStage(Client *client, v2f scale);
85RenderStep* addUpscaling(RenderPipeline *pipeline, RenderStep *previousStep, v2f downscale_factor, Client *client);
86
88
89video::ECOLOR_FORMAT selectColorFormat(video::IVideoDriver *driver);
90video::ECOLOR_FORMAT selectDepthFormat(video::IVideoDriver *driver);
Definition client.h:105
Implements a pipeline step that renders the 3D scene.
Definition plain.h:14
virtual void run(PipelineContext &context) override
Draw3D pipeline step.
Definition plain.cpp:16
virtual void setRenderSource(RenderSource *) override
Assigns render source to this step.
Definition plain.h:16
virtual void reset(PipelineContext &context) override
Definition plain.h:19
RenderTarget * m_target
Definition plain.h:23
virtual void setRenderTarget(RenderTarget *target) override
Assigned render target to this step.
Definition plain.h:17
Implements a pipeline step that renders the game HUD.
Definition plain.h:43
virtual void setRenderTarget(RenderTarget *) override
Assigned render target to this step.
Definition plain.h:46
virtual void run(PipelineContext &context) override
Runs the step.
Definition plain.cpp:38
virtual void reset(PipelineContext &context) override
Definition plain.h:48
virtual void setRenderSource(RenderSource *) override
Assigns render source to this step.
Definition plain.h:45
Definition plain.h:27
RenderTarget * m_target
Definition plain.h:36
virtual void reset(PipelineContext &context) override
Definition plain.h:32
virtual void setRenderTarget(RenderTarget *target) override
Assigned render target to this step.
Definition plain.h:30
virtual void run(PipelineContext &context) override
Runs the step.
Definition plain.cpp:29
virtual void setRenderSource(RenderSource *) override
Assigns render source to this step.
Definition plain.h:29
Definition plain.h:53
RenderTarget * target
Definition plain.h:58
virtual void run(PipelineContext &context) override
Runs the step.
Definition plain.cpp:61
virtual void setRenderTarget(RenderTarget *) override
Assigned render target to this step.
Definition plain.cpp:56
Render Pipeline provides a flexible way to execute rendering steps in the engine.
Definition pipeline.h:353
Definition plain.h:62
virtual void run(PipelineContext &context) override
Runs the step.
Definition plain.cpp:69
Represents a source of rendering information such as textures.
Definition pipeline.h:60
Base class for rendering steps in the pipeline.
Definition pipeline.h:284
Represents a render target (screen or framebuffer)
Definition pipeline.h:78
Provides default empty implementation of supporting methods in a rendering step.
Definition pipeline.h:310
UpscaleStep step performs rescaling of the image in the source texture 0 to the size of the target.
Definition plain.h:72
virtual void reset(PipelineContext &context) override
Definition plain.h:77
virtual void setRenderSource(RenderSource *source) override
Assigns render source to this step.
Definition plain.h:75
virtual void setRenderTarget(RenderTarget *target) override
Assigned render target to this step.
Definition plain.h:76
RenderTarget * m_target
Definition plain.h:81
virtual void run(PipelineContext &context) override
Runs the step.
Definition plain.cpp:78
RenderSource * m_source
Definition plain.h:80
core::vector2d< f32 > v2f
Definition irr_v2d.h:11
Definition activeobjectmgr.cpp:11
std::unique_ptr< RenderStep > create3DStage(Client *client, v2f scale)
Definition plain.cpp:87
video::ECOLOR_FORMAT selectDepthFormat(video::IVideoDriver *driver)
Definition plain.cpp:163
video::ECOLOR_FORMAT selectColorFormat(video::IVideoDriver *driver)
Definition plain.cpp:156
void populatePlainPipeline(RenderPipeline *pipeline, Client *client)
Definition plain.cpp:141
RenderStep * addUpscaling(RenderPipeline *pipeline, RenderStep *previousStep, v2f downscale_factor, Client *client)
Definition plain.cpp:107
Definition pipeline.h:27