aboutsummaryrefslogtreecommitdiff
path: root/src/client/render/pipeline.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/render/pipeline.h')
-rw-r--r--src/client/render/pipeline.h36
1 files changed, 10 insertions, 26 deletions
diff --git a/src/client/render/pipeline.h b/src/client/render/pipeline.h
index 4a6df7de2..771c6f1d5 100644
--- a/src/client/render/pipeline.h
+++ b/src/client/render/pipeline.h
@@ -112,7 +112,7 @@ protected:
*
* @note Use of TextureBuffer requires use of gl_FragData[] in the shader
*/
-class TextureBuffer : public RenderSource, public RenderTarget
+class TextureBuffer : public RenderSource
{
public:
virtual ~TextureBuffer() override;
@@ -138,29 +138,8 @@ public:
*/
void setTexture(u8 index, v2f scale_factor, const std::string& name, video::ECOLOR_FORMAT format);
- /**
- * @Configure depth texture and assign index
- *
- * @param index index to use for the depth texture
- * @param size width and height of the texture in pixels
- * @param name unique name for the texture
- * @param format color format
- */
- void setDepthTexture(u8 index, core::dimension2du size, const std::string& name, video::ECOLOR_FORMAT format);
-
- /**
- * @Configure depth texture and assign index
- *
- * @param index index to use for the depth texture
- * @param scale_factor relation of the texture dimensions to the screen dimensions
- * @param name unique name for the texture
- * @param format color format
- */
- void setDepthTexture(u8 index, v2f scale_factor, const std::string& name, video::ECOLOR_FORMAT format);
-
virtual u8 getTextureCount() override { return m_textures.size(); }
virtual video::ITexture *getTexture(u8 index) override;
- virtual void activate(PipelineContext &context) override;
virtual void reset(PipelineContext &context) override;
private:
static const u8 NO_DEPTH_TEXTURE = 255;
@@ -189,9 +168,6 @@ private:
video::IVideoDriver *m_driver { nullptr };
std::vector<TextureDefinition> m_definitions;
core::array<video::ITexture *> m_textures;
- video::ITexture *m_depth_texture { nullptr };
- u8 m_depth_texture_index { NO_DEPTH_TEXTURE };
- video::IRenderTarget *m_render_target { nullptr };
};
/**
@@ -201,10 +177,18 @@ class TextureBufferOutput : public RenderTarget
{
public:
TextureBufferOutput(TextureBuffer *buffer, u8 texture_index);
+ TextureBufferOutput(TextureBuffer *buffer, const std::vector<u8> &texture_map);
+ TextureBufferOutput(TextureBuffer *buffer, const std::vector<u8> &texture_map, u8 depth_stencil);
+ virtual ~TextureBufferOutput() override;
void activate(PipelineContext &context) override;
private:
+ static const u8 NO_DEPTH_TEXTURE = 255;
+
TextureBuffer *buffer;
- u8 texture_index;
+ std::vector<u8> texture_map;
+ u8 depth_stencil { NO_DEPTH_TEXTURE };
+ video::IRenderTarget* render_target { nullptr };
+ video::IVideoDriver* driver { nullptr };
};
/**