some code organisation. Still hav zbuffer artifacts with oblique frustum plane clipping for water example.