gpu/headless: move package app/headless

Package headless is more about rendering that windows. Move it
accordingly.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-03-05 16:04:03 +01:00
parent 18a6dcf571
commit 2a66bfb2b4
17 changed files with 2 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: Unlicense OR MIT
// +build darwin,ios
@import OpenGLES;
#include <CoreFoundation/CoreFoundation.h>
#include "_cgo_export.h"
void gio_headless_releaseContext(CFTypeRef ctxRef) {
CFBridgingRelease(ctxRef);
}
CFTypeRef gio_headless_newContext(void) {
EAGLContext *ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
if (ctx == nil) {
return nil;
}
return CFBridgingRetain(ctx);
}
void gio_headless_clearCurrentContext(CFTypeRef ctxRef) {
[EAGLContext setCurrentContext:nil];
}
void gio_headless_makeCurrentContext(CFTypeRef ctxRef) {
EAGLContext *ctx = (__bridge EAGLContext *)ctxRef;
[EAGLContext setCurrentContext:ctx];
}
void gio_headless_prepareContext(CFTypeRef ctxRef) {
}