diff options
| author | Manolo Gouy <Manolo> | 2018-11-29 17:50:55 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-11-29 17:50:55 +0000 |
| commit | b511f6a7a4f02cad8731c7e514f2778444a066fa (patch) | |
| tree | 83421b62e3922cf915774d4a4657cf0939c03f8e /src/Fl_Gl_Device_Plugin.cxx | |
| parent | d600ccc034b93c0ad6dc034550dc87d3fcf32530 (diff) | |
Use the Fl_Gl_Device_Plugin mechanism to simplify the construction of a layer-backed GL window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Device_Plugin.cxx')
| -rw-r--r-- | src/Fl_Gl_Device_Plugin.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx index f5e24585a..ee827aef5 100644 --- a/src/Fl_Gl_Device_Plugin.cxx +++ b/src/Fl_Gl_Device_Plugin.cxx @@ -44,6 +44,10 @@ public: if (!glw) return NULL; return Fl_OpenGL_Display_Device::capture_gl_rectangle(glw, x, y, w, h); } + virtual GLContext context(Fl_Window *window) { + Fl_Gl_Window *glw = window->as_gl_window(); + return glw ? glw->context() : 0; + } }; static Fl_Gl_Device_Plugin Gl_Device_Plugin; |
