Engine.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef ENGINE_H
  2. #define ENGINE_H
  3. #include "client/Game.h"
  4. #include "client/rendering/Framebuffers.h"
  5. #include "client/rendering/Mesh.h"
  6. #include "client/rendering/NoiseTexture.h"
  7. #include "client/rendering/RenderSettings.h"
  8. #include "client/rendering/Renderer.h"
  9. #include "client/rendering/Shaders.h"
  10. #include "gaming-core/math/Frustum.h"
  11. class Engine final {
  12. public:
  13. Engine(Shaders& shaders, Framebuffers& fb, const Size& size,
  14. RenderSettings& renderSettings);
  15. void renderTick(float lag, Game& game);
  16. private:
  17. void renderShadow(float lag, Game& game);
  18. void renderWorld(float lag, Game& game);
  19. void renderSSAO();
  20. void renderPostWorld();
  21. void renderOverlay(float lag, Game& game);
  22. void updateWorldProjection();
  23. void updateWorldView();
  24. Shaders& shaders;
  25. Framebuffers& framebuffers;
  26. const Size& size;
  27. RenderSettings& renderSettings;
  28. Frustum frustum;
  29. MatrixStack<16> model;
  30. Renderer renderer;
  31. NoiseTexture ssaoNoise;
  32. Mesh rectangle;
  33. Matrix worldProj;
  34. Matrix worldView;
  35. Matrix worldShadowProj;
  36. Matrix worldShadowView;
  37. Matrix worldShadowProjView;
  38. };
  39. #endif