fixes for screencasting
Commit 1: With direct scanout, make sure we're on an OpenGL context before presenting.
Commit 2: don't use glGetTextureImage on OpenGL < 4.5
Commit 1: With direct scanout, make sure we're on an OpenGL context before presenting.
Commit 2: don't use glGetTextureImage on OpenGL < 4.5