Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.cpp	(revision 2846)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.cpp	(revision 2850)
@@ -36,5 +36,6 @@
 mName(filename),
 mBoundaryModeS(REPEAT),
-mBoundaryModeT(REPEAT)
+mBoundaryModeT(REPEAT),
+mUseMipMap(true)
 {
 	startil();
@@ -72,10 +73,4 @@
 	glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 	
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
-
-	//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-	//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-
 	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 4);
 
@@ -86,6 +81,19 @@
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, glWrapModeT);
 
+	if (mUseMipMap)
+	{
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+	}
+	else
+	{
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+	}
+
 	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, mWidth, mHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, mImage);
-	gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, mImage);
+	
+	if (mUseMipMap)
+		gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, mImage);
 
 	glBindTexture(GL_TEXTURE_2D, 0);
@@ -153,3 +161,6 @@
 }
 
+
+
+
 }
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h	(revision 2846)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h	(revision 2850)
@@ -54,4 +54,6 @@
 	void SetBoundaryModeT(int mode) { mBoundaryModeT = mode; }
 
+	//void SetUseMipMap(bool useMipMap) { mUseMipMap = useMipMap; }
+
 	int GetBoundaryModeS() const { return mBoundaryModeS; }
 	int GetBoundaryModeT() const { return mBoundaryModeT; }
@@ -60,4 +62,5 @@
 	*/
 	void Create();
+	
 
 
@@ -77,4 +80,6 @@
 	int mByteSize;
 	void *mImage;
+
+	bool mUseMipMap;
 };
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.cpp	(revision 2845)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.cpp	(revision 2850)
@@ -88,5 +88,5 @@
 	{
 		mCullFaceEnabled = true;
-		glEnable(GL_CULL_FACE);
+		//glEnable(GL_CULL_FACE);
 	}
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp	(revision 2848)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp	(revision 2850)
@@ -68,4 +68,7 @@
 		str.read(reinterpret_cast<char *>(&distance), sizeof(float));
 
+		// hack
+		distance = i * 20;
+
 		int numShapes;
 		str.read(reinterpret_cast<char *>(&numShapes), sizeof(int));
@@ -80,6 +83,4 @@
 			str.read(reinterpret_cast<char *>(&shapeId), sizeof(int));
 
-			//if (numLODs > 1) cout << " id " << shapeId;
-			
 			Geometry *geom = mGeometryTable[shapeId];
 			Material *mat = mMaterialTable[shapeId];
@@ -128,7 +129,4 @@
 		tex->SetBoundaryModeS(boundS);
 		tex->SetBoundaryModeT(boundT);
-
-		//tex->SetBoundaryModeS(Texture::CLAMP);
-		//tex->SetBoundaryModeT(Texture::CLAMP);
 
 		tex->Create();
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 2848)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 2850)
@@ -376,5 +376,7 @@
 	glutInitWindowSize(winWidth, winHeight);
 	glutInit(&argc, argv);
-	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
+	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_MULTISAMPLE);
+
+	//glutInitDisplayString("samples=2");
 
 	if (!useFullScreen)
@@ -397,8 +399,11 @@
 
 	// initialise gl graphics
-
 	InitExtensions();
 	InitGLstate();
-	
+
+	glEnable(GL_MULTISAMPLE_ARB);
+	glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB);
+	glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST);
+
 	InitFBO();
 	
@@ -665,4 +670,5 @@
 	
 	glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA32F_ARB, texWidth, texHeight);
+
 	int samples = 8;
 	//glEnable(GL_MULTISAMPLE_ARB);
@@ -863,5 +869,6 @@
 	glFrontFace(GL_CCW);
 	glCullFace(GL_BACK);
-	glEnable(GL_CULL_FACE);
+	//glEnable(GL_CULL_FACE);
+	
 	glDisable(GL_CULL_FACE);
 	glDisable(GL_TEXTURE_2D);
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCPlusPlusTraverser.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCPlusPlusTraverser.cpp	(revision 2802)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCPlusPlusTraverser.cpp	(revision 2850)
@@ -27,11 +27,7 @@
 			{
 				BvhNode *node = query->GetNodes()[i];
-#if 1
+
 				mIQueue.push_back(node);
 				node->SetLastQueriedFrame(mFrameId);
-#else
-				OcclusionQuery *q = IssueOcclusionQuery(node);
-				mQueryQueue.push(q);
-#endif
 			}
 		}
