WorldRenderer.h 452 B

12345678910111213141516171819202122
  1. #ifndef WORLDRENDERER_H
  2. #define WORLDRENDERER_H
  3. #include "client/rendering/Mesh.h"
  4. #include "common/world/World.h"
  5. #include "rendering/FileTexture.h"
  6. class WorldRenderer {
  7. const World& world;
  8. Mesh mesh;
  9. FileTexture texture;
  10. public:
  11. WorldRenderer(const World& world);
  12. bool init();
  13. void render();
  14. void addCube(TypedBuffer<Triangle>& buffer, float x, float y, float z);
  15. bool isAir(int x, int y, int z) const;
  16. };
  17. #endif