summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Device_Plugin.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-01-21 16:38:14 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-01-21 16:38:14 +0000
commit42845966d1502bae8c24bf35aff1dcf11a1e058d (patch)
tree152b7f1a40727ed098a1fe74b2c50a2ad51bf820 /src/Fl_Gl_Device_Plugin.cxx
parent5ff6efd52913ba1d3ec6f22bc61e416a26e70361 (diff)
Removed OpenGL graphics driver from public view. For the parts that are implemented, it will 'just work' by allowing fl_* rendering into OpenGL contexts (such as widgets, etc.)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11022 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Device_Plugin.cxx')
-rw-r--r--src/Fl_Gl_Device_Plugin.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx
index a7dfcd0a6..3ad9263ab 100644
--- a/src/Fl_Gl_Device_Plugin.cxx
+++ b/src/Fl_Gl_Device_Plugin.cxx
@@ -17,6 +17,7 @@
//
#include <config.h>
+#include "config_lib.h"
#include <FL/Fl_Printer.H>
#include <FL/Fl_Gl_Window.H>
#include "Fl_Gl_Choice.H"
@@ -29,6 +30,33 @@
#else
#endif
+
+// ------ this should be in a separate file! -----------------------------------
+#ifdef FL_CFG_GFX_OPENGL
+
+#include <FL/Fl_Device.H>
+#include <FL/gl.h>
+#include "src/cfg_gfx/opengl.H"
+
+Fl_OpenGL_Display_Device *Fl_OpenGL_Display_Device::display_device() {
+ static Fl_OpenGL_Display_Device *display = new Fl_OpenGL_Display_Device(new Fl_OpenGL_Graphics_Driver());
+ return display;
+};
+
+Fl_OpenGL_Display_Device::Fl_OpenGL_Display_Device(Fl_OpenGL_Graphics_Driver *graphics_driver)
+: Fl_Surface_Device(graphics_driver)
+{
+}
+
+const char *Fl_OpenGL_Display_Device::class_id = "Fl_OpenGL_Display_Device";
+
+#endif
+// ------ end of separate file! ------------------------------------------------
+
+#include "cfg_gfx/opengl_rect.cxx"
+
+
+
#if defined(__APPLE__)
uchar *convert_BGRA_to_RGB(uchar *baseAddress, int w, int h, int mByteWidth)
{