summaryrefslogtreecommitdiffstats
path: root/src/RendererSection.hpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2022-12-15 11:53:56 +0100
committerLaG1924 <lag1924@gmail.com>2022-12-15 11:53:56 +0100
commit12923669214ba73a809f4e221a634244888b0146 (patch)
tree9fe8a85f8fc9a5e3fa9f4e6a9418144090595730 /src/RendererSection.hpp
parentFixed OpenSans font downloading (diff)
downloadAltCraft-12923669214ba73a809f4e221a634244888b0146.tar
AltCraft-12923669214ba73a809f4e221a634244888b0146.tar.gz
AltCraft-12923669214ba73a809f4e221a634244888b0146.tar.bz2
AltCraft-12923669214ba73a809f4e221a634244888b0146.tar.lz
AltCraft-12923669214ba73a809f4e221a634244888b0146.tar.xz
AltCraft-12923669214ba73a809f4e221a634244888b0146.tar.zst
AltCraft-12923669214ba73a809f4e221a634244888b0146.zip
Diffstat (limited to 'src/RendererSection.hpp')
-rw-r--r--src/RendererSection.hpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/RendererSection.hpp b/src/RendererSection.hpp
index 0a03f44..8125e4e 100644
--- a/src/RendererSection.hpp
+++ b/src/RendererSection.hpp
@@ -7,26 +7,39 @@ class RenderState;
class RendererSectionData;
class RendererSection {
- std::shared_ptr<Gal::PipelineInstance> pipelineInstance;
- std::shared_ptr<Gal::Buffer> buffer;
- size_t hash;
+ std::shared_ptr<Gal::PipelineInstance> solidPipelineInstance;
+ std::shared_ptr<Gal::Buffer> solidBuffer;
+ std::shared_ptr<Gal::PipelineInstance> liquidPipelineInstance;
+ std::shared_ptr<Gal::Buffer> liquidBuffer;
Vector sectionPos;
+ size_t hash = 0;
+ size_t solidFacesCount = 0;
+ size_t liquidFacesCount = 0;
RendererSection(const RendererSection &other) = delete;
public:
- RendererSection(const RendererSectionData& data, std::shared_ptr<Gal::Pipeline> pipeline, std::shared_ptr<Gal::BufferBinding> bufferBinding);
+ RendererSection(
+ const RendererSectionData& data,
+ std::shared_ptr<Gal::Pipeline> solidPipeline,
+ std::shared_ptr<Gal::BufferBinding> solidBufferBinding,
+ std::shared_ptr<Gal::Pipeline> liquidPipeline,
+ std::shared_ptr<Gal::BufferBinding> liquidBufferBinding);
RendererSection(RendererSection &&other);
~RendererSection();
- void Render();
+ void RenderSolid();
+
+ void RenderLiquid();
Vector GetPosition();
size_t GetHash();
- size_t numOfFaces;
+ inline size_t GetSolidFacesCount() { return solidFacesCount; }
+
+ inline size_t GetLiquidFacesCount() { return liquidFacesCount; }
friend void swap(RendererSection &lhs, RendererSection &rhs);