ported PShape and GL changes