Fixed memory leak in Terrain.
Fixed incorrect default render state setting for depth write.
Merge pull request #770 from sgrenier/next

Fixed memory leak in Terrain.