Thankfully it wasn't a problem with the data format, I was passing the

address of a ptr, not the address contained by the ptr. With that,
preliminary GPU octree interaction works perfectly
This commit is contained in:
MitchellHansen
2017-09-24 17:48:06 -07:00
parent 7c86c60f9f
commit 305ef917e0
6 changed files with 28 additions and 12 deletions

View File

@@ -322,9 +322,9 @@ bool Octree::Validate(char* data, sf::Vector3i dimensions){
// std::cout << (int)GetVoxel(sf::Vector3i(16, 16, 16)) << std::endl;
for (int x = 0; x < OCT_DIM; x++) {
for (int y = 0; y < OCT_DIM; y++) {
for (int z = 0; z < OCT_DIM; z++) {
for (int x = 0; x < dimensions.x; x++) {
for (int y = 0; y < dimensions.y; y++) {
for (int z = 0; z < dimensions.z; z++) {
sf::Vector3i pos(x, y, z);
@@ -334,6 +334,7 @@ bool Octree::Validate(char* data, sf::Vector3i dimensions){
if (arr_val != oct_val) {
std::cout << "X: " << pos.x << " Y: " << pos.y << " Z: " << pos.z << " ";
std::cout << (int)arr_val << " : " << (int)oct_val << std::endl;
return false;
}
}