You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

chunkmesh.h 728B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <memory>
  3. #include <glm/glm.hpp>
  4. namespace vtk {
  5. class World;
  6. class ChunkMesh {
  7. public:
  8. ChunkMesh(World& world, glm::ivec3 linkedChunkPos);
  9. void rebuildChunkGeometry(const unsigned& vao);
  10. void rebuildChunkLighting(const unsigned& vao);
  11. protected:
  12. //position of chunk since chunk does NOT have to exist to rebuild
  13. //if chunk is not loaded, rebuild will fail silently
  14. //this is useful for allowing you to unload distant chunks but still draw them
  15. //it's also faster to look up adjacent chunk positions when you have the position
  16. glm::ivec3 mLinkedChunkPos;
  17. World& mLinkedWorld;
  18. unsigned mVAO;
  19. unsigned mGemetryTexVBO;
  20. unsigned mLightVBO;
  21. };
  22. }