corrected bugs caused by incorrect ndim
Merge branch 'branch3d' of https://github.com/ddantas/visiongl into branch3d