gl: make gl painting work with QPainter