Revert "Use QGLFunction as member to avoid construction of QGLFunction in each"

This reverts commit f61da52cdca0b9f2eb51c29ae345af91d064c507.