 
 	__syncthreads();
 
-	if (index < _endIndex)
+	if( index < ( * endIndex ) )
 	{
 		BFSJob job = _queue[index];
 		BFSInnerNode node;

#define QUEUE_LENGTH 10000000
#define INT_MAX_VALUE 4294967295ul

static int _h_startIndex, _h_endIndex;

static __constant__ int _startIndex, _endIndex;
static __device__ int _travQueuePtr;
static __device__ BFSJob _queue[QUEUE_LENGTH];


		clearDepthBuffer();
		clearShadowMap();

		rasterize
		( 
			obj, 
