Some refactoring in multithreading.

This commit is contained in:
2021-07-08 17:42:26 +02:00
parent 979ae4686f
commit be4e63046a
42 changed files with 598 additions and 285 deletions

View File

@@ -1,8 +1,8 @@
#pragma once
#include <glm/glm.hpp>
#include <memory>
#include <vector>
#include <glm/glm.hpp>
class ShaderProgram;
class Window;
@@ -12,6 +12,10 @@ class Camera;
class Menu;
class FrameBuffer;
namespace Imgui {
class Handler;
}
class Controller
{
public:
@@ -24,18 +28,19 @@ public:
static ShaderProgram *getShaderProgramByName(std::vector<ShaderProgram *> shaderPrograms, const std::string &name);
void updateExposure(ShaderProgram *shaderProgram);
private:
void limit_framerate();
void updateWindowDimensions();
void updateExposure(ShaderProgram *shaderProgram);
ShaderProgram *getShaderProgramByName(const std::string &name);
void renderImGui(World *world, glm::vec3 *lightColor, bool *rotateEntity, bool *rotateLightSource,
ShaderProgram *postProcessingProgram, float *intensity, bool *drawShadows);
Window *m_gameWindow;
std::unique_ptr<Window> m_gameWindow;
EventHandler *m_gameEventHandler;
World *m_world;
@@ -45,6 +50,10 @@ private:
std::vector<ShaderProgram *> m_shaderPrograms;
#ifdef _DEBUG
std::unique_ptr<Imgui::Handler> m_imguiHandler;
#endif
FrameBuffer *m_postProcessFrameBuffer;
uint16_t m_MAX_FPS = 60;