OpenGLContext: More error handling.

Change-Id: Ib92adfc83c963ecfcfa7fdbc2ec71f363a181330