mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 23:55:39 +00:00
ui/app: (macOS) don't release opengl context
I haven't found a reliable way to re-create the context and redraw after deminiaturization or app unhide. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -50,8 +50,6 @@ func (c *context) Release() {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
C.gio_clearCurrentContext()
|
||||
C.gio_clearGLContext(c.view)
|
||||
c.ctx = 0
|
||||
}
|
||||
|
||||
func (c *context) Present() error {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_createGLView(void);
|
||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_contextForView(CFTypeRef viewRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_clearGLContext(CFTypeRef viewRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_makeCurrentContext(CFTypeRef ctx);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_flushContextBuffer(CFTypeRef ctx);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_clearCurrentContext(void);
|
||||
|
||||
@@ -143,11 +143,6 @@ CFTypeRef gio_contextForView(CFTypeRef viewRef) {
|
||||
return (__bridge CFTypeRef)view.openGLContext;
|
||||
}
|
||||
|
||||
void gio_clearGLContext(CFTypeRef viewRef) {
|
||||
NSOpenGLView *view = (__bridge NSOpenGLView *)viewRef;
|
||||
[view clearGLContext];
|
||||
}
|
||||
|
||||
void gio_clearCurrentContext(void) {
|
||||
[NSOpenGLContext clearCurrentContext];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user