Frustum culling

Working my as off to speed things up like our vegetation system, which needs drawing lots and lots of instances of the same mesh. For this, I want to do my own culling… In the "old" jME I could hack around the camera culling by making sure that the Spatial used for drawing was a leaf TriMesh and shooting directly at it's draw method(getting around the onDraw with the culling).

This got harder today as mesh's invoke their batches onDraw methods…



Another way of hacking around the culling would be to use cull_never, but the cull_never isn't checked at the top of the draw method like the cull_allways, so still some performance gets lost in getCamera, getPlaneState, parent.getLastFrustumIntersection etc…which adds up to some fps when drawing thousands of things…



tips?

Hmm, if the culling is set to NEVER then we should really skip the cull step.  Easy fix though.  Any objections?

sounds like good enough fix for me…and feels natural too…

Done locally…  Like the TextureManager change I mention in the other thread, I will commit to cvs asap.