 	int frameWidth, int frameHeight
 )
 {
-	unsigned long int index = blockIdx.x * blockDim.x + threadIdx.x, index2, minDepth = INT_MAX_VALUE, depth;
+	unsigned int index = blockIdx.x * blockDim.x + threadIdx.x, index2, minDepth = INT_MAX, depth;
 	int startIndex, curIndex, x, y;
 	VoxelData vd;
 

			}
		}
		
		if (minDepth < INT_MAX_VALUE)
		{
			float4 color = make_float4(0.f, 0.f, 0.f, 0.f);			


#include "math3d.cpp"

#define QUEUE_LENGTH 10000000

static __device__ BFSJob _queue[QUEUE_LENGTH];

