app/headless: prepare OpenGL context on macOS

The macOS backend uses a desktop OpenGL context, not a OpenGL ES
context. The main difference is that sRGB have to be enabled and
a vertex buffer must be bound.

Do that and fix Window.Screenshot for scenes more complex than a
glClear.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-12-03 23:53:56 +01:00
parent fddb0af6f6
commit d9212263aa
5 changed files with 23 additions and 5 deletions
+3
View File
@@ -27,3 +27,6 @@ void gio_headless_makeCurrentContext(CFTypeRef ctxRef) {
EAGLContext *ctx = (__bridge EAGLContext *)ctxRef;
[EAGLContext setCurrentContext:ctx];
}
void gio_headless_prepareContext(CFTypeRef ctxRef) {
}