3d rendering works

rebased into master