Cleaned up Map and the Octree. Did some testing and refactoring of generation code. Interleaved data is now good, also changed the block stack dealio to just a blob of uint64_t data. Used a GCC and by extension MSVC extension which speeds up count_bits by a good bit. After all optimizations, getVoxel is now around 10-15 times faster.

This commit is contained in:
MitchellHansen
2017-03-22 22:50:17 -07:00
parent d1b9ecd3e5
commit e45df185f7
5 changed files with 317 additions and 374 deletions

View File

@@ -85,6 +85,7 @@ int main() {
#elif defined _WIN32
glewInit();
#elif defined TARGET_OS_MAC
// Do nothing, extension wrangling handled by macOS
#endif
// The socket listener for interacting with the TCP streaming android controller
@@ -95,8 +96,7 @@ int main() {
// =============================
Map _map(sf::Vector3i(0, 0, 0));
_map.generate_octree();
std::cout << _map.a.get_voxel(sf::Vector3i(1, 1, 0));
std::cout << _map.getVoxel(sf::Vector3i(1, 1, 0));
_map.a.print_block(0);
_map.test_map();
std::cin.get();
return 0;