mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
all: merge .m files with their .go counterparts
The only reason for separate files is Objective-C callbacks into Go, or when the Go side is common, yet the Objective-C side differs from macOS to iOS. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_headless_newContext(void);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_releaseContext(CFTypeRef ctxRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_clearCurrentContext(CFTypeRef ctxRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_makeCurrentContext(CFTypeRef ctxRef);
|
||||
*/
|
||||
@@ -43,7 +42,7 @@ func (c *nsContext) ReleaseCurrent() {
|
||||
|
||||
func (d *nsContext) Release() {
|
||||
if d.ctx != 0 {
|
||||
C.gio_headless_releaseContext(d.ctx)
|
||||
C.CFRelease(d.ctx)
|
||||
d.ctx = 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
#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) {
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "_cgo_export.h"
|
||||
|
||||
void gio_headless_releaseContext(CFTypeRef ctxRef) {
|
||||
CFBridgingRelease(ctxRef);
|
||||
}
|
||||
|
||||
CFTypeRef gio_headless_newContext(void) {
|
||||
NSOpenGLPixelFormatAttribute attr[] = {
|
||||
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
|
||||
|
||||
Reference in New Issue
Block a user