Revert "cleanup opengl"

This reverts commit af7d7905ba9d072b92171ec7d5942997b8ac68c2.