Game.h 949 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef GAME_H
  2. #define GAME_H
  3. #include "client/input/Keys.h"
  4. #include "client/input/MouseButtons.h"
  5. #include "client/math/Camera.h"
  6. #include "client/rendering/wrapper/Shader.h"
  7. #include "client/math/MatrixStack.h"
  8. #include "client/rendering/Mesh.h"
  9. #include "client/rendering/Texture.h"
  10. #include "client/rendering/FontRenderer.h"
  11. class Game final {
  12. public:
  13. Game(const Keys& keys, const MouseButtons& buttons, const Camera& camera, Ray& ray);
  14. void tick();
  15. void renderWorld(float lag, MatrixStack& stack, Shader& sh);
  16. void renderTextOverlay(float lag, MatrixStack& stack, Shader& sh, FontRenderer& fr);
  17. private:
  18. void addCube(float x, float y, float z, bool bottom, bool top, bool left, bool right, bool front, bool back);
  19. const Keys& keys;
  20. const MouseButtons& buttons;
  21. const Camera& camera;
  22. Ray& ray;
  23. float lengthAngle;
  24. float widthAngle;
  25. Vector pos;
  26. Mesh m;
  27. Texture texture;
  28. };
  29. #endif