Revert " trying to fix crash caused by executing OpenGL in background mode (rarely occurs when capturing from camera and"

This reverts commit adea1f1365646effb5683fc895be750248b2aab8.