Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/LODInfo.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/LODInfo.h	(revision 2854)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/LODInfo.h	(revision 2856)
@@ -20,5 +20,5 @@
 public:
 	
-	LODLevel(float squaredDist): mSquaredDistance(squaredDist) {}
+	LODLevel(float squaredDist): mSquaredDistance(squaredDist), mNumTriangles(0) {}
 
 	inline float GetSquaredDistance() const { return mSquaredDistance; }
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp	(revision 2855)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp	(revision 2856)
@@ -45,30 +45,51 @@
 
 ColorBufferObject::ColorBufferObject(int w, int h, 
-									 COLOR_FORMAT c, 
-									 int wrapType, 
-									 int filterType, 
+									 FORMAT c, 
+									 WRAP_TYPE wrapType, 
+									 FILTER_TYPE filterType, 
 									 bool useMipMap, 
 									 bool useMultiSampling)
 {
-/*	
-	glGenRenderbuffersEXT(1, &normalsBuffer);
-	glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, normalsBuffer);
-	glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA8, texWidth, texHeight);
+	glGenRenderbuffersEXT(1, &mId);
+	glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mId);
+	glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA8, w, h);
 	
-	glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_RENDERBUFFER_EXT, normalsBuffer);
+	glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_RENDERBUFFER_EXT, mId);
 
-	glGenTextures(1, &normalsTex);
-	glBindTexture(GL_TEXTURE_2D, normalsTex);
-	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texWidth, texHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-	glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_TEXTURE_2D, normalsTex, 0);
+	glGenTextures(1, &mTexId);
+	glBindTexture(GL_TEXTURE_2D, mTexId);
+	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+	glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_TEXTURE_2D, mTexId, 0);
 
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+	GLuint filterParam;
 
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+	switch (filterType)
+	{
+	case WRAP_NEAREST:
+		filterParam = GL_NEAREST; break;
+	case WRAP_LINEAR:
+		filterParam = GL_LINEAR; break;
+	case WRAP_MIPMAP_LINEAR: 
+		filterParam = GL_LINEAR_MIPMAP_LINEAR; break;
+	}
+
+	
+	GLuint wrapParam;
+
+	switch (wrapType)
+	{
+	case GL_REPEAT:
+		wrapParam = GL_NEAREST; break;
+	case GL_CLAMP_TO_EDGE:
+		wrapParam = GL_LINEAR; break;
+	}
+
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterParam);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterParam);
+
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrapParam);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapParam);
 
 	PrintFBOStatus(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT));
-*/
 }
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 2854)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 2856)
@@ -98,8 +98,8 @@
 // eye near plane distance
 float nearDist = 0.2f; 
+/// the field of view
+float fov = 50.0f;
 /// the pixel threshold where a node is still considered invisible
 int threshold;
-
-float fov = 50.0f;
 
 int assumedVisibleFrames = 10;
@@ -384,5 +384,7 @@
 
 	if (!useFullScreen)
+	{
 		glutCreateWindow("FriendlyCulling");
+	}
 	else
 	{
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h	(revision 2855)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h	(revision 2856)
@@ -16,12 +16,19 @@
 public:
 
-	enum COLOR_FORMAT { BUFFER_UBYTE, BUFFER_FLOAT_16, BUFFER_FLOAT_32 };
+	enum FORMAT { BUFFER_UBYTE, BUFFER_FLOAT_16, BUFFER_FLOAT_32 };
+	enum FILTER_TYPE { GL_REPEAT, GL_CLAMP_TO_EDGE };
+	enum WRAP_TYPE { WRAP_NEAREST, WRAP_LINEAR, WRAP_MIPMAP_LINEAR };
 
 	ColorBufferObject(int w, int h, 
-		              COLOR_FORMAT c, 
-					  int wrapType, 
-					  int filterType, 
+		              FORMAT c, 
+					  WRAP_TYPE wrapType, 
+					  FILTER_TYPE filterType, 
 					  bool useMipMap, 
 					  bool useMultiSampling);
+
+protected:
+
+	unsigned int mId;
+	unsigned int mTexId;
 };
 
@@ -40,5 +47,5 @@
 		Returns a pointer to the buffer object
 	*/
-	ColorBufferObject *AddColorBuffer(ColorBufferObject::COLOR_FORMAT col, 
+	ColorBufferObject *AddColorBuffer(ColorBufferObject::FORMAT col, 
 		                              int wrapType, 
 									  int filterType, 
