summaryrefslogtreecommitdiffstats
path: root/src/RendererWorld.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/RendererWorld.hpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/RendererWorld.hpp b/src/RendererWorld.hpp
index f26abda..706af68 100644
--- a/src/RendererWorld.hpp
+++ b/src/RendererWorld.hpp
@@ -9,7 +9,6 @@
#include "RendererSection.hpp"
#include "RendererEntity.hpp"
-#include "RendererSky.hpp"
#include "RendererSectionData.hpp"
class Frustum;
@@ -20,11 +19,11 @@ class EventListener;
class RenderState;
class RendererWorld {
- struct SectionParsing {
- SectionsData data;
- RendererSectionData renderer;
- bool parsing = false;
- };
+ struct SectionParsing {
+ SectionsData data;
+ RendererSectionData renderer;
+ bool parsing = false;
+ };
//General
std::unique_ptr<EventListener> listener;
@@ -33,17 +32,17 @@ class RendererWorld {
std::vector<std::thread> workers;
void WorkerFunction(size_t WorkerId);
bool isRunning = true;
- const static size_t parsingBufferSize = 64;
- SectionParsing parsing[parsingBufferSize];
- std::queue<Vector> parseQueue;
- bool parseQueueNeedRemoveUnnecessary = false;
- void ParseQueueUpdate();
- void ParseQeueueRemoveUnnecessary();
+ const static size_t parsingBufferSize = 64;
+ SectionParsing parsing[parsingBufferSize];
+ std::queue<Vector> parseQueue;
+ bool parseQueueNeedRemoveUnnecessary = false;
+ void ParseQueueUpdate();
+ void ParseQeueueRemoveUnnecessary();
//Blocks
std::vector<Vector> renderList;
std::map<Vector, RendererSection> sections;
void UpdateAllSections(VectorF playerPos);
- std::chrono::time_point<std::chrono::high_resolution_clock> globalTimeStart;
+ std::chrono::time_point<std::chrono::high_resolution_clock> globalTimeStart;
std::shared_ptr<Gal::Pipeline> sectionsPipeline;
std::shared_ptr<Gal::BufferBinding> sectionsBufferBinding;
//Entities
@@ -52,11 +51,12 @@ class RendererWorld {
std::shared_ptr<Gal::PipelineInstance> entitiesPipelineInstance;
std::shared_ptr<Gal::Buffer> entitiesPosBuffer, entitiesIndexBuffer;
//Sky
- Texture *skyTexture;
- RendererSky rendererSky;
+ std::shared_ptr<Gal::Pipeline> skyPipeline;
+ std::shared_ptr<Gal::PipelineInstance> skyPipelineInstance;
+ std::shared_ptr<Gal::Buffer> skyBuffer;
public:
- RendererWorld();
- ~RendererWorld();
+ RendererWorld();
+ ~RendererWorld();
void Render(RenderState& renderState);
void PrepareRender();