triangulation on gpu, some little tweaks in other patches