Engine.h 1.2 KB

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