Index: frustrum.cpp
===================================================================
--- frustrum.cpp	(revision 129)
+++ frustrum.cpp	(working copy)
@@ -56,21 +56,21 @@
 	plane_point[TOP] = point;
 
 	//BOTTOM
-	point = nc - Y * near_dim.y;
+	point = nc - Y * near_dim.y / 2.0f;
 	aux = glm::normalize( point - eye);
 	normal = glm::cross(aux, X);
 	plane_normal[BOTTOM] = normal;
 	plane_point[BOTTOM] = point;
 
 	//LEFT
-	point = nc - X * near_dim.x;
+	point = nc - X * near_dim.x / 2.0f;
 	aux = glm::normalize( point - eye);
 	normal = glm::cross(aux, Y);
 	plane_normal[LEFT] = normal;
 	plane_point[LEFT] = point;
 
 	//RIGHT
-	point = nc + X * near_dim.x;
+	point = nc + X * near_dim.x / 2.0f;
 	aux = glm::normalize( point - eye);
 	normal = glm::cross(aux, Y);
 	plane_normal[RIGHT] = normal;
@@ -80,12 +80,14 @@
 }
 
 //culling functions
-bool frustrum::point_in_frustrum(const glm::vec3& point) const {
-	for (int i=0; i<6; i++) {
-		if (plane_point_distance(plane_normal[i], plane_point[i], point) < 0) {
+bool frustrum::point_in_frustrum(const glm::vec3& point) {
+	current_point = point;
+	int i = NEARP;
+	//for (i=0; i<1; i++) {
+		if (plane_point_distance(plane_normal[i], plane_point[i], current_point) < 0) {
 			return false;
 		}
-	}
+	//}
 
 	return true;
 }
@@ -104,5 +106,13 @@
 
 GLfloat frustrum::plane_point_distance(const glm::vec3& plane_norm, const glm::vec3& plane_pt, const glm::vec3& point) const {
 	//we can assume that plane_normal is normalized, so we dont need to divide by its length
-	return (glm::dot(plane_norm, point) - glm::dot(plane_norm, plane_pt));
+	GLfloat result = (glm::dot(plane_norm, point) - glm::dot(plane_norm, plane_pt));
+	return result;
+}
+
+
+void frustrum::debug() const {
+	std::cout << "frustrum debug:\n";
+	printf("nearp normal: %2.3f, %2.3f, %2.3f\n", plane_normal[NEARP].x, plane_normal[NEARP].y, plane_normal[NEARP].z);
+	printf("nearp  point: %2.3f, %2.3f, %2.3f\n", plane_point[NEARP].x, plane_point[NEARP].y, plane_point[NEARP].z);
 }
\ No newline at end of file
