diff options
Diffstat (limited to 'src/client/render/anaglyph.h')
| -rw-r--r-- | src/client/render/anaglyph.h | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/src/client/render/anaglyph.h b/src/client/render/anaglyph.h index a03b7dc7e..7a186aeff 100644 --- a/src/client/render/anaglyph.h +++ b/src/client/render/anaglyph.h @@ -20,15 +20,50 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once #include "stereo.h" +#include "pipeline.h" -class RenderingCoreAnaglyph : public RenderingCoreStereo +/** + * Set color mask when rendering the next steps + */ +class SetColorMaskStep : public TrivialRenderStep { -protected: - void setupMaterial(int color_mask); - void useEye(bool right) override; - void resetEye() override; +public: + SetColorMaskStep(int color_mask); + + void run(PipelineContext &context) override; +private: + int color_mask; +}; + +/** + * Resets depth buffer of the current render target + * + */ +class ClearDepthBufferTarget : public RenderTarget +{ +public: + ClearDepthBufferTarget(RenderTarget *target); + void reset(PipelineContext &context) override {} + void activate(PipelineContext &context) override; +private: + RenderTarget *target; +}; + + +/** + * Enables or disables override material when activated + * + */ +class ConfigureOverrideMaterialTarget : public RenderTarget +{ public: - using RenderingCoreStereo::RenderingCoreStereo; - void drawAll() override; + ConfigureOverrideMaterialTarget(RenderTarget *upstream, bool enable); + + virtual void activate(PipelineContext &context) override; +private: + RenderTarget *upstream; + bool enable; }; + +void populateAnaglyphPipeline(RenderPipeline *pipeline, Client *client); |
