gpu,app/internal/wm: add Metal port

The OpenGL (ES) implementations on Apple platforms are deprecated and
don't support GPU compute programs. This change adds support for the
replacement, the Metal GPU API.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-08-03 16:53:42 +02:00
parent a7f08eedf3
commit 3b2992c37e
21 changed files with 1603 additions and 151 deletions
+5 -1
View File
@@ -1,12 +1,16 @@
// SPDX-License-Identifier: Unlicense OR MIT
// +build darwin,ios
// +build darwin,ios,nometal
@import UIKit;
@import OpenGLES;
#include "_cgo_export.h"
Class gio_layerClass(void) {
return [CAEAGLLayer class];
}
int gio_renderbufferStorage(CFTypeRef ctxRef, CFTypeRef layerRef, GLenum buffer) {
EAGLContext *ctx = (__bridge EAGLContext *)ctxRef;
CAEAGLLayer *layer = (__bridge CAEAGLLayer *)layerRef;