macOS: simpler way to delete the GL1 context of widgets-using GL3 windows.
This commit is contained in:
parent
63a7942a66
commit
abc6709e8e
@ -52,7 +52,6 @@ class Fl_Cocoa_Gl_Window_Driver : public Fl_Gl_Window_Driver {
|
||||
void apply_scissor();
|
||||
virtual void switch_to_GL1();
|
||||
virtual void switch_back();
|
||||
virtual void gl_hide_before(void *&);
|
||||
};
|
||||
|
||||
|
||||
|
@ -217,6 +217,10 @@ void Fl_Cocoa_Gl_Window_Driver::delete_gl_context(GLContext context) {
|
||||
}
|
||||
[(NSOpenGLContext*)context release];
|
||||
del_context(context);
|
||||
if (gl1ctxt) {
|
||||
[gl1ctxt release];
|
||||
gl1ctxt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Fl_Cocoa_Gl_Window_Driver::make_overlay_current() {
|
||||
@ -492,14 +496,6 @@ void Fl_Cocoa_Gl_Window_Driver::switch_back() {
|
||||
}
|
||||
|
||||
|
||||
void Fl_Cocoa_Gl_Window_Driver::gl_hide_before(void *&) {
|
||||
if (gl1ctxt) {
|
||||
[gl1ctxt release];
|
||||
gl1ctxt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Fl_Gl_Cocoa_Plugin : public Fl_Cocoa_Plugin {
|
||||
public:
|
||||
Fl_Gl_Cocoa_Plugin() : Fl_Cocoa_Plugin(name()) { }
|
||||
|
Loading…
Reference in New Issue
Block a user