Porting to python opengl