Engine.h 1.2 KB

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