12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #ifndef ENGINE_H
- #define ENGINE_H
- #include <cmath>
- #include <cfloat>
- #include "common/utils/Types.h"
- #include "client/math/Ray.h"
- #include "client/rendering/FontRenderer.h"
- #include "client/rendering/Mesh.h"
- #include "client/rendering/Framebuffers.h"
- #include "client/rendering/Shaders.h"
- #include "client/math/Camera.h"
- #include "client/math/Plane.h"
- #include "client/math/MatrixStack.h"
- #include "client/math/Frustum.h"
- #include "client/Game.h"
- #include "client/rendering/NoiseTexture.h"
- #include "client/utils/Clock.h"
- #include "client/rendering/RenderSettings.h"
- class Engine final {
- public:
- Engine(Shaders& shaders, Framebuffers& fb, Camera& camera, const WindowSize& size, RenderSettings& renderSettings);
- void renderTick(float lag, const Game& game);
- private:
- void renderShadow(float lag, const Game& game);
- void renderWorld(float lag, const Game& game);
- void renderSSAO();
- void renderPostWorld();
- void renderTextOverlay(float lag, const Game& game);
- void updateWorldProjection();
- void updateWorldView();
- Shaders& shaders;
- Framebuffers& fb;
- Camera& camera;
- const WindowSize& size;
- RenderSettings& renderSettings;
-
- Frustum frustum;
- MatrixStack model;
- FontRenderer fontRenderer;
- NoiseTexture ssaoNoise;
- Mesh rectangle;
-
- Matrix worldProj;
- Matrix worldView;
- Matrix worldShadowProj;
- Matrix worldShadowView;
- Matrix worldShadowProjView;
- };
- #endif
|